Neuron Net
Public Member Functions | Protected Attributes | List of all members
CBufferDouble Class Reference

Class of OpenCL buffer data. Used for transfer data from CPU to GPU and back. More...

Inheritance diagram for CBufferDouble:

Public Member Functions

 CBufferDouble (void)
 Constructor. More...
 
 ~CBufferDouble (void)
 Destructor. More...
 
virtual bool BufferInit (uint count, double value)
 Method for buffer initialization. More...
 
virtual bool BufferCreate (COpenCLMy *opencl)
 Method for creating new buffer. More...
 
virtual bool BufferFree (void)
 Method for deleting buffer from GPU. More...
 
virtual bool BufferRead (void)
 Method for reading buffer data from GPU. More...
 
virtual bool BufferWrite (void)
 Method for writing buffer data to GPU. More...
 
virtual bool BufferSet (int index)
 Change buffer index number. More...
 
virtual int GetData (double &values[])
 Read data from buffer to array. More...
 
virtual int GetData (CArrayDouble *values)
 Read data from buffer to array. More...
 
virtual int GetIndex (void)
 Get buffer index. More...
 
virtual int Type (void) const
 Identificator of class. More...
 
virtual void BufferToCSV (const string file_name)
 Save buffer data to CSV file. More...
 

Protected Attributes

COpenCLMyOpenCL
 Object for working with OpenCL. More...
 
int m_myIndex
 Index of buffer. More...
 

Detailed Description

Class of OpenCL buffer data. Used for transfer data from CPU to GPU and back.

Detailed description on the link.

Definition at line 2773 of file NeuroNet.mqh.

Constructor & Destructor Documentation

◆ CBufferDouble()

CBufferDouble::CBufferDouble ( void  )

Constructor.

Definition at line 2798 of file NeuroNet.mqh.

◆ ~CBufferDouble()

CBufferDouble::~CBufferDouble ( void  )

Destructor.

Definition at line 2805 of file NeuroNet.mqh.

Member Function Documentation

◆ BufferCreate()

bool CBufferDouble::BufferCreate ( COpenCLMy opencl)
virtual

Method for creating new buffer.

Parameters
[in]openclPointer to COpenCLMy object

Definition at line 2819 of file NeuroNet.mqh.

◆ BufferFree()

bool CBufferDouble::BufferFree ( void  )
virtual

Method for deleting buffer from GPU.

Definition at line 2843 of file NeuroNet.mqh.

◆ BufferInit()

bool CBufferDouble::BufferInit ( uint  count,
double  value 
)
virtual

Method for buffer initialization.

Parameters
[in]countNumber of items
[in]valueInitialization value

Definition at line 2887 of file NeuroNet.mqh.

◆ BufferRead()

bool CBufferDouble::BufferRead ( void  )
virtual

Method for reading buffer data from GPU.

Definition at line 2858 of file NeuroNet.mqh.

◆ BufferSet()

virtual bool CBufferDouble::BufferSet ( int  index)
inlinevirtual

Change buffer index number.

Parameters
indexNew index

Definition at line 2787 of file NeuroNet.mqh.

◆ BufferToCSV()

void CBufferDouble::BufferToCSV ( const string  file_name)
virtual

Save buffer data to CSV file.

Parameters
[in]file_nameFile name to write data

Definition at line 4286 of file NeuroNet.mqh.

◆ BufferWrite()

bool CBufferDouble::BufferWrite ( void  )
virtual

Method for writing buffer data to GPU.

Definition at line 2877 of file NeuroNet.mqh.

◆ GetData() [1/2]

int CBufferDouble::GetData ( CArrayDouble *  values)
virtual

Read data from buffer to array.

Parameters
[out]valuesArray to read data

Definition at line 2907 of file NeuroNet.mqh.

◆ GetData() [2/2]

int CBufferDouble::GetData ( double &  values[])
virtual

Read data from buffer to array.

Parameters
[out]valuesArray to read data

Definition at line 2898 of file NeuroNet.mqh.

◆ GetIndex()

virtual int CBufferDouble::GetIndex ( void  )
inlinevirtual

Get buffer index.

Returns
Index

Definition at line 2790 of file NeuroNet.mqh.

◆ Type()

virtual int CBufferDouble::Type ( void  ) const
inlinevirtual

Identificator of class.

Returns
Type of class

Definition at line 2792 of file NeuroNet.mqh.

Member Data Documentation

◆ m_myIndex

int CBufferDouble::m_myIndex
protected

Index of buffer.

Definition at line 2777 of file NeuroNet.mqh.

◆ OpenCL

COpenCLMy* CBufferDouble::OpenCL
protected

Object for working with OpenCL.

Definition at line 2776 of file NeuroNet.mqh.


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