2.3.7 xfblasSetMatrix - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
xfblasStatus_t xfblasSetMatrix(int rows, int cols, int elemSize, short* A, int lda, short* d_A, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0)
xfblasStatus_t xfblasSetMatrix(int rows, int cols, int elemSize, float* A, int lda, float* d_A, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0)

This function copies a matrix in host memory to FPGA device memory. xfblasMalloc() need to be called prior to this function.

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
d_A pointer to mapped memory
kernelIndex index of kernel that is being used, default is 0
deviceIndex index of device that is being used, default is 0

Return:

xfblasStatus_t 0 if the operation 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 no FPGA device memory allocated for the matrix
xfblasStatus_t 4 if the engine is not supported for now