The Tutorial and API Reference of VEDA
3.3.0
|
To use VEDA API functions, include "veda.h" header. More...
Functions | |
VEDAresult | vedaMemsetD8 (void *ptr, const uint8_t value, const size_t cnt) |
VEDAresult | vedaMemsetD16 (void *ptr, const uint16_t value, const size_t cnt) |
Gets the Error name matching error code. More... | |
VEDAresult | vedaMemsetD32 (void *ptr, const uint32_t value, const size_t cnt) |
VEDAresult | vedaMemsetD64 (void *_ptr, const uint64_t value, const size_t _cnt) |
VEDAresult | vedaMemsetD128 (void *_ptr, const uint64_t x, const uint64_t y, const size_t _cnt) |
VEDAresult | vedaMemsetD2D8 (void *_ptr, const size_t pitch, const uint8_t value, const size_t w, const size_t h) |
VEDAresult | vedaMemsetD2D16 (void *ptr, const size_t pitch, const uint16_t value, const size_t w, const size_t h) |
VEDAresult | vedaMemsetD2D32 (void *ptr, const size_t pitch, const uint32_t value, const size_t w, const size_t h) |
VEDAresult | vedaMemsetD2D64 (void *_ptr, const size_t pitch, const uint64_t value, const size_t w, const size_t h) |
VEDAresult | vedaMemsetD2D128 (void *_ptr, const size_t pitch, const uint64_t x, const uint64_t y, const size_t w, const size_t h) |
VEDAresult | vedaMemcpy (void *dst, const void *src, const size_t bytes) |
VEDAresult | vedaArgsCreate (VEDAargs *args) |
Instantiate the VEDA function argument handler. More... | |
VEDAresult | vedaArgsDestroy (VEDAargs args) |
Destroy the VEDA function argument handler. More... | |
VEDAresult | vedaArgsSetF32 (VEDAargs args, const int idx, const float value) |
Initialize the VEDA function arguments for single precision floating point value. More... | |
VEDAresult | vedaArgsSetF64 (VEDAargs args, const int idx, const double value) |
Initialize the VEDA function arguments for double precision floating point value. More... | |
VEDAresult | vedaArgsSetI16 (VEDAargs args, const int idx, const int16_t value) |
Initialize the VEDA function arguments for 16 bit integer value. More... | |
VEDAresult | vedaArgsSetI32 (VEDAargs args, const int idx, const int32_t value) |
Initialize the VEDA function arguments for 32 bit integer value. More... | |
VEDAresult | vedaArgsSetI64 (VEDAargs args, const int idx, const int64_t value) |
Initialize the VEDA function arguments for 64 bit integer value. More... | |
VEDAresult | vedaArgsSetI8 (VEDAargs args, const int idx, const int8_t value) |
Initialize the VEDA function arguments for 8 bit integer value. More... | |
VEDAresult | vedaArgsSetStack (VEDAargs args, const int idx, void *ptr, VEDAargs_intent intent, const size_t size) |
Initialize the VEDA function arguments to the buffer on stack. More... | |
VEDAresult | vedaArgsSetU16 (VEDAargs args, const int idx, const uint16_t value) |
Initialize the VEDA function arguments for 16 bit unsigned integer value. More... | |
VEDAresult | vedaArgsSetU32 (VEDAargs args, const int idx, const uint32_t value) |
Initialize the VEDA function arguments for 32 bit unsigned integer value. More... | |
VEDAresult | vedaArgsSetU64 (VEDAargs args, const int idx, const uint64_t value) |
Initialize the VEDA function arguments for 64 bit unsigned integer value. More... | |
VEDAresult | vedaArgsSetU8 (VEDAargs args, const int idx, const uint8_t value) |
Initialize the VEDA function arguments for 8 bit unsigned integer value. More... | |
VEDAresult | vedaCtxCreate (VEDAcontext *pctx, int mode, VEDAdevice dev) |
Create a VEDA context. More... | |
VEDAresult | vedaCtxDestroy (VEDAcontext ctx) |
Destroy a VEDA context. More... | |
VEDAresult | vedaCtxGet (VEDAcontext *ctx, const VEDAdevice device) |
Retrieve the VEDA Context bound to the VEDA device. More... | |
VEDAresult | vedaCtxGetApiVersion (VEDAcontext ctx, uint32_t *version) |
Gets the context's API version. More... | |
VEDAresult | vedaCtxGetCurrent (VEDAcontext *pctx) |
Returns the VEDA context bound to the calling CPU thread. More... | |
VEDAresult | vedaCtxGetDevice (VEDAdevice *device) |
Returns the device ID for the current context. More... | |
VEDAresult | vedaCtxPopCurrent (VEDAcontext *pctx) |
Pops the current VEDA context from the current CPU thread. More... | |
VEDAresult | vedaCtxPushCurrent (VEDAcontext ctx) |
Pushes a context on the current CPU thread. More... | |
VEDAresult | vedaCtxSetCurrent (VEDAcontext ctx) |
Binds the specified VEDA context to the calling CPU thread. More... | |
VEDAresult | vedaCtxStreamCnt (int *cnt) |
Gets the VEDA SM count. More... | |
VEDAresult | vedaCtxSynchronize (void) |
Block for a context's tasks to complete. More... | |
VEDAresult | vedaDeviceDistance (float *distance, VEDAdevice devA, VEDAdevice devB) |
Retrieve the distance of the two given VEDA devices. More... | |
VEDAresult | vedaDeviceGet (VEDAdevice *device, int ordinal) |
Returns a handle to compute VEDA Device. More... | |
VEDAresult | vedaDeviceGetAVEOId (int *id, VEDAdevice dev) |
Retrieve the AVEO ID of the given VEDA device. More... | |
VEDAresult | vedaDeviceGetAttribute (int *pi, VEDAdevice_attribute attrib, VEDAdevice dev) |
Returns information about the VEDA device. More... | |
VEDAresult | vedaDeviceGetCount (int *count) |
Retrieve the number of initialized VEDA device. More... | |
VEDAresult | vedaDeviceGetCurrent (float *current, VEDAdevice dev) |
Returns a VE device AUX current corresponding to VEDA Device. More... | |
VEDAresult | vedaDeviceGetCurrentEdge (float *current, VEDAdevice dev) |
Returns a VE device PCIe edge current corresponding to VEDA Device. More... | |
VEDAresult | vedaDeviceGetNUMAId (int *id, VEDAdevice dev) |
Retrieve the NUMA ID of the given VEDA device. More... | |
VEDAresult | vedaDeviceGetName (char *name, int len, VEDAdevice dev) |
Returns an identifer string for the VEDA device. More... | |
VEDAresult | vedaDeviceGetPhysicalId (int *id, VEDAdevice dev) |
Retrieve the Physical ID of the given VEDA device. More... | |
VEDAresult | vedaDeviceGetPower (float *watts, VEDAdevice dev) |
Returns a VE device power corresponding to VEDA Device. More... | |
VEDAresult | vedaDeviceGetTemp (float *tempC, const int idx, VEDAdevice dev) |
Retrieve the temperature of the specified location on the VEDA device in Celsius. More... | |
VEDAresult | vedaDeviceGetVoltage (float *voltage, VEDAdevice dev) |
Returns a VE device AUX voltage corresponding to VEDA Device. More... | |
VEDAresult | vedaDeviceGetVoltageEdge (float *voltage, VEDAdevice dev) |
Returns a VE device PCIe edge voltage corresponding to VEDA Device. More... | |
VEDAresult | vedaDevicePrimaryCtxGetState (VEDAdevice dev, uint32_t *flags, int *active) |
Get the state of the primary context. More... | |
VEDAresult | vedaDevicePrimaryCtxRelease (VEDAdevice dev) |
This function is not yet implemented. More... | |
VEDAresult | vedaDevicePrimaryCtxReset (VEDAdevice dev) |
Destroy all allocations and reset all state on the primary context. More... | |
VEDAresult | vedaDevicePrimaryCtxRetain (VEDAcontext *pctx, VEDAdevice dev) |
Retain the primary Context on the VEDA device. More... | |
VEDAresult | vedaDevicePrimaryCtxSetFlags (VEDAdevice dev, uint32_t flags) |
This function is not yet implemented. More... | |
VEDAresult | vedaDeviceTotalMem (size_t *bytes, VEDAdevice dev) |
Retrieve the total memory of the VEDA device in bytes. More... | |
VEDAresult | vedaDriverGetVersion (const char **str) |
Return the latest AVEO version supported by VEDA. More... | |
VEDAresult | vedaExit (void) |
Releases the VEDA driver API library gracefully. More... | |
VEDAresult | vedaGetErrorName (VEDAresult error, const char **pStr) |
Gets the Error name matching error code. More... | |
VEDAresult | vedaGetErrorString (VEDAresult error, const char **pStr) |
Gets the Error string matching error code. More... | |
VEDAresult | vedaGetVersion (const char **str) |
Return the latest VEDA version. More... | |
VEDAresult | vedaInit (uint32_t Flags) |
Initialize the VEDA driver API library. More... | |
VEDAresult | vedaLaunchHostFunc (VEDAstream stream, VEDAhost_function fn, void *userData) |
Enqueues a host function call in a stream. More... | |
VEDAresult | vedaLaunchHostFuncEx (VEDAstream stream, VEDAhost_function fn, void *userData, uint64_t *result) |
Enqueues a host function call in a stream. More... | |
VEDAresult | vedaLaunchKernel (VEDAfunction f, VEDAstream stream, VEDAargs args) |
Enqueues a VEDA device function f on the VEDA device. More... | |
VEDAresult | vedaLaunchKernelEx (VEDAfunction f, VEDAstream stream, VEDAargs args, const int destroyArgs, uint64_t *result) |
Enqueues a VEDA device function f on the VEDA device with flexibility. More... | |
VEDAresult | vedaMemAllocHost (void **pp, size_t bytesize) |
Allocates host memory. More... | |
VEDAresult | vedaMemFreeHost (void *ptr) |
Frees host memory. More... | |
VEDAresult | vedaMemGetInfo (size_t *free, size_t *total) |
Gets free and total memory. More... | |
VEDAresult | vedaModuleGetFunction (VEDAfunction *hfunc, VEDAmodule hmod, const char *name) |
Return the VE address of the VEDA device function located in VEDA module. More... | |
VEDAresult | vedaModuleLoad (VEDAmodule *module, const char *fname) |
To load the VE device code into the VE memory. More... | |
VEDAresult | vedaModuleUnload (VEDAmodule hmod) |
To unload/remove the VE device code from the VE memory. More... | |
VEDAresult | vedaStreamAddCallback (VEDAstream stream, VEDAstream_callback callback, void *userData, unsigned int flags) |
Add a callback to a compute stream. More... | |
VEDAresult | vedaStreamGetFlags (VEDAstream hStream, uint32_t *flags) |
Query the flags of a given stream. More... | |
VEDAresult | vedaStreamQuery (VEDAstream hStream) |
Determine status of a compute stream. More... | |
VEDAresult | vedaStreamSynchronize (VEDAstream hStream) |
Wait until a stream's tasks are completed. More... | |
VEDAresult | vedaLaunchKernelEx_compat (VEDAfunction f, VEDAstream stream, VEDAargs args, const int destroyArgs) |
This function is used as backward compatibility for vedaLaunchKernelEx() in version 2.12.1 and above. More... | |
VEDAresult | vedaArgsSetHMEM (VEDAargs args, const int idx, const VEDAhmemptr value) |
Initialize the VEDA function arguments by converting the heterogeneous memory address to raw device memory address. More... | |
VEDAresult | vedaHMemAlloc (VEDAhmemptr *ptr, size_t size) |
Allocates HMEM device memory. More... | |
VEDAresult | vedaHMemFree (VEDAhmemptr ptr) |
Frees HMEM memory. More... | |
VEDAresult | vedaHMemPtr (void **ptr, VEDAhmemptr hptr) |
Gets the VE device address for the given HMEM ptr. More... | |
VEDAresult | vedaHMemcpy (void *dst, void *src, size_t ByteCount) |
Copies Memory. More... | |
VEDAresult | vedaHMemcpyDtoX (void *dst, VEDAdeviceptr src, size_t ByteCount) |
Copies Memory from VEDA device to HMEM. More... | |
VEDAresult | vedaHMemcpyDtoXAsync (void *dst, VEDAdeviceptr src, size_t ByteCount, VEDAstream hStream) |
Copies Memory from VEDA device to HMEM Asynchronously. More... | |
VEDAresult | vedaHMemcpyXtoD (VEDAdeviceptr dst, void *src, size_t ByteCount) |
Copies Memory from HMEM to VEDA Device. More... | |
VEDAresult | vedaHMemcpyXtoDAsync (VEDAdeviceptr dst, void *src, size_t ByteCount, VEDAstream hStream) |
Copies Memory from HMEM to VEDAdevice Asynchronously. More... | |
VEDAresult | vedaHMemsetD128 (VEDAhmemptr dstDevice, uint64_t x, uint64_t y, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD128Async (VEDAhmemptr dstDevice, uint64_t x, uint64_t y, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD16 (VEDAhmemptr dstDevice, uint16_t value, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD16Async (VEDAhmemptr dstDevice, uint16_t value, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D128 (VEDAhmemptr dstDevice, size_t dstPitch, uint64_t x, uint64_t y, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D128Async (VEDAhmemptr dstDevice, size_t dstPitch, uint64_t x, uint64_t y, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D16 (VEDAhmemptr dstDevice, size_t dstPitch, uint16_t value, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D16Async (VEDAhmemptr dstDevice, size_t dstPitch, uint16_t value, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D32 (VEDAhmemptr dstDevice, size_t dstPitch, uint32_t value, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D32Async (VEDAhmemptr dstDevice, size_t dstPitch, uint32_t value, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D64 (VEDAhmemptr dstDevice, size_t dstPitch, uint64_t value, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D64Async (VEDAhmemptr dstDevice, size_t dstPitch, uint64_t value, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D8 (VEDAhmemptr dstDevice, size_t dstPitch, uint8_t value, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD2D8Async (VEDAhmemptr dstDevice, size_t dstPitch, uint8_t value, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD32 (VEDAhmemptr dstDevice, uint32_t value, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD32Async (VEDAhmemptr dstDevice, uint32_t value, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD64 (VEDAhmemptr dstDevice, uint64_t value, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD64Async (VEDAhmemptr dstDevice, uint64_t value, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD8 (VEDAhmemptr dstDevice, uint8_t value, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaHMemsetD8Async (VEDAhmemptr dstDevice, uint8_t value, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaArgsSetPtr (VEDAargs args, const int idx, const VEDAdeviceptr value) |
Initialize the VEDA function arguments as a device memory location. More... | |
VEDAresult | vedaArgsSetVPtr (VEDAargs args, const int idx, const VEDAdeviceptr value) |
Initialize the VEDA function arguments as a host memory location. More... | |
VEDAresult | vedaMemAlloc (VEDAdeviceptr *ptr, size_t size) |
Allocates VEDA device memory. More... | |
VEDAresult | vedaMemAllocAsync (VEDAdeviceptr *ptr, size_t size, VEDAstream stream) |
Allocates memory with stream ordered semantics. More... | |
VEDAresult | vedaMemAllocOverrideOnce (VEDAdeviceptr ptr) |
Overrides the pointer returned by the next call to vedaMemAllocAsync. More... | |
VEDAresult | vedaMemAllocPitch (VEDAdeviceptr *dptr, size_t *pPitch, size_t WidthInBytes, size_t Height, uint32_t ElementSizeByte) |
Allocates pitched device memory. More... | |
VEDAresult | vedaMemAllocPitchAsync (VEDAdeviceptr *dptr, size_t *pPitch, size_t WidthInBytes, size_t Height, uint32_t ElementSizeByte, VEDAstream stream) |
Allocates pitched device memory with stream order symantics. More... | |
VEDAresult | vedaMemFree (VEDAdeviceptr ptr) |
Frees device memory. More... | |
VEDAresult | vedaMemFreeAsync (VEDAdeviceptr ptr, VEDAstream stream) |
Frees device memory with stream ordered semantics. More... | |
VEDAresult | vedaMemGetAddressRange (VEDAdeviceptr *base, size_t *size, VEDAdeviceptr vptr) |
Get information on memory allocations. More... | |
VEDAresult | vedaMemGetDevice (VEDAdevice *dev, VEDAdeviceptr ptr) |
Get the VEDA device information correspoding to the Device pointer. More... | |
VEDAresult | vedaMemPtr (void **ptr, VEDAdeviceptr vptr) |
Gets the VEDA device address for the given VEDA device virtual address. More... | |
VEDAresult | vedaMemPtrSize (void **ptr, size_t *size, VEDAdeviceptr vptr) |
Gets the VEDA device address and allocation size against the given VEDA device virtual address. More... | |
VEDAresult | vedaMemReport (void) |
Prints the memory information of each Intialized VEDA device. More... | |
VEDAresult | vedaMemSize (size_t *size, VEDAdeviceptr vptr) |
Gets the VEDA memory size in bytes for the given VEDA device virtual address. More... | |
VEDAresult | vedaMemSwap (VEDAdeviceptr A, VEDAdeviceptr B) |
Swaps the underlying buffer of two device pointers. More... | |
VEDAresult | vedaMemSwapAsync (VEDAdeviceptr A, VEDAdeviceptr B, VEDAstream stream) |
Swaps the underlying buffer of two device pointers. More... | |
VEDAresult | vedaMemcpy (VEDAdeviceptr dst, VEDAdeviceptr src, size_t ByteCount) |
Copies Memory. More... | |
VEDAresult | vedaMemcpyAsync (VEDAdeviceptr dst, VEDAdeviceptr src, size_t ByteCount, VEDAstream hStream) |
Copies Memory Asynchronously. More... | |
VEDAresult | vedaMemcpyDtoD (VEDAdeviceptr dstDevice, VEDAdeviceptr srcDevice, size_t ByteCount) |
Copies Memory from VEDA Device to VEDA Device. More... | |
VEDAresult | vedaMemcpyDtoDAsync (VEDAdeviceptr dst, VEDAdeviceptr src, size_t size, VEDAstream hStream) |
Copies Memory from VEDA device to VEDA device Asynchronously. More... | |
VEDAresult | vedaMemcpyDtoH (void *dstHost, VEDAdeviceptr srcDevice, size_t ByteCount) |
Copies Memory from VEDA Device to Host. More... | |
VEDAresult | vedaMemcpyDtoHAsync (void *dstHost, VEDAdeviceptr srcDevice, size_t ByteCount, VEDAstream hStream) |
Copies Memory from VEDA device to Host Asynchronously. More... | |
VEDAresult | vedaMemcpyHtoD (VEDAdeviceptr dstDevice, const void *srcHost, size_t ByteCount) |
Copies Memory from Host to VEDA Device. More... | |
VEDAresult | vedaMemcpyHtoDAsync (VEDAdeviceptr dstDevice, const void *srcHost, size_t ByteCount, VEDAstream hStream) |
Copies Memory from Host to VEDA device Asynchronously. More... | |
VEDAresult | vedaMemsetD128 (VEDAdeviceptr dstDevice, uint64_t x, uint64_t y, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD128Async (VEDAdeviceptr dstDevice, uint64_t x, uint64_t y, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD16 (VEDAdeviceptr dstDevice, uint16_t value, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD16Async (VEDAdeviceptr dstDevice, uint16_t value, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D128 (VEDAdeviceptr dstDevice, size_t dstPitch, uint64_t x, uint64_t y, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D128Async (VEDAdeviceptr dstDevice, size_t dstPitch, uint64_t x, uint64_t y, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D16 (VEDAdeviceptr dstDevice, size_t dstPitch, uint16_t value, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D16Async (VEDAdeviceptr dstDevice, size_t dstPitch, uint16_t value, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D32 (VEDAdeviceptr dstDevice, size_t dstPitch, uint32_t value, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D32Async (VEDAdeviceptr dstDevice, size_t dstPitch, uint32_t value, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D64 (VEDAdeviceptr dstDevice, size_t dstPitch, uint64_t value, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D64Async (VEDAdeviceptr dstDevice, size_t dstPitch, uint64_t value, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D8 (VEDAdeviceptr dstDevice, size_t dstPitch, uint8_t value, size_t Width, size_t Height) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD2D8Async (VEDAdeviceptr dstDevice, size_t dstPitch, uint8_t value, size_t Width, size_t Height, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD32 (VEDAdeviceptr dstDevice, uint32_t value, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD32Async (VEDAdeviceptr dstDevice, uint32_t value, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD64 (VEDAdeviceptr dstDevice, uint64_t value, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD64Async (VEDAdeviceptr dstDevice, uint64_t value, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD8 (VEDAdeviceptr dstDevice, uint8_t value, size_t N) |
Initializes device memory. More... | |
VEDAresult | vedaMemsetD8Async (VEDAdeviceptr dstDevice, uint8_t value, size_t N, VEDAstream hStream) |
Initializes device memory. More... | |
Variables | |
uint64_t | uint128_t::x |
uint64_t | uint128_t::y |
To use VEDA API functions, include "veda.h" header.
VEDAresult vedaMemsetD16 | ( | void * | ptr, |
const uint16_t | value, | ||
const size_t | cnt | ||
) |
Gets the Error name matching error code.
error | Error code. |
pStr | Pointer to error string corresponding to Error Code. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_UNKNOWN | This is set when error doesn't match. |
VEDAresult vedaArgsCreate | ( | VEDAargs * | args | ) |
Instantiate the VEDA function argument handler.
args | Handle for VEDA function argument handler |
Further with the help of this VEDA function argument handler VEDA hybrid programmer can set the arguments for the VEDA device function.
VEDAresult vedaArgsDestroy | ( | VEDAargs | args | ) |
Destroy the VEDA function argument handler.
args | Handle for VEDA function argument handler |
VEDAresult vedaArgsSetF32 | ( | VEDAargs | args, |
const int | idx, | ||
const float | value | ||
) |
Initialize the VEDA function arguments for single precision floating point value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetF64 | ( | VEDAargs | args, |
const int | idx, | ||
const double | value | ||
) |
Initialize the VEDA function arguments for double precision floating point value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetI16 | ( | VEDAargs | args, |
const int | idx, | ||
const int16_t | value | ||
) |
Initialize the VEDA function arguments for 16 bit integer value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetI32 | ( | VEDAargs | args, |
const int | idx, | ||
const int32_t | value | ||
) |
Initialize the VEDA function arguments for 32 bit integer value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetI64 | ( | VEDAargs | args, |
const int | idx, | ||
const int64_t | value | ||
) |
Initialize the VEDA function arguments for 64 bit integer value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetI8 | ( | VEDAargs | args, |
const int | idx, | ||
const int8_t | value | ||
) |
Initialize the VEDA function arguments for 8 bit integer value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetStack | ( | VEDAargs | args, |
const int | idx, | ||
void * | ptr, | ||
VEDAargs_intent | intent, | ||
const size_t | size | ||
) |
Initialize the VEDA function arguments to the buffer on stack.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
ptr | Pointer to the buffer which needs to be copied to the VEDA device function stack. |
intent | Defines the intent of the buffer as below – VEDA_ARGS_INTENT_IN – If the buffer should be treated as the Input buffer to the VEDA device function. VEDA_ARGS_INTENT_OUT – If the buffer should be treated as the Output buffer to the VEDA device function and some output is expected. VEDA_ARGS_INTENT_INOUT – If the buffer should be treated as both Input and Output. |
size | Size of the buffer. |
Set the VEDA function argument to the buffer on stack.
VEDAresult vedaArgsSetU16 | ( | VEDAargs | args, |
const int | idx, | ||
const uint16_t | value | ||
) |
Initialize the VEDA function arguments for 16 bit unsigned integer value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetU32 | ( | VEDAargs | args, |
const int | idx, | ||
const uint32_t | value | ||
) |
Initialize the VEDA function arguments for 32 bit unsigned integer value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetU64 | ( | VEDAargs | args, |
const int | idx, | ||
const uint64_t | value | ||
) |
Initialize the VEDA function arguments for 64 bit unsigned integer value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaArgsSetU8 | ( | VEDAargs | args, |
const int | idx, | ||
const uint8_t | value | ||
) |
Initialize the VEDA function arguments for 8 bit unsigned integer value.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
VEDAresult vedaCtxCreate | ( | VEDAcontext * | pctx, |
int | mode, | ||
VEDAdevice | dev | ||
) |
Create a VEDA context.
pctx | Returned context handle of the new context. |
mode | Context mode may contain below two values – VEDA_CONTEXT_MODE_OMP VEDA_CONTEXT_MODE_SCALAR |
dev | Device to create context on |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_CANNOT_CREATE_CONTEXT | Error while creating VEDA context. |
VEDA_ERROR_CANNOT_CREATE_STREAM | error while creating VEDA SM. |
Creates a new VEDA context and associates it with the calling thread. The flags parameter is described below. The caller of vedaCtxCreate() must call vedaCtxDestroy() or when done using the context. If any context is already current to the thread, it is changed by the newly created context and it may be restored by a subsequent call to vedaCtxPopCurrent().
VEDA Context may be created with below two flags-
VEDA_CONTEXT_MODE_OMP: In this mode, number of streaming multiprocessor(SM) is always 1. However, in this mode the number of OPENMP threads in each VEDA SM is configured as the minimum value between the number of cores of the VEDA device and the user configured value for the number of OPENMP threads on VE device (set through environment variable).
VEDA_CONTEXT_MODE_SCALAR: : In this mode number of streaming multiprocessor(SM) are the minimum value between the number of cores of the VEDA device and the user configured value for the number of OPENMP threads on VE device (set through environment variable). However, in this mode number of OPENMP threads in each VEDA SM is configured as 1.
VEDAresult vedaCtxDestroy | ( | VEDAcontext | ctx | ) |
Destroy a VEDA context.
ctx | Context to destroy. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
Destroys the VEDA context specified by ctx. The context ctx will be destroyed regardless of how many threads it is current to. It is the responsibility of the calling function to ensure that no API call issues using ctx while vedaCtxDestroy() is executing. Destroys and cleans up all resources associated with the context. It is the caller's responsibility to ensure that the context or its resources are not accessed or passed in subsequent API calls and doing so will result in undefined behavior. These resources include VEDA types such as VEDAmodule, VEDAfunction, VEDAstream. If ctx is current to the calling thread then ctx will also be popped from the current thread's context stack (as though vedaCtxPopCurrent() were called). If ctx is current to other threads, then ctx will remain current to those threads, and attempting to access ctx from those threads will result in the error VEDA_ERROR_CONTEXT_IS_DESTROYED.
VEDAresult vedaCtxGet | ( | VEDAcontext * | ctx, |
const VEDAdevice | device | ||
) |
Retrieve the VEDA Context bound to the VEDA device.
ctx | VEDA Context handle. |
device | VEDA device ID. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaCtxGetApiVersion | ( | VEDAcontext | ctx, |
uint32_t * | version | ||
) |
Gets the context's API version.
ctx | Context to check. |
version | Pointer to hold the version. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaCtxGetCurrent | ( | VEDAcontext * | pctx | ) |
Returns the VEDA context bound to the calling CPU thread.
pctx | Returned context handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns in *pctx the VEDA context bound to the calling CPU thread. If no context is bound to the calling CPU thread then *pctx is set to NULL and VEDA_SUCCESS is returned.
VEDAresult vedaCtxGetDevice | ( | VEDAdevice * | device | ) |
Returns the device ID for the current context.
device | Returned device ID for the current context. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns in *device the ordinal of the current context's device.
VEDAresult vedaCtxPopCurrent | ( | VEDAcontext * | pctx | ) |
Pops the current VEDA context from the current CPU thread.
pctx | Returned new context handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Pops the current VEDA context from the CPU thread and passes back the old context handle in *pctx. That context may then be made current to a different CPU thread by calling vedaCtxPushCurrent().
If a context was current to the CPU thread before vedaCtxCreate() or vedaCtxPushCurrent() was called, this function makes that context current to the CPU thread again.
VEDAresult vedaCtxPushCurrent | ( | VEDAcontext | ctx | ) |
Pushes a context on the current CPU thread.
ctx | Context to push. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Pushes the given context ctx onto the CPU thread's stack of current contexts. The specified context becomes the CPU thread's current context, so all VEDA functions that operate on the current context are affected. The previous current context may be made current again by calling vedaCtxDestroy() or vedaCtxPopCurrent().
VEDAresult vedaCtxSetCurrent | ( | VEDAcontext | ctx | ) |
Binds the specified VEDA context to the calling CPU thread.
ctx | Context to bind to the calling CPU thread. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Binds the specified VEDA context to the calling CPU thread. If ctx is NULL then the VEDA context previously bound to the calling CPU thread is unbound and VEDA_SUCCESS is returned.
If there exists a VEDA context stack on the calling CPU thread, this will replace the top of that stack with ctx. If ctx is NULL then this will be equivalent to popping the top of the calling CPU thread's VEDA context stack (or a no-op if the calling CPU thread's VEDA context stackis empty).
VEDAresult vedaCtxStreamCnt | ( | int * | cnt | ) |
Gets the VEDA SM count.
cnt | pointer to hold the VEDA SM count. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns the VEDA SM count of the VEDA context bound to the calling CPU thread.
VEDAresult vedaCtxSynchronize | ( | void | ) |
Block for a context's tasks to complete.
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Blocks until the device has completed all preceding requested tasks. vedaCtxSynchronize() returns an error if one of the preceding tasks failed.
VEDAresult vedaDeviceDistance | ( | float * | distance, |
VEDAdevice | devA, | ||
VEDAdevice | devB | ||
) |
Retrieve the distance of the two given VEDA devices.
distance | pointer to hold the distance. |
devA | handle to the first VEDA device. |
devB | handle to the second VEDA device. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Returns following value of distances:
0: if both the VEDA devices are initialized on the same VE device.
0.5: if both the VEDA devices are initialized on the difference NUMA node of the same VE device.
1: if both the VEDA devices are initialized on the difference VE node.
VEDAresult vedaDeviceGet | ( | VEDAdevice * | device, |
int | ordinal | ||
) |
Returns a handle to compute VEDA Device.
device | pointer to hold the VEDA device handle. |
ordinal | VEDA device number to get the VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDeviceGetAVEOId | ( | int * | id, |
VEDAdevice | dev | ||
) |
Retrieve the AVEO ID of the given VEDA device.
id | pointer to hold the AVEO id of the VEDA device |
dev | VEDA device ID. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
AVEO ID is the logical node ID of the underlying VE node assigned by the VEOS at the time of the VE node initialization.
VEDAresult vedaDeviceGetAttribute | ( | int * | pi, |
VEDAdevice_attribute | attrib, | ||
VEDAdevice | dev | ||
) |
Returns information about the VEDA device.
pi | Returned VEDA device attribute value. |
attrib | VEDA Device attribute to query. |
dev | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Returns in *pi the integer value of the attribute attrib on device dev. The supported attributes are:
VEDA_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO: VEDA precision ratio.
VEDA_DEVICE_ATTRIBUTE_CLOCK_RATE: Clock chip clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_CLOCK_BASE: Clock Base clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: Number of VE cores corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE: Clock memory clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_L1D_CACHE_SIZE: Size of the L1 cache of the device of VEDA device.
VEDA_DEVICE_ATTRIBUTE_L1I_CACHE_SIZE: Size of L1 instruction cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_L2_CACHE_SIZE: Size of L2 data cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_LLC_CACHE_SIZE: Size of last level cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_MODEL: VE device model corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_ABI_VERSION: VE device ABI version corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_FIREWARE_VERSION: VE device firmware version corresponding to VEDA device.
VEDAresult vedaDeviceGetCount | ( | int * | count | ) |
Retrieve the number of initialized VEDA device.
count | pointer to hold the count of the VEDA device. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDeviceGetCurrent | ( | float * | current, |
VEDAdevice | dev | ||
) |
Returns a VE device AUX current corresponding to VEDA Device.
current | pointer to hold the VE device voltage. |
dev | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDeviceGetCurrentEdge | ( | float * | current, |
VEDAdevice | dev | ||
) |
Returns a VE device PCIe edge current corresponding to VEDA Device.
current | pointer to hold the VE device current. |
dev | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDeviceGetNUMAId | ( | int * | id, |
VEDAdevice | dev | ||
) |
Retrieve the NUMA ID of the given VEDA device.
id | pointer to hold the NUMA id of the VEDA device |
dev | VEDA device ID. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
if VE device is not configured in NUMA mode then this ID will be 0..
VEDAresult vedaDeviceGetName | ( | char * | name, |
int | len, | ||
VEDAdevice | dev | ||
) |
Returns an identifer string for the VEDA device.
name | Returned identifier string for the VEDA device. |
len | Maximum length of string to store in name. |
dev | Device to get the identifier string |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Returns an ASCII string identifying the device dev in the NULL-terminated string pointed to by name. len specifies the maximum length of the string that may be returned.
VEDAresult vedaDeviceGetPhysicalId | ( | int * | id, |
VEDAdevice | dev | ||
) |
Retrieve the Physical ID of the given VEDA device.
id | pointer to hold the physical id of the VEDA device |
dev | VEDA device ID. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Physical ID is the Slot ID of the underlying VE node, physical ID is used internally to retrieve the VE node information like VE node temperature, voltage etc. from the VE device file.
VEDAresult vedaDeviceGetPower | ( | float * | watts, |
VEDAdevice | dev | ||
) |
Returns a VE device power corresponding to VEDA Device.
watts | pointer to hold the VE device power. |
dev | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Calculated VE device power includes both the PCIe edge power as well as the VE device AUX power with added 5W.
VEDAresult vedaDeviceGetTemp | ( | float * | tempC, |
const int | idx, | ||
VEDAdevice | dev | ||
) |
Retrieve the temperature of the specified location on the VEDA device in Celsius.
tempC | pointer to hold the temperature. |
idx | location index on the VEDA device. |
dev | VEDA device ID. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_VALUE | location index is invalid. |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDeviceGetVoltage | ( | float * | voltage, |
VEDAdevice | dev | ||
) |
Returns a VE device AUX voltage corresponding to VEDA Device.
voltage | pointer to hold the VE device voltage. |
dev | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDeviceGetVoltageEdge | ( | float * | voltage, |
VEDAdevice | dev | ||
) |
Returns a VE device PCIe edge voltage corresponding to VEDA Device.
voltage | pointer to hold the VE device voltage. |
dev | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDevicePrimaryCtxGetState | ( | VEDAdevice | dev, |
uint32_t * | flags, | ||
int * | active | ||
) |
Get the state of the primary context.
dev | VEDA Device to get the primary context flags for. |
flags | Pointer to store flags |
active | Pointer to store context state; 0 = inactive, 1 = active. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDevicePrimaryCtxRelease | ( | VEDAdevice | dev | ) |
This function is not yet implemented.
dev |
This function is not yet implemented but return VEDA_SUCCESS while calling it.
VEDAresult vedaDevicePrimaryCtxReset | ( | VEDAdevice | dev | ) |
Destroy all allocations and reset all state on the primary context.
dev | VEDA Device for which primary context is destroyed. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_CANNOT_CREATE_CONTEXT | Error while creating VEDA context. |
VEDA_ERROR_CANNOT_CREATE_STREAM | error while creating VEDA SM. |
Explicitly destroys and cleans up all resources associated with the current device in the current process.
VEDAresult vedaDevicePrimaryCtxRetain | ( | VEDAcontext * | pctx, |
VEDAdevice | dev | ||
) |
Retain the primary Context on the VEDA device.
pctx | Returned context handle of the new VEDA context. |
dev | VEDA Device for which primary context is released. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_CANNOT_CREATE_CONTEXT | Error while creating VEDA context. |
VEDA_ERROR_CANNOT_CREATE_STREAM | error while creating VEDA SM. |
Retains the primary context on the device. Once the user successfully retains the primary context, the primary context will be active and available to the user until the user resets it with vedaDevicePrimaryCtxReset(). Unlike vedaCtxCreate() the newly retained context is not pushed onto the stack.
VEDAresult vedaDevicePrimaryCtxSetFlags | ( | VEDAdevice | dev, |
uint32_t | flags | ||
) |
This function is not yet implemented.
dev | |
flags |
This function is not yet implemented but return VEDA_SUCCESS while calling it.
VEDAresult vedaDeviceTotalMem | ( | size_t * | bytes, |
VEDAdevice | dev | ||
) |
Retrieve the total memory of the VEDA device in bytes.
bytes | pointer to hold the VEDA device memory. |
dev | VEDA device ID. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaDriverGetVersion | ( | const char ** | str | ) |
Return the latest AVEO version supported by VEDA.
str | Pointer to hold the AVEO version. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDAresult vedaExit | ( | void | ) |
Releases the VEDA driver API library gracefully.
VEDA_SUCCESS | on Success |
This function should be called from the hybrid program in order to perform the proper cleanup of the VEDA driver library.
VEDAresult vedaGetErrorName | ( | VEDAresult | error, |
const char ** | pStr | ||
) |
Gets the Error name matching error code.
error | Error code. |
pStr | Pointer to error string corresponding to Error Code. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_UNKNOWN | This is set when error doesn't match. |
VEDAresult vedaGetErrorString | ( | VEDAresult | error, |
const char ** | pStr | ||
) |
Gets the Error string matching error code.
error | Error Code. |
pStr | Pointer to error string corresponding to Error Code. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_UNKNOWN | This is set when error doesn't match. |
VEDAresult vedaGetVersion | ( | const char ** | str | ) |
Return the latest VEDA version.
str | Pointer to hold the VEDA version. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDAresult vedaInit | ( | uint32_t | Flags | ) |
Initialize the VEDA driver API library.
Flags | Initialization flags for VEDA library. |
VEDA_SUCCESS | on Success |
Initializes the driver API and must be called before any other function of the VEDA driver API. Currently, the Flags parameter must be 0. If vedaInit() has not been called, any function from the driver API will return VEDA_ERROR_NOT_INITIALIZED.
VEDAresult vedaLaunchHostFunc | ( | VEDAstream | stream, |
VEDAhost_function | fn, | ||
void * | userData | ||
) |
Enqueues a host function call in a stream.
stream | Stream Identifier. |
fn | The function to call once preceding stream operations are complete. |
userData | User-specified data to be passed to the function. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Enqueues a host function to run in a stream. The function will be called after currently enqueued work and will block work added after it.
VEDAresult vedaLaunchHostFuncEx | ( | VEDAstream | stream, |
VEDAhost_function | fn, | ||
void * | userData, | ||
uint64_t * | result | ||
) |
Enqueues a host function call in a stream.
stream | Stream Identifier. |
fn | The function to call once preceding stream operations are complete. |
userData | User-specified data to be passed to the function. |
result | If non-zero, the function return value gets written into the buffer. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Enqueues a host function to run in a stream. The function will be called after currently enqueued work and will block work added after it. |
VEDAresult vedaLaunchKernel | ( | VEDAfunction | f, |
VEDAstream | stream, | ||
VEDAargs | args | ||
) |
Enqueues a VEDA device function f on the VEDA device.
f | Handle to VEDA Device function to launch. |
stream | Stream Identifier. |
args | Handle to the VEDA device parameters |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA device function arguements can be allocated and set through the vedaArgsCreate and vedaArgsSet* APIs.
VEDAresult vedaLaunchKernelEx | ( | VEDAfunction | f, |
VEDAstream | stream, | ||
VEDAargs | args, | ||
const int | destroyArgs, | ||
uint64_t * | result | ||
) |
Enqueues a VEDA device function f on the VEDA device with flexibility.
f | Handle to VEDA Device function to launch. |
stream | Stream Identifier. |
args | Handle to the VEDA device parameters. |
destroyArgs | Set 1 if the VEDA arguement needs to be destroyed after VEDA device function is called else 0. |
result | If set, the function return value will be copied to this pointer. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDAresult vedaMemAllocHost | ( | void ** | pp, |
size_t | bytesize | ||
) |
Allocates host memory.
pp | Returned host pointer |
bytesize | Requested allocation size in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | Host memory exausted. |
VEDAresult vedaMemFreeHost | ( | void * | ptr | ) |
Frees host memory.
ptr | Pointer to memory to free. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Frees the memory space pointed to by dptr, which must have been returned by a previous call to vedaMemAllocHost().
VEDAresult vedaMemGetInfo | ( | size_t * | free, |
size_t * | total | ||
) |
Gets free and total memory.
free | Returned free memory in bytes. |
total | Returned total memory in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns in *total the total amount of memory available to the the current context. Returns in *free the amount of memory on the VEDA device that is free.
VEDAresult vedaModuleGetFunction | ( | VEDAfunction * | hfunc, |
VEDAmodule | hmod, | ||
const char * | name | ||
) |
Return the VE address of the VEDA device function located in VEDA module.
hfunc | Buffer to hold the VE address of the VEDA device function. |
hmod | handle to the VEDA module corresponding to the VE device code. |
name | Name of the VEDA device function for which the VE address is required. |
VEDAresult vedaModuleLoad | ( | VEDAmodule * | module, |
const char * | fname | ||
) |
To load the VE device code into the VE memory.
module | Pointer to hold the reference of the VEDA module. |
fname | Library name of the file name containing VE device code. |
VEDAresult vedaModuleUnload | ( | VEDAmodule | hmod | ) |
To unload/remove the VE device code from the VE memory.
hmod | Pointer to the VEDA module corresponding to the VE device code.. |
VEDAresult vedaStreamAddCallback | ( | VEDAstream | stream, |
VEDAstream_callback | callback, | ||
void * | userData, | ||
unsigned int | flags | ||
) |
Add a callback to a compute stream.
stream | Determine status of a compute stream. |
callback | The function to call once preceding stream operations are complete. |
userData | User specified data to be passed to the callback function. |
flags | Reserved for future use, must be 0. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Adds a callback to be called on the host after all currently enqueued items in the stream have completed. |
VEDAresult vedaStreamGetFlags | ( | VEDAstream | hStream, |
uint32_t * | flags | ||
) |
Query the flags of a given stream.
hStream | Handle to the stream to be queried |
flags | Pointer to an unsigned integer in which the stream's flags are returned. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaStreamQuery | ( | VEDAstream | hStream | ) |
Determine status of a compute stream.
hStream | Determine status of a compute stream. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Returns CUDA_SUCCESS if all operations in the stream specified by hStream have completed |
VEDAresult vedaStreamSynchronize | ( | VEDAstream | hStream | ) |
Wait until a stream's tasks are completed.
hStream | Determine status of a compute stream. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Waits until the device has completed all operations in the stream specified by hStream.
VEDAresult vedaLaunchKernelEx_compat | ( | VEDAfunction | f, |
VEDAstream | stream, | ||
VEDAargs | args, | ||
const int | destroyArgs | ||
) |
This function is used as backward compatibility for vedaLaunchKernelEx() in version 2.12.1 and above.
Enqueues a VEDA device function f on the VEDA device with flexibility.
f | Handle to VEDA Device function to launch. |
stream | Stream Identifier. |
args | Handle to the VEDA device parameters. |
destroyArgs | Set 1 if the VEDA arguement needs to be destroyed after VEDA device function is called else 0. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDAresult vedaArgsSetHMEM | ( | VEDAargs | args, |
const int | idx, | ||
const VEDAhmemptr | value | ||
) |
Initialize the VEDA function arguments by converting the heterogeneous memory address to raw device memory address.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
Set the VEDA device memory address as an argument by converting the heterogeneous memory address to VEDA device memory address.
VEDAresult vedaHMemAlloc | ( | VEDAhmemptr * | ptr, |
size_t | size | ||
) |
Allocates HMEM device memory.
ptr | Returned HMEM device pointer |
size | Requested allocation size in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | VEDA device memory exausted. |
Allocates size bytes of linear memory on the HMEM device and returns in *ptr a pointer to the allocated memory.
VEDAresult vedaHMemFree | ( | VEDAhmemptr | ptr | ) |
Frees HMEM memory.
ptr | Pointer to memory to free. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_UNKNOWN_HMEM | Unknown HMEM ptr. |
Frees the memory space pointed to by dptr, which must have been returned by a previous call to vedaHMemAlloc().
VEDAresult vedaHMemPtr | ( | void ** | ptr, |
VEDAhmemptr | hptr | ||
) |
Gets the VE device address for the given HMEM ptr.
ptr | Pointer to hold the VEDA device address. |
hptr | Pointer containing the VEDA device virtual address. |
VEDA_SUCCESS | on Success |
VEDAresult vedaHMemcpy | ( | void * | dst, |
void * | src, | ||
size_t | ByteCount | ||
) |
Copies Memory.
dst | Destination address pointer. |
src | Source address pointer. |
ByteCount | Size of memory copy in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_INVALID_VALUE | Invalid input ptrs or ByteCount. |
Copies data between two pointers. dst and src are base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaHMemcpyDtoX | ( | void * | dst, |
VEDAdeviceptr | src, | ||
size_t | ByteCount | ||
) |
Copies Memory from VEDA device to HMEM.
dst | Destination HMEM pointer. |
src | Source device pointer. |
ByteCount | Size of memory copy in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from VEDA device to HMEM memory. dst and src are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaHMemcpyDtoXAsync | ( | void * | dst, |
VEDAdeviceptr | src, | ||
size_t | ByteCount, | ||
VEDAstream | hStream | ||
) |
Copies Memory from VEDA device to HMEM Asynchronously.
dst | Destination virtual address pointer. |
src | Source virtual address pointer. |
ByteCount | Size of memory copy in bytes. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from device memory to HMEM. dst and src are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaHMemcpyXtoD | ( | VEDAdeviceptr | dst, |
void * | src, | ||
size_t | ByteCount | ||
) |
Copies Memory from HMEM to VEDA Device.
dst | Destination device pointer. |
src | Source HMEM pointer. |
ByteCount | Size of memory copy in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from HMEM memory to device. dst and src are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaHMemcpyXtoDAsync | ( | VEDAdeviceptr | dst, |
void * | src, | ||
size_t | ByteCount, | ||
VEDAstream | hStream | ||
) |
Copies Memory from HMEM to VEDAdevice Asynchronously.
dst | Destination virtual address pointer. |
src | Source virtual address pointer. |
ByteCount | Size of memory copy in bytes. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from HMEM to device memory. dst and src are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaHMemsetD128 | ( | VEDAhmemptr | dstDevice, |
uint64_t | x, | ||
uint64_t | y, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
x | first 64bit value |
y | second 64bit value |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 128-bit values to the specified value us. |
VEDAresult vedaHMemsetD128Async | ( | VEDAhmemptr | dstDevice, |
uint64_t | x, | ||
uint64_t | y, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
x | first 64bit value |
y | second 64bit value |
N | Number of Elements. |
hStream | Stream |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 128-bit values to the specified value us. |
VEDAresult vedaHMemsetD16 | ( | VEDAhmemptr | dstDevice, |
uint16_t | value, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 16-bit values to the specified value "value". |
VEDAresult vedaHMemsetD16Async | ( | VEDAhmemptr | dstDevice, |
uint16_t | value, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 16-bit values to the specified value value. |
VEDAresult vedaHMemsetD2D128 | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint64_t | x, | ||
uint64_t | y, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | memory pitch |
x | first 64bit value |
y | second 64bit value |
Width | Width of 2D memset. |
Height | Height of 2D memset. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 128-bit values to the specified value us. |
VEDAresult vedaHMemsetD2D128Async | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint64_t | x, | ||
uint64_t | y, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | memory pitch |
x | first 64bit value |
y | second 64bit value |
Width | Width of 2D memset. |
Height | Height of 2D memset. |
hStream | stream |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 128-bit values to the specified value us. |
VEDAresult vedaHMemsetD2D16 | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint16_t | value, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 16-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaHMemsetD2D16Async | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint16_t | value, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 16-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaHMemsetD2D32 | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint32_t | value, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 32-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaHMemsetD2D32Async | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint32_t | value, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 32-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaHMemsetD2D64 | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint64_t | value, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | memory pitch. |
value | 32bit value. |
Width | Width of 2D memset. |
Height | Height of 2D memset. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 64-bit values to the specified value "value". |
VEDAresult vedaHMemsetD2D64Async | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint64_t | value, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set |
Width | Width of row. |
Height | Number of rows. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 16-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaHMemsetD2D8 | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint8_t | value, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 8-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaHMemsetD2D8Async | ( | VEDAhmemptr | dstDevice, |
size_t | dstPitch, | ||
uint8_t | value, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 8-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaHMemsetD32 | ( | VEDAhmemptr | dstDevice, |
uint32_t | value, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 32-bit values to the specified value "value". |
VEDAresult vedaHMemsetD32Async | ( | VEDAhmemptr | dstDevice, |
uint32_t | value, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 32-bit values to the specified value "value". |
VEDAresult vedaHMemsetD64 | ( | VEDAhmemptr | dstDevice, |
uint64_t | value, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 64-bit values to the specified value "value". |
VEDAresult vedaHMemsetD64Async | ( | VEDAhmemptr | dstDevice, |
uint64_t | value, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 64-bit values to the specified value "value". |
VEDAresult vedaHMemsetD8 | ( | VEDAhmemptr | dstDevice, |
uint8_t | value, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 8-bit values to the specified value "value". |
VEDAresult vedaHMemsetD8Async | ( | VEDAhmemptr | dstDevice, |
uint8_t | value, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | HMEM Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 8-bit values to the specified value "value". |
VEDAresult vedaArgsSetPtr | ( | VEDAargs | args, |
const int | idx, | ||
const VEDAdeviceptr | value | ||
) |
Initialize the VEDA function arguments as a device memory location.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
Set the VEDA device memory location as an argument
VEDAresult vedaArgsSetVPtr | ( | VEDAargs | args, |
const int | idx, | ||
const VEDAdeviceptr | value | ||
) |
Initialize the VEDA function arguments as a host memory location.
args | Handle to VEDA function argument. |
idx | VEDA function argument number |
value | Value to be set for the VEDA function argument. |
Set the VEDA host memory location as an argument.
VEDAresult vedaMemAlloc | ( | VEDAdeviceptr * | ptr, |
size_t | size | ||
) |
Allocates VEDA device memory.
ptr | Returned VEDA device pointer |
size | Requested allocation size in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | VEDA device memory exausted. |
Allocates size bytes of linear memory on the VEDA device and returns in *ptr a pointer to the allocated memory.
VEDAresult vedaMemAllocAsync | ( | VEDAdeviceptr * | ptr, |
size_t | size, | ||
VEDAstream | stream | ||
) |
Allocates memory with stream ordered semantics.
ptr | Returned VEDA device pointer |
size | Requested allocation size in bytes. |
stream | The stream establishing the stream ordering contract and the memory pool to allocate from |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | VEDA device memory exausted. |
Inserts an allocation operation into stream. A pointer to the allocated memory is returned immediately in *ptr. The allocation must not be accessed until the the allocation operation completes.
VEDAresult vedaMemAllocOverrideOnce | ( | VEDAdeviceptr | ptr | ) |
Overrides the pointer returned by the next call to vedaMemAllocAsync.
ptr | Pointer of type VEDAdeviceptr to override |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OFFSET_NOT_ALLOWED | Only non-offsetted pointers are allowed. |
You probably don't need to use this method ever. It's a hack to override the allocation size of the next call to vedaMemAllocAsync. I.e. if you have allocated memory on VE, but you need to load that data into an opaque data structure that is not under your control, but that calls vedaMemAllocAsync, you can use vedaMemAllocOverrideOnce to return this pointer instead.
VEDAresult vedaMemAllocPitch | ( | VEDAdeviceptr * | dptr, |
size_t * | pPitch, | ||
size_t | WidthInBytes, | ||
size_t | Height, | ||
uint32_t | ElementSizeByte | ||
) |
Allocates pitched device memory.
dptr | Returned device pointer |
pPitch | Returned pitch of allocation in bytes. |
WidthInBytes | Requested allocation width in bytes |
Height | Requested allocation height in rows |
ElementSizeByte | Size of largest reads/writes for range |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | Host memory exausted. |
Allocates at least WidthInBytes * Height bytes of linear memory on the device and returns in *dptr a pointer to the allocated memory. The pitch returned in *pPitch by vedaMemAllocPitch() is the width in bytes of the allocation.
VEDAresult vedaMemAllocPitchAsync | ( | VEDAdeviceptr * | dptr, |
size_t * | pPitch, | ||
size_t | WidthInBytes, | ||
size_t | Height, | ||
uint32_t | ElementSizeByte, | ||
VEDAstream | stream | ||
) |
Allocates pitched device memory with stream order symantics.
dptr | Returned device pointer |
pPitch | Returned pitch of allocation in bytes. |
WidthInBytes | Requested allocation width in bytes |
Height | Requested allocation height in rows |
ElementSizeByte | Size of largest reads/writes for range |
stream | The stream establishing the stream ordering contract and the memory pool to allocate from |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | Host memory exausted. |
Allocates at least WidthInBytes * Height bytes of linear memory on the device and returns in *dptr a pointer to the allocated memory. The pitch returned in *pPitch by vedaMemAllocPitch() is the width in bytes of the allocation.
VEDAresult vedaMemFree | ( | VEDAdeviceptr | ptr | ) |
Frees device memory.
ptr | Pointer to memory to free. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Frees the memory space pointed to by dptr, which must have been returned by a previous call to vedaMemAlloc() or vedaMemAllocPitch().
VEDAresult vedaMemFreeAsync | ( | VEDAdeviceptr | ptr, |
VEDAstream | stream | ||
) |
Frees device memory with stream ordered semantics.
ptr | Pointer to memory to free. |
stream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Inserts a free operation into stream. The allocation must not be accessed after stream execution reaches the free. After this API returns, accessing the memory from any subsequent work launched on the VEDA device or querying its pointer attributes results in undefined behavior.
VEDAresult vedaMemGetAddressRange | ( | VEDAdeviceptr * | base, |
size_t * | size, | ||
VEDAdeviceptr | vptr | ||
) |
Get information on memory allocations.
base | Returned base address. |
size | Returned size of device memory allocation. |
vptr | Device pointer to query. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns the base address in *base and size in *size of the allocation by vedaMemAlloc() or vedaMemAllocPitch() that contains the input pointer vptr.
VEDAresult vedaMemGetDevice | ( | VEDAdevice * | dev, |
VEDAdeviceptr | ptr | ||
) |
Get the VEDA device information correspoding to the Device pointer.
dev | Pointer to hold the VEDA device handle. |
ptr | VEDA device pointer |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaMemPtr | ( | void ** | ptr, |
VEDAdeviceptr | vptr | ||
) |
Gets the VEDA device address for the given VEDA device virtual address.
ptr | Pointer to hold the VEDA device address. |
vptr | Pointer containing the VEDA device virtual address. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDAresult vedaMemPtrSize | ( | void ** | ptr, |
size_t * | size, | ||
VEDAdeviceptr | vptr | ||
) |
Gets the VEDA device address and allocation size against the given VEDA device virtual address.
ptr | Pointer to hold the VEDA device address. |
size | total size of the allocation in bytes. |
vptr | Pointer containing the VEDA device virtual address. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDAresult vedaMemReport | ( | void | ) |
Prints the memory information of each Intialized VEDA device.
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Prints the each allocation VEDA memory address and size of the every VEDA device.
VEDAresult vedaMemSize | ( | size_t * | size, |
VEDAdeviceptr | vptr | ||
) |
Gets the VEDA memory size in bytes for the given VEDA device virtual address.
size | total size of the allocation in bytes. |
vptr | Pointer containing the VEDA device virtual address. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDAresult vedaMemSwap | ( | VEDAdeviceptr | A, |
VEDAdeviceptr | B | ||
) |
Swaps the underlying buffer of two device pointers.
A | first pointer |
B | second pointer |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaMemSwapAsync | ( | VEDAdeviceptr | A, |
VEDAdeviceptr | B, | ||
VEDAstream | stream | ||
) |
Swaps the underlying buffer of two device pointers.
A | first pointer |
B | second pointer |
stream | stream |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDAresult vedaMemcpy | ( | VEDAdeviceptr | dst, |
VEDAdeviceptr | src, | ||
size_t | ByteCount | ||
) |
Copies Memory.
dst | Destination virtual address pointer. |
src | Source virtual address pointer. |
ByteCount | Size of memory copy in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies data between two pointers. dst and src are base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaMemcpyAsync | ( | VEDAdeviceptr | dst, |
VEDAdeviceptr | src, | ||
size_t | ByteCount, | ||
VEDAstream | hStream | ||
) |
Copies Memory Asynchronously.
dst | Destination virtual address pointer. |
src | Source virtual address pointer. |
ByteCount | Size of memory copy in bytes. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies data between two pointers. dst and src are base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaMemcpyDtoD | ( | VEDAdeviceptr | dstDevice, |
VEDAdeviceptr | srcDevice, | ||
size_t | ByteCount | ||
) |
Copies Memory from VEDA Device to VEDA Device.
dstDevice | Destination device pointer. |
srcDevice | Source device pointer. |
ByteCount | Size of memory copy in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from device memory to device memory. dstDevice and srcDevice are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaMemcpyDtoDAsync | ( | VEDAdeviceptr | dst, |
VEDAdeviceptr | src, | ||
size_t | size, | ||
VEDAstream | hStream | ||
) |
Copies Memory from VEDA device to VEDA device Asynchronously.
dst | Destination virtual address pointer. |
src | Source virtual address pointer. |
size | Size of memory copy in bytes. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from device memory to device memory. dstDevice and srcDevice are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaMemcpyDtoH | ( | void * | dstHost, |
VEDAdeviceptr | srcDevice, | ||
size_t | ByteCount | ||
) |
Copies Memory from VEDA Device to Host.
dstHost | Destination host pointer. |
srcDevice | Source device pointer. |
ByteCount | Size of memory copy in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from device memory to host. dstHost and srcDevice are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaMemcpyDtoHAsync | ( | void * | dstHost, |
VEDAdeviceptr | srcDevice, | ||
size_t | ByteCount, | ||
VEDAstream | hStream | ||
) |
Copies Memory from VEDA device to Host Asynchronously.
dstHost | Destination virtual address pointer. |
srcDevice | Source virtual address pointer. |
ByteCount | Size of memory copy in bytes. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from device memory to host. dstHost and srcDevice are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaMemcpyHtoD | ( | VEDAdeviceptr | dstDevice, |
const void * | srcHost, | ||
size_t | ByteCount | ||
) |
Copies Memory from Host to VEDA Device.
dstDevice | Destination device pointer. |
srcHost | Source host pointer. |
ByteCount | Size of memory copy in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from host memory to device memory. dstDevice and srcHost are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaMemcpyHtoDAsync | ( | VEDAdeviceptr | dstDevice, |
const void * | srcHost, | ||
size_t | ByteCount, | ||
VEDAstream | hStream | ||
) |
Copies Memory from Host to VEDA device Asynchronously.
dstDevice | Destination virtual address pointer. |
srcHost | Source Host virtual address pointer. |
ByteCount | Size of memory copy in bytes. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from host memory to device memory. dstDevice and srcHost are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy.
VEDAresult vedaMemsetD128 | ( | VEDAdeviceptr | dstDevice, |
uint64_t | x, | ||
uint64_t | y, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
x | first 64bit value |
y | second 64bit value |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 128-bit values to the specified value us. |
VEDAresult vedaMemsetD128Async | ( | VEDAdeviceptr | dstDevice, |
uint64_t | x, | ||
uint64_t | y, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
x | first 64bit value |
y | second 64bit value |
N | Number of Elements. |
hStream | Stream |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 128-bit values to the specified values x and y. |
VEDAresult vedaMemsetD16 | ( | VEDAdeviceptr | dstDevice, |
uint16_t | value, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 16-bit values to the specified value "value". |
VEDAresult vedaMemsetD16Async | ( | VEDAdeviceptr | dstDevice, |
uint16_t | value, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 16-bit values to the specified value "value". |
VEDAresult vedaMemsetD2D128 | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint64_t | x, | ||
uint64_t | y, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | memory pitch |
x | first 64bit value |
y | second 64bit value |
Width | Width of 2D memset. |
Height | Height of 2D memset. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 128-bit values to the specified values x and y. |
VEDAresult vedaMemsetD2D128Async | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint64_t | x, | ||
uint64_t | y, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | memory pitch |
x | first 64bit value |
y | second 64bit value |
Width | Width of 2D memset. |
Height | Height of 2D memset. |
hStream | stream |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 128-bit values to the specified values x and y. |
VEDAresult vedaMemsetD2D16 | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint16_t | value, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 16-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaMemsetD2D16Async | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint16_t | value, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 16-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaMemsetD2D32 | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint32_t | value, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 32-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaMemsetD2D32Async | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint32_t | value, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 32-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaMemsetD2D64 | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint64_t | value, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | memory pitch. |
value | 32bit value. |
Width | Width of 2D memset. |
Height | Height of 2D memset. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 64-bit values to the specified value "value". |
VEDAresult vedaMemsetD2D64Async | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint64_t | value, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set |
Width | Width of row. |
Height | Number of rows. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 16-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaMemsetD2D8 | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint8_t | value, | ||
size_t | Width, | ||
size_t | Height | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 8-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaMemsetD2D8Async | ( | VEDAdeviceptr | dstDevice, |
size_t | dstPitch, | ||
uint8_t | value, | ||
size_t | Width, | ||
size_t | Height, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
dstPitch | Pitch of destination device pointer. |
value | Value to set. |
Width | Width of row. |
Height | Number of rows. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the 2D memory range of Width 8-bit values to the specified value "value". Height specifies the number of rows to set, and dstPitch specifies the number of bytes between each row. |
VEDAresult vedaMemsetD32 | ( | VEDAdeviceptr | dstDevice, |
uint32_t | value, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 32-bit values to the specified value "value". |
VEDAresult vedaMemsetD32Async | ( | VEDAdeviceptr | dstDevice, |
uint32_t | value, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 32-bit values to the specified value "value". |
VEDAresult vedaMemsetD64 | ( | VEDAdeviceptr | dstDevice, |
uint64_t | value, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 64-bit values to the specified value "value". |
VEDAresult vedaMemsetD64Async | ( | VEDAdeviceptr | dstDevice, |
uint64_t | value, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 64-bit values to the specified value "value". |
VEDAresult vedaMemsetD8 | ( | VEDAdeviceptr | dstDevice, |
uint8_t | value, | ||
size_t | N | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 8-bit values to the specified value "value". |
VEDAresult vedaMemsetD8Async | ( | VEDAdeviceptr | dstDevice, |
uint8_t | value, | ||
size_t | N, | ||
VEDAstream | hStream | ||
) |
Initializes device memory.
dstDevice | Destination device pointer. |
value | Value to set. |
N | Number of Elements. |
hStream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. Sets the memory range of N 8-bit values to the specified value "value". |