Intel® oneAPI Data Analytics Library
Learn from community members on how to build compute-intensive applications that run efficiently on Intel® architecture.
225 Discussions

releaseBlockOfRows method of DenseNumericTableIface

renorm2
Beginner
767 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
767 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

0 Kudos
renorm2
Beginner
767 Views

It answered my question. Thanks.

0 Kudos
renorm2
Beginner
767 Views

Follow up question.

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

0 Kudos
VictoriyaS_F_Intel
767 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

0 Kudos
renorm2
Beginner
767 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.

 

 

 

 

0 Kudos
Ilya_B_Intel
Employee
767 Views

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

0 Kudos
Reply