C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

List of all members
BufferView< T > Class Template Reference

Class that refers to a contiguous sequence of objects, but doesn't control allocated memory buffer and objects lifetime, user is responsible for correct memory management and deallocation. More...

Class Declaration

template<typename T>
class daal::services::interface1::BufferView< T >

Template Parameters
TType of an object stored in the buffer

Constructor & Destructor Documentation

BufferView ( )
inline

Creates empty BufferView

BufferView ( T *  buffer,
size_t  bufferSize 
)
inlineexplicit

Creates BufferView from the raw data

Parameters
[in]bufferThe raw pointer to the buffer
[in]bufferSizeThe buffer size

Member Function Documentation

T* data ( ) const
inline

Returns pointer to the underlying buffer serving as element storage

Returns
Pointer to the array
bool empty ( ) const
inline

Flag indicates that buffer is empty (its size is 0)

Returns
Whether the buffer is empty
BufferView getBlock ( size_t  offset,
size_t  size 
) const
inline

Gets the block of the current buffer

Parameters
[in]offsetThe offset of the block
[in]sizeThe size of the block
Returns
New BufferView object for specified block
const T& operator[] ( size_t  index) const
inline

Const element access

Parameters
[in]indexIndex of an accessed element
Returns
Const reference to the element
T& operator[] ( size_t  index)
inline

Element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element
size_t size ( ) const
inline

Size of a buffer

Returns
Size of the buffer

The documentation for this class was generated from the following file:

For more complete information about compiler optimizations, see our Optimization Notice.