Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

This manual is preliminary and incomplete.
While our Core implementation implements all functions given in the standard we are still working on completing this documentation.

Please refer to the VSIPL standard for a complete function reference of the Core profile until we have completed work on this documentation.

1.4.2 vsip_dmbind_p - Bind a Matrix View to a Block

void vsip_mbind_f(const vsip_block_f* block, vsip_offset offset, 
                 vsip_stride col_stride, vsip_stride col_length, 
                 vsip_length row_length, vsip_length row_length); 
void vsip_cmbind_f(const vsip_cblock_f* block, vsip_offset offset, 
                  vsip_stride col_stride, vsip_stride col_length, 
                  vsip_length row_length, vsip_length row_length);
Description

This function binds a matrix view to a section of a data block, allowing access to the block’s data through the matrix view interface. The binding specifies the location of the matrix within the block, the strides between elements, and the dimensions of the matrix.

The matrix view becomes a "window" into the block, with the specified dimensions and strides. This allows for efficient access to submatrices or non-contiguous sections of a larger data block without copying data.

Parameters
Example

vsip_block_f *block; 
vsip_mview_f matrix_view; 
vsip_scalar_f *data; 
vsip_length block_size = 1000; 
 
// Allocate a block of data 
block = vsip_blockcreate_f(block_size, VSIP_MEM_NONE); 
 
// Populate block with data here 
 
// Bind a 10x10 matrix view to the block starting at offset 0 
// with contiguous memory layout (col_stride = 1, row_stride = 10) 
matrix_view = vsip_mbind_f(block, 0, 1, 10, 10, 10);
Notes