-
Notifications
You must be signed in to change notification settings - Fork 2
ResCudaSpace
nphtan edited this page May 19, 2021
·
1 revision
cuda on-device memory management.
Header File: ResCudaSpace.hpp
class ResCudaSpace : public Kokkos::CudaSpace {
public:
//! Tag this class as a kokkos memory space
typedef ResCudaSpace memory_space ;
typedef ResCudaSpace resilient_space ;
typedef Kokkos::Cuda execution_space ;
typedef Kokkos::Device<execution_space,memory_space> device_type;
typedef unsigned int size_type ;
/*--------------------------------*/
ResCudaSpace();
ResCudaSpace( ResCudaSpace && rhs ) = default ;
ResCudaSpace( const ResCudaSpace & rhs ) = default ;
ResCudaSpace & operator = ( ResCudaSpace && rhs ) = default ;
ResCudaSpace & operator = ( const ResCudaSpace & rhs ) = default ;
~ResCudaSpace() = default ;
static void clear_duplicates_list();
static std::map<std::string, Kokkos::Experimental::DuplicateTracker * > duplicate_map;
private:
friend class Kokkos::Impl::SharedAllocationRecord< ResCudaSpace , void > ;
};
-
memory_space
: Unique identifier for this space (ResCudaSpace
) -
resilient_space
: Identifies that this space supports resilient exection. -
execution_space
: The execution space. -
device_type
: Which device this space uses. -
size_type
: Type for indexing operations.
-
ResCudaSpace();
Default constructor.
-
ResCudaSpace( ResCudaSpace && rhs ) = default;
Default move constructor.
-
ResCudaSpace( const ResCudaSpace & rhs ) = default;
Default copy constructor.
-
ResCudaSpace & operator = ( ResCudaSpace && rhs ) = default;
Move assignment operator.
-
ResCudaSpace & operator = ( const ResCudaSpace & rhs ) = default;
Default copy assignment operator.
-
Clear duplicated data.
static void clear_duplicates_list();