24 #include <hip/hip_runtime.h> 27 #include <cuda_runtime.h> 36 this->_data = allocate_on_target<T>(this->_target, this->_size);
37 this->_count =
new std::size_t(0);
43 if (*this->_count == 0) {
44 deallocate_on_target<T>(this->_target, this->_data);
51 #if defined HAS_ROCM_MODEL || HAS_CUDA_MODEL 60 this->_data = other._data;
61 this->_size = other._size;
62 this->_target = other._target;
63 this->_count = other._count;
80 std::size_t *_count =
nullptr;
85 #endif // LIMPET_DATA_H
LimpetData< T > & operator=(const LimpetData< T > &other)
special value to handle unknown targets
LimpetData(Target target, std::size_t n)
Defines valid targets for an ionic model to run on and an allocator for allocating memory on a specif...
Target
enum that represents different targets to run ionic models on.