Skip to content

Commit

Permalink
remove unwanted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chaithyagr authored Dec 10, 2024
1 parent 305482b commit 09a9d0c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions include/finufft/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,6 @@
namespace finufft {
namespace utils {

// Simple helper to wrap pointer in std::vector and release it later
template <class T>
void wrapArrayInVector( T *sourceArray, size_t arraySize, std::vector<T, xsimd::aligned_allocator<T, 64> > &targetVector ) {
typename std::_Vector_base<T, xsimd::aligned_allocator<T, 64> >::_Vector_impl *vectorPtr =
(typename std::_Vector_base<T, xsimd::aligned_allocator<T, 64> >::_Vector_impl *)((void *) &targetVector);
vectorPtr->_M_start = sourceArray;
vectorPtr->_M_finish = vectorPtr->_M_end_of_storage = vectorPtr->_M_start + arraySize;
}

template <class T>
void releaseVectorWrapper( std::vector<T, xsimd::aligned_allocator<T, 64> > &targetVector ) {
typename std::_Vector_base<T, xsimd::aligned_allocator<T, 64> >::_Vector_impl *vectorPtr =
(typename std::_Vector_base<T, xsimd::aligned_allocator<T, 64> >::_Vector_impl *)((void *) &targetVector);
vectorPtr->_M_start = vectorPtr->_M_finish = vectorPtr->_M_end_of_storage = NULL;
}

// ahb's low-level array helpers
template<typename T>
FINUFFT_EXPORT T FINUFFT_CDECL relerrtwonorm(BIGINT n, const std::complex<T> *a,
Expand Down

0 comments on commit 09a9d0c

Please sign in to comment.