2.3.9 xfblasMallocRestricted - 2024.2 English

Vitis Libraries

Release Date
2025-05-14
Version
2024.2 English
xfblasStatus_t xfblasMallocRestricted(int rows, int cols, int elemSize, void* A, int lda, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0)

This function allocates memory for the host row-major format matrix on the FPGA device.

Parameters:

rows Number of rows in the matrix.
cols Number of cols in the matrix that is being used.
elemSize Number of bytes required to store each element in the matrix.
A Pointer to the matrix array in the host memory.
lda Leading dimension of the matrix that indicates the total number of cols in the matrix.
kernelIndex Index of the kernel that is being used; default is 0.
deviceIndex Index of the device that is being used; default is 0.

Return:

xfblasStatus_t 0 if the allocation completed successfully.
xfblasStatus_t 1 if the library was not initialized.
xfblasStatus_t 2 if parameters rows, cols, elemSize, lda <= 0 or cols > lda or data types are not matched.
xfblasStatus_t 3 if there is memory already allocated to the same matrix.
xfblasStatus_t 4 if the engine is not supported for now.
xfblasStatus_t 5 if rows, cols or lda is not padded correctly.