Class cubase

Inheritance Relationships

Derived Types

Class Documentation

class cubase

Base class of types managing data.

Subclassed by cumat, custride

Public Types

enum class Type

Values:

enumerator Base
enumerator Op
enumerator Mat
enumerator Stride
enumerator Batched
enum class Init

Values:

enumerator None
enumerator Zero

Public Functions

inline cubase()

Construct a new cubase object.

inline cubase(size_t bytes, Init init = Init::Zero)

Construct a new cubase object. Size in bytes How to initialise.

inline virtual ~cubase()

Destroy the cubase object.

virtual size_t nbytes() const = 0

Get size in bytes Size in bytes.

inline double *dmem() const

Get pointer to data Pointer to data.

inline virtual void get(double *dst)

Get data in GPU Pointer to where to store data.

Public Static Functions

static inline auto create_handle()
static inline auto destory_handle()

Public Static Attributes

static cublasHandle_t handle

Save handle for cublas.

static constexpr const double alpha1 = 1.0
static constexpr const double beta0 = 0.0
static constexpr const double beta1 = 1.0
static constexpr cuop::Op op = cuop::Op::Origin
static constexpr cubase::Type type = cubase::Type::Base

Protected Attributes

bool mIsRelease = false
double *dMem = nullptr