Intel® oneAPI Data Analytics Library
Community support for building compute-intensive applications that run fast on Intel® architecture.
207 Discussions

releaseBlockOfRows method of DenseNumericTableIface

renorm2
Beginner
297 Views
What does it do?

 

Documentation  just says "Releases a block of rows". More detailed explanation would be helpful.

 

Thanks.

0 Kudos
6 Replies
VictoriyaS_F_Intel
297 Views

Hello,

Thank you for the feedback.

In our plans – extend the description and provide additional details on the use aspects of Intel DAAL data types including NumericTable, BlockDescriptor, etc.

The behavior of the releaseBlockOfRows() is defined by the data type of the respective Numeric Table, Block Descriptor, and parameters of the method itself.

If you set rwflag parameter of the getBlockOfRows() method to “writeOnly” or “readWrite”, the releaseBlockOfRows() method will write the data from the BlockDescriptor back to the Numeric Table

If the NumericTable and BlockDesctiptor rely on different data types(for example, you use HomgenNumericTable instantiated with float data type, and BlockDescriptor – with double data type) or different memory layouts, the call to the getBlockOfRows() method results into allocation of the auxiliary memory buffers. In this case releaseBlockOfRows() will be responsible for deallocation of the buffers.

Please, let us know, if it answers your question.

 

Thanks,

Victoriya

renorm2
Beginner
297 Views

It answered my question. Thanks.

renorm2
Beginner
297 Views

Follow up question.

Do I have to call release method when block descriptor is read only?

VictoriyaS_F_Intel
297 Views

Yes, you have to call releaseBlockOfRows() if rwflag is "readOnly" too. Because if the NumericTable and BlockDescriptor contain the data of different types. For example, HomogenNumericTable<float> and BlockDescroptor<double>. Then memory allocation happens in getBlockOfRows().

That's why you need to call releaseBlockOfRows() to release the memory when it is no longer needed. It is safer to call releaseBlockOfRows() after every getBlockOfRows().

Thanks,

Victoriya

renorm2
Beginner
297 Views

One more question. What is  the data layout of BlockDescriptor? Looks like it is row-major with stride equal to number of column.

Thanks.

 

 

 

 

Ilya_B_Intel
Employee
297 Views

Yes, it is row-major with stride equal to number of column.

Reply