2.3.9 xfblasMallocRestricted - 2023.2 English

Vitis Libraries

Release Date
2023.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 host row-major format matrix on the FPGA device.


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 kernel that is being used, default is 0
deviceIndex index of device that is being used, default is 0


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