xfblasStatus_t xfblasMalloc(short** devPtr, int rows, int lda, int elemSize, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0) xfblasStatus_t xfblasMalloc(float** devPtr, int rows, int lda, int elemSize, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0)
This function allocates memory on the FPGA device.
Parameters:
| devPtr | Pointer to the mapped memory. |
| 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 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 the 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. |