Global Namespace

Overview

// namespaces

namespace std
namespace xf
    namespace xf::blas

// macros

#define IDX2R( \
    i, \
    j, \
    ld \
    )

Global Functions

xfblasFreeInstr

#include "xf_blas/api.hpp"
void xfblasFreeInstr (
    unsigned int kernelIndex,
    unsigned int deviceIndex
    )

This function frees instrution.

Parameters:

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

xfblasDestroy

#include "xf_blas/api.hpp"
void xfblasDestroy (
    unsigned int kernelNumber,
    unsigned int deviceIndex
    )

This function releases handle used by the XFBLAS library.

Parameters:

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

xfblasFree

#include "xf_blas/api.hpp"
void xfblasFree (
    void* A,
    unsigned int kernelIndex,
    unsigned int deviceIndex
    )

This function frees memory in FPGA device.

Parameters:

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

xfblasGetByAddress

#include "xf_blas/api.hpp"
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.

Parameters:

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

xfblasExecuteAsync

#include "xf_blas/api.hpp"
void xfblasExecuteAsync (
    unsigned int numkernels,
    unsigned int deviceIndex
    )

This asynchronous function starts all kernels and wait until them finish.

Parameters:

numKernels number of kernels that is being used, default is 1
deviceIndex index of device that is being used, default is 0

xfblasExecute

#include "xf_blas/api.hpp"
bool xfblasExecute (
    unsigned int kernelIndex,
    unsigned int deviceIndex
    )

This function starts the kernel and wait until it finishes.

Parameters:

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