35 #include <immintrin.h> 58 mSize(0), mCapacity(0),
60 mRowSize(0), mSlabSize(0),
72 const float* srcData = src.
getData();
74 #pragma omp parallel for simd schedule(static) firstprivate(srcData) 76 mData[i] = srcData[i];
85 #pragma omp parallel for simd schedule(static) 98 #pragma omp parallel for simd schedule(static) firstprivate(scalar) 117 assert(
mData ==
nullptr);
123 throw std::bad_alloc();
virtual void allocateMemory()
Aligned memory allocation (both on CPU and GPU).
BaseFloatMatrix()
Default constructor.
constexpr int kDataAlignment
memory alignment for SSE, SSE2, SSE3, SSE4 (16B)
float * mData
Raw matrix data.
Abstract base class. The common ancestor defining the common interface and allowing derived classes t...
virtual void copyData(const BaseFloatMatrix &src)
Copy data from other matrix with the same size.
The header file containing the structure with 3D dimension sizes.
virtual void freeMemory()
Memory allocation (both on CPU and GPU).
virtual float * getData()
Get raw data out of the class (for direct kernel access).
The header file containing the base class for single precisions floating point numbers (floats)...
virtual void scalarDividedBy(const float scalar)
Calculate matrix = scalar / matrix.
virtual void zeroMatrix()
Zero all elements of the matrix (NUMA first touch).
size_t mCapacity
Total number of allocated elements (in terms of floats).
Abstract base class for float based matrices defining basic interface. Higher dimensional matrices st...