1 #ifndef hamr_cuda_malloc_uva_allocator_h
2 #define hamr_cuda_malloc_uva_allocator_h
4 #include "hamr_config.h"
12 template <
typename T,
typename E =
void>
30 void operator()(T *ptr);
58 void operator()(T *ptr);
71 template <
typename T,
typename E =
void>
84 static std::shared_ptr<T> allocate(cudaStream_t str,
size_t n);
93 static std::shared_ptr<T> allocate(cudaStream_t str,
size_t n,
const T &val);
103 template <
typename U>
104 static std::shared_ptr<T> allocate(cudaStream_t str,
size_t n,
const U *vals,
bool cudaVals =
false);
112 template <
typename T>
121 static std::shared_ptr<T> allocate(cudaStream_t str,
size_t n);
130 static std::shared_ptr<T> allocate(cudaStream_t str,
size_t n,
const T &val);
140 template <
typename U>
141 static std::shared_ptr<T> allocate(cudaStream_t str,
size_t n,
const U *vals,
bool cudaVals =
false);
146 #if !defined(HAMR_SEPARATE_IMPL)
147 #include "hamr_cuda_malloc_uva_allocator_impl.h"