xfblasStatus_t xfblasMallocManaged(short** devPtr, int* paddedLda, int rows, int lda, int elemSize, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0) xfblasStatus_t xfblasMallocManaged(float** devPtr, int* paddedLda, int rows, int lda, int elemSize, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0)
This function allocates memory on the FPGA device, and rewrites the leading dimension size after padding.
Parameters:
devPtr | Pointer to mapped memory. |
paddedLda | Leading dimension of the matrix after padding. |
rows | Number of rows in the matrix. |
lda | Leading dimension of the matrix that indicates the total number of cols in the matrix. |
elemSize | Number of bytes required to store each element 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. |
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. |