2.2. Basic usage

Direct data access is provided by the Ext_data<> class. In its simplest form, it can be instantiated with a block, and provides access to the data as a raw pointer by means of the data() accessor.

void process(float *data, size_t size);
...
Vector<float> v(8);
vsip_csl::dda::Ext_data<Vector<float>::block_type> ext(v.block());
process(ext.data(), ext.size());

This works, as long as the underlying block type is known to have unit stride. If this assumption can not be made, the access needs to take the stride into account.