Community
cancel
Showing results for 
Search instead for 
Did you mean: 
renorm2
Beginner
73 Views

releaseBlockOfRows method of DenseNumericTableIface

What does it do?

 

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

 

Thanks.

0 Kudos
6 Replies
73 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
73 Views

It answered my question. Thanks.

renorm2
Beginner
73 Views

Follow up question.

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

73 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
73 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
73 Views

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

Reply