xfblasStatus_t xfblasSetVector(int n, int elemSize, short* x, int incx, short* d_x, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0) xfblasStatus_t xfblasSetVector(int n, int elemSize, float* x, int incx, float* d_x, unsigned int kernelIndex = 0, unsigned int deviceIndex = 0)
This function copies a vector in the host memory to ythe FPGA device memory. xfblasMalloc() need to be called prior to this function.
Parameters:
n | Number of elements in the vector. |
elemSize | Number of bytes required to store each element in the vector. |
x | Pointer to the vector in the host memory. |
incx | The storage spacing between consecutive elements of vector x. |
d_x | Pointer to the mapped memory. |
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 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 vector. |
xfblasStatus_t | 4 if the engine is not supported for now. |