Skip to content

ResCudaSpace

nphtan edited this page May 19, 2021 · 1 revision

KokkosResilience::ResCudaSpace

cuda on-device memory management.

Header File: ResCudaSpace.hpp

Synopsis

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 > ;
};

Public Members

Typedefs

  • 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.

Constructors

  • ResCudaSpace();

    Default constructor.

  • ResCudaSpace( ResCudaSpace && rhs ) = default;

    Default move constructor.

  • ResCudaSpace( const ResCudaSpace & rhs ) = default;

    Default copy constructor.

Operators

  • ResCudaSpace & operator = ( ResCudaSpace && rhs ) = default;

    Move assignment operator.

  • ResCudaSpace & operator = ( const ResCudaSpace & rhs ) = default;

    Default copy assignment operator.

Functions

  • static void clear_duplicates_list();
    Clear duplicated data.