.. _global-namespace: Global Namespace ================ .. index:: pair: namespace; global .. toctree:: :hidden: namespace_std.rst namespace_xf.rst Overview ~~~~~~~~ .. _doxid-api_8hpp_1a13ce2b9ff1a787cd11adae706e2177a8: .. _cid-xfblascreate: .. _doxid-api_8hpp_1aab5f6dfe6ee10878dde759d3a42398fd: .. _cid-xfblassend: .. _doxid-api_8hpp_1a1d6c979eaf698419777628e47c290083: .. _cid-xfblasget: .. _doxid-api_8hpp_1a3fc700fa15e4651296983d9ea9068686: .. _cid-xfblasgemm: .. _doxid-api_8hpp_1aaa645df458b5768065c990823fd85e8e: .. _cid-xfblasgemv: .. _doxid-host_8hpp_1a28f98558846e93a2003b440cc3bbec83: .. _cid-idx2r: .. ref-code-block:: cpp :class: overview-code-block // namespaces namespace :ref:`std` namespace :ref:`xf` namespace :ref:`xf::blas` // macros #define IDX2R( \ i, \ j, \ ld \ ) Global Functions ~~~~~~~~~~~~~~~~ .. FunctionSection .. _doxid-api_8hpp_1a7ef12a23050d7e17a8b3e887faab8412: .. _cid-xfblasfreeinstr: xfblasFreeInstr --------------- .. code-block:: cpp #include "xf_blas/api.hpp" .. ref-code-block:: cpp :class: title-code-block void xfblasFreeInstr ( unsigned int kernelIndex, unsigned int deviceIndex ) This function frees instrution. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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 operation completed successfully * - xfblasStatus_t - 1 if the library was not initialized .. _doxid-api_8hpp_1a80f56da206fad0692e3c09ef28b81055: .. _cid-xfblasdestroy: xfblasDestroy ------------- .. code-block:: cpp #include "xf_blas/api.hpp" .. ref-code-block:: cpp :class: title-code-block void xfblasDestroy ( unsigned int kernelNumber, unsigned int deviceIndex ) This function releases handle used by the XFBLAS library. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - kernelNumber - number of kernels that is being used, default is 1 * - deviceIndex - index of device that is being used, default is 0 * - xfblasStatus_t - 0 if the shut down succeeded * - xfblasStatus_t - 1 if the library was not initialized .. _doxid-api_8hpp_1aaca17d3b97d8cfd13ca6c4590b6b8e16: .. _cid-xfblasfree: xfblasFree ---------- .. code-block:: cpp #include "xf_blas/api.hpp" .. ref-code-block:: cpp :class: title-code-block void xfblasFree ( void* A, unsigned int kernelIndex, unsigned int deviceIndex ) This function frees memory in FPGA device. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - A - pointer to matrix A in the host memory * - 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 operation completed successfully * - xfblasStatus_t - 1 if the library was not initialized * - xfblasStatus_t - 3 if there is no FPGA device memory allocated for the matrix .. _doxid-api_8hpp_1af1cfee56d76ad760b4c4bde300ff8c16: .. _cid-xfblasgetbyaddress: xfblasGetByAddress ------------------ .. code-block:: cpp #include "xf_blas/api.hpp" .. ref-code-block:: cpp :class: title-code-block bool xfblasGetByAddress ( void* A, unsigned long long p_bufSize, unsigned int offset, unsigned int kernelIndex, unsigned int deviceIndex ) This function copies a matrix in FPGA device memory to host memory by its address in device memory. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - A - pointer to matrix A in the host memory * - p_bufSize - size of matrix A * - offset - A's address in device memory * - 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 operation completed successfully * - xfblasStatus_t - 1 if the library was not initialized * - xfblasStatus_t - 3 if there is no FPGA device memory allocated for the matrix .. _doxid-api_8hpp_1a733965a55e189deda12c27011658e5c1: .. _cid-xfblasexecuteasync: xfblasExecuteAsync ------------------ .. code-block:: cpp #include "xf_blas/api.hpp" .. ref-code-block:: cpp :class: title-code-block void xfblasExecuteAsync ( unsigned int numkernels, unsigned int deviceIndex ) This asynchronous function starts all kernels and wait until them finish. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - numKernels - number of kernels that is being used, default is 1 * - deviceIndex - index of device that is being used, default is 0 .. _doxid-api_8hpp_1a0b380cc6d337b405332f39a75f5faa63: .. _cid-xfblasexecute: xfblasExecute ------------- .. code-block:: cpp #include "xf_blas/api.hpp" .. ref-code-block:: cpp :class: title-code-block bool xfblasExecute ( unsigned int kernelIndex, unsigned int deviceIndex ) This function starts the kernel and wait until it finishes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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 operation completed successfully * - xfblasStatus_t - 1 if the library was not initialized * - xfblasStatus_t - 3 if there is no FPGA device memory allocated for instrution