The Tutorial and API Reference of VEDA  3.3.0
VEDA API

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
 

Detailed Description

To use VEDA API functions, include "veda.h" header.

Function Documentation

VEDAresult vedaMemsetD16 ( void *  ptr,
const uint16_t  value,
const size_t  cnt 
)

Gets the Error name matching error code.

Parameters
errorError code.
pStrPointer to error string corresponding to Error Code.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_UNKNOWNThis is set when error doesn't match.
VEDAresult vedaArgsCreate ( VEDAargs *  args)

Instantiate the VEDA function argument handler.

Parameters
argsHandle for VEDA function argument handler
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_OUT_OF_MEMORY If no memory left on VEDA device to allocate arguments on VEDA device.

Further with the help of this VEDA function argument handler VEDA hybrid programmer can set the arguments for the VEDA device function.

Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_cxx/host.cpp, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/fortran.c, examples/VH/hello.c, examples/VH/mpi_veda.c, examples/VH/omphello.c, and examples/VH/omphellofortran.c.
VEDAresult vedaArgsDestroy ( VEDAargs  args)

Destroy the VEDA function argument handler.

Parameters
argsHandle for VEDA function argument handler
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/fortran.c, examples/VH/mpi_veda.c, examples/VH/omphello.c, and examples/VH/omphellofortran.c.
VEDAresult vedaArgsSetF32 ( VEDAargs  args,
const int  idx,
const float  value 
)

Initialize the VEDA function arguments for single precision floating point value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
VEDAresult vedaArgsSetF64 ( VEDAargs  args,
const int  idx,
const double  value 
)

Initialize the VEDA function arguments for double precision floating point value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
VEDAresult vedaArgsSetI16 ( VEDAargs  args,
const int  idx,
const int16_t  value 
)

Initialize the VEDA function arguments for 16 bit integer value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
VEDAresult vedaArgsSetI32 ( VEDAargs  args,
const int  idx,
const int32_t  value 
)

Initialize the VEDA function arguments for 32 bit integer value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
Examples:
examples/VH/mpi_veda.c.
VEDAresult vedaArgsSetI64 ( VEDAargs  args,
const int  idx,
const int64_t  value 
)

Initialize the VEDA function arguments for 64 bit integer value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
VEDAresult vedaArgsSetI8 ( VEDAargs  args,
const int  idx,
const int8_t  value 
)

Initialize the VEDA function arguments for 8 bit integer value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
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.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
ptrPointer to the buffer which needs to be copied to the VEDA device function stack.
intentDefines 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.
sizeSize of the buffer.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.

Set the VEDA function argument to the buffer on stack.

Examples:
examples/VH/fortran.c.
VEDAresult vedaArgsSetU16 ( VEDAargs  args,
const int  idx,
const uint16_t  value 
)

Initialize the VEDA function arguments for 16 bit unsigned integer value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
VEDAresult vedaArgsSetU32 ( VEDAargs  args,
const int  idx,
const uint32_t  value 
)

Initialize the VEDA function arguments for 32 bit unsigned integer value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
VEDAresult vedaArgsSetU64 ( VEDAargs  args,
const int  idx,
const uint64_t  value 
)

Initialize the VEDA function arguments for 64 bit unsigned integer value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
VEDAresult vedaArgsSetU8 ( VEDAargs  args,
const int  idx,
const uint8_t  value 
)

Initialize the VEDA function arguments for 8 bit unsigned integer value.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.
VEDAresult vedaCtxCreate ( VEDAcontext *  pctx,
int  mode,
VEDAdevice  dev 
)

Create a VEDA context.

Parameters
pctxReturned context handle of the new context.
modeContext mode may contain below two values –
VEDA_CONTEXT_MODE_OMP
VEDA_CONTEXT_MODE_SCALAR
devDevice to create context on
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_CANNOT_CREATE_CONTEXTError while creating VEDA context.
VEDA_ERROR_CANNOT_CREATE_STREAMerror 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.

Examples:
examples/VH/Device_stream.cpp, examples/VH/Omp_stream.cpp, and examples/VH/Scalar_stream.cpp.
VEDAresult vedaCtxDestroy ( VEDAcontext  ctx)

Destroy a VEDA context.

Parameters
ctxContext to destroy.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA 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.

Examples:
examples/VH/Device_stream.cpp, and examples/VH/mpi_veda.c.
VEDAresult vedaCtxGet ( VEDAcontext *  ctx,
const VEDAdevice  device 
)

Retrieve the VEDA Context bound to the VEDA device.

Parameters
ctxVEDA Context handle.
deviceVEDA device ID.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaCtxGetApiVersion ( VEDAcontext  ctx,
uint32_t *  version 
)

Gets the context's API version.

Parameters
ctxContext to check.
versionPointer to hold the version.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaCtxGetCurrent ( VEDAcontext *  pctx)

Returns the VEDA context bound to the calling CPU thread.

Parameters
pctxReturned context handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
deviceReturned device ID for the current context.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
pctxReturned new context handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
ctxContext to push.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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().

Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_cxx/host.cpp, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/fortran.c, examples/VH/hello.c, examples/VH/mpi_veda.c, examples/VH/omphello.c, and examples/VH/omphellofortran.c.
VEDAresult vedaCtxSetCurrent ( VEDAcontext  ctx)

Binds the specified VEDA context to the calling CPU thread.

Parameters
ctxContext to bind to the calling CPU thread.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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.

Parameters
cntpointer to hold the VEDA SM count.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.

Returns the VEDA SM count of the VEDA context bound to the calling CPU thread.

Examples:
examples/VH/Device_stream.cpp, examples/VH/mpi_veda.c, examples/VH/Omp_stream.cpp, and examples/VH/Scalar_stream.cpp.
VEDAresult vedaCtxSynchronize ( void  )

Block for a context's tasks to complete.

Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_cxx/host.cpp, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/fortran.c, examples/VH/hello.c, examples/VH/mpi_veda.c, examples/VH/omphello.c, and examples/VH/omphellofortran.c.
VEDAresult vedaDeviceDistance ( float *  distance,
VEDAdevice  devA,
VEDAdevice  devB 
)

Retrieve the distance of the two given VEDA devices.

Parameters
distancepointer to hold the distance.
devAhandle to the first VEDA device.
devBhandle to the second VEDA device.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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.

Examples:
examples/VH/numa_node.cpp.
VEDAresult vedaDeviceGet ( VEDAdevice *  device,
int  ordinal 
)

Returns a handle to compute VEDA Device.

Parameters
devicepointer to hold the VEDA device handle.
ordinalVEDA device number to get the VEDA device handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaDeviceGetAVEOId ( int *  id,
VEDAdevice  dev 
)

Retrieve the AVEO ID of the given VEDA device.

Parameters
idpointer to hold the AVEO id of the VEDA device
devVEDA device ID.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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.

Parameters
piReturned VEDA device attribute value.
attribVEDA Device attribute to query.
devVEDA device handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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.

Examples:
examples/VH/Scalar_stream.cpp.
VEDAresult vedaDeviceGetCount ( int *  count)

Retrieve the number of initialized VEDA device.

Parameters
countpointer to hold the count of the VEDA device.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
Examples:
examples/VH/Device_stream.cpp, examples/VH/numa_node.cpp, examples/VH/Omp_stream.cpp, and examples/VH/Scalar_stream.cpp.
VEDAresult vedaDeviceGetCurrent ( float *  current,
VEDAdevice  dev 
)

Returns a VE device AUX current corresponding to VEDA Device.

Parameters
currentpointer to hold the VE device voltage.
devVEDA device handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaDeviceGetCurrentEdge ( float *  current,
VEDAdevice  dev 
)

Returns a VE device PCIe edge current corresponding to VEDA Device.

Parameters
currentpointer to hold the VE device current.
devVEDA device handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaDeviceGetNUMAId ( int *  id,
VEDAdevice  dev 
)

Retrieve the NUMA ID of the given VEDA device.

Parameters
idpointer to hold the NUMA id of the VEDA device
devVEDA device ID.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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.

Parameters
nameReturned identifier string for the VEDA device.
lenMaximum length of string to store in name.
devDevice to get the identifier string
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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.

Parameters
idpointer to hold the physical id of the VEDA device
devVEDA device ID.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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.

Parameters
wattspointer to hold the VE device power.
devVEDA device handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA 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.

Parameters
tempCpointer to hold the temperature.
idxlocation index on the VEDA device.
devVEDA device ID.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_VALUElocation index is invalid.
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaDeviceGetVoltage ( float *  voltage,
VEDAdevice  dev 
)

Returns a VE device AUX voltage corresponding to VEDA Device.

Parameters
voltagepointer to hold the VE device voltage.
devVEDA device handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaDeviceGetVoltageEdge ( float *  voltage,
VEDAdevice  dev 
)

Returns a VE device PCIe edge voltage corresponding to VEDA Device.

Parameters
voltagepointer to hold the VE device voltage.
devVEDA device handle.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaDevicePrimaryCtxGetState ( VEDAdevice  dev,
uint32_t *  flags,
int *  active 
)

Get the state of the primary context.

Parameters
devVEDA Device to get the primary context flags for.
flagsPointer to store flags
activePointer to store context state; 0 = inactive, 1 = active.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaDevicePrimaryCtxRelease ( VEDAdevice  dev)

This function is not yet implemented.

Parameters
dev
Returns
VEDA_SUCCESS

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.

Parameters
devVEDA Device for which primary context is destroyed.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_CANNOT_CREATE_CONTEXTError while creating VEDA context.
VEDA_ERROR_CANNOT_CREATE_STREAMerror 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.

Parameters
pctxReturned context handle of the new VEDA context.
devVEDA Device for which primary context is released.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_CANNOT_CREATE_CONTEXTError while creating VEDA context.
VEDA_ERROR_CANNOT_CREATE_STREAMerror 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.

Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_cxx/host.cpp, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/fortran.c, examples/VH/hello.c, examples/VH/mpi_veda.c, examples/VH/omphello.c, and examples/VH/omphellofortran.c.
VEDAresult vedaDevicePrimaryCtxSetFlags ( VEDAdevice  dev,
uint32_t  flags 
)

This function is not yet implemented.

Parameters
dev
flags
Returns
VEDA_SUCCESS

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.

Parameters
bytespointer to hold the VEDA device memory.
devVEDA device ID.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaDriverGetVersion ( const char **  str)

Return the latest AVEO version supported by VEDA.

Parameters
strPointer to hold the AVEO version.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDAresult vedaExit ( void  )
VEDAresult vedaGetErrorName ( VEDAresult  error,
const char **  pStr 
)

Gets the Error name matching error code.

Parameters
errorError code.
pStrPointer to error string corresponding to Error Code.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_UNKNOWNThis is set when error doesn't match.
VEDAresult vedaGetErrorString ( VEDAresult  error,
const char **  pStr 
)

Gets the Error string matching error code.

Parameters
errorError Code.
pStrPointer to error string corresponding to Error Code.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_UNKNOWNThis is set when error doesn't match.
VEDAresult vedaGetVersion ( const char **  str)

Return the latest VEDA version.

Parameters
strPointer to hold the VEDA version.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDAresult vedaInit ( uint32_t  Flags)

Initialize the VEDA driver API library.

Parameters
FlagsInitialization flags for VEDA library.
Return values
VEDA_SUCCESSon 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.

Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_cxx/host.cpp, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/Device_stream.cpp, examples/VH/fortran.c, examples/VH/hello.c, examples/VH/mpi_veda.c, examples/VH/numa_node.cpp, examples/VH/Omp_stream.cpp, examples/VH/omphello.c, examples/VH/omphellofortran.c, and examples/VH/Scalar_stream.cpp.
VEDAresult vedaLaunchHostFunc ( VEDAstream  stream,
VEDAhost_function  fn,
void *  userData 
)

Enqueues a host function call in a stream.

Parameters
streamStream Identifier.
fnThe function to call once preceding stream operations are complete.
userDataUser-specified data to be passed to the function.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
streamStream Identifier.
fnThe function to call once preceding stream operations are complete.
userDataUser-specified data to be passed to the function.
resultIf non-zero, the function return value gets written into the buffer.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
fHandle to VEDA Device function to launch.
streamStream Identifier.
argsHandle to the VEDA device parameters
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.

VEDA device function arguements can be allocated and set through the vedaArgsCreate and vedaArgsSet* APIs.

Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/Device_stream.cpp, examples/VH/fortran.c, examples/VH/mpi_veda.c, examples/VH/omphello.c, and examples/VH/omphellofortran.c.
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.

Parameters
fHandle to VEDA Device function to launch.
streamStream Identifier.
argsHandle to the VEDA device parameters.
destroyArgsSet 1 if the VEDA arguement needs to be destroyed after VEDA device function is called else 0.
resultIf set, the function return value will be copied to this pointer.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
Examples:
examples/Hybrid_Offloading/helloworld_veda_cxx/host.cpp, and examples/VH/hello.c.
VEDAresult vedaMemAllocHost ( void **  pp,
size_t  bytesize 
)

Allocates host memory.

Parameters
ppReturned host pointer
bytesizeRequested allocation size in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDA_ERROR_OUT_OF_MEMORYHost memory exausted.
VEDAresult vedaMemFreeHost ( void *  ptr)

Frees host memory.

Parameters
ptrPointer to memory to free.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
freeReturned free memory in bytes.
totalReturned total memory in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
hfuncBuffer to hold the VE address of the VEDA device function.
hmodhandle to the VEDA module corresponding to the VE device code.
nameName of the VEDA device function for which the VE address is required.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS In case the name of the VEDA device function is passed as NULL.
VEDA_ERROR_FUNCTION_NOT_FOUND Internal error from the AVEO library
Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_cxx/host.cpp, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/Device_stream.cpp, examples/VH/fortran.c, examples/VH/hello.c, examples/VH/mpi_veda.c, examples/VH/omphello.c, and examples/VH/omphellofortran.c.
VEDAresult vedaModuleLoad ( VEDAmodule *  module,
const char *  fname 
)

To load the VE device code into the VE memory.

Parameters
modulePointer to hold the reference of the VEDA module.
fnameLibrary name of the file name containing VE device code.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_VALUE If the provided VE library name is not valid.
VEDA_ERROR_MODULE_NOT_FOUND Internal error from the AVEO library
Examples:
examples/Hybrid_Offloading/helloworld_veda_c/host.c, examples/Hybrid_Offloading/helloworld_veda_cxx/host.cpp, examples/Hybrid_Offloading/helloworld_veda_fortran/host.c, examples/VH/Device_stream.cpp, examples/VH/fortran.c, examples/VH/hello.c, examples/VH/mpi_veda.c, examples/VH/omphello.c, and examples/VH/omphellofortran.c.
VEDAresult vedaModuleUnload ( VEDAmodule  hmod)

To unload/remove the VE device code from the VE memory.

Parameters
hmodPointer to the VEDA module corresponding to the VE device code..
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_UNKOWN_CONTEXT If VEDA context is not initialized.
VEDAresult vedaStreamAddCallback ( VEDAstream  stream,
VEDAstream_callback  callback,
void *  userData,
unsigned int  flags 
)

Add a callback to a compute stream.

Parameters
streamDetermine status of a compute stream.
callbackThe function to call once preceding stream operations are complete.
userDataUser specified data to be passed to the callback function.
flagsReserved for future use, must be 0.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
hStreamHandle to the stream to be queried
flagsPointer to an unsigned integer in which the stream's flags are returned.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaStreamQuery ( VEDAstream  hStream)

Determine status of a compute stream.

Parameters
hStreamDetermine status of a compute stream.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
hStreamDetermine status of a compute stream.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.

Waits until the device has completed all operations in the stream specified by hStream.

Examples:
examples/VH/Device_stream.cpp.
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.

Parameters
fHandle to VEDA Device function to launch.
streamStream Identifier.
argsHandle to the VEDA device parameters.
destroyArgsSet 1 if the VEDA arguement needs to be destroyed after VEDA device function is called else 0.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.

Set the VEDA device memory address as an argument by converting the heterogeneous memory address to VEDA device memory address.

Examples:
examples/VH/mpi_veda.c.
VEDAresult vedaHMemAlloc ( VEDAhmemptr *  ptr,
size_t  size 
)

Allocates HMEM device memory.

Parameters
ptrReturned HMEM device pointer
sizeRequested allocation size in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDA_ERROR_OUT_OF_MEMORYVEDA device memory exausted.

Allocates size bytes of linear memory on the HMEM device and returns in *ptr a pointer to the allocated memory.

Examples:
examples/VH/mpi_veda.c.
VEDAresult vedaHMemFree ( VEDAhmemptr  ptr)

Frees HMEM memory.

Parameters
ptrPointer to memory to free.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_UNKNOWN_HMEMUnknown HMEM ptr.

Frees the memory space pointed to by dptr, which must have been returned by a previous call to vedaHMemAlloc().

Examples:
examples/VH/mpi_veda.c.
VEDAresult vedaHMemPtr ( void **  ptr,
VEDAhmemptr  hptr 
)

Gets the VE device address for the given HMEM ptr.

Parameters
ptrPointer to hold the VEDA device address.
hptrPointer containing the VEDA device virtual address.
Return values
VEDA_SUCCESSon Success
VEDAresult vedaHMemcpy ( void *  dst,
void *  src,
size_t  ByteCount 
)

Copies Memory.

Parameters
dstDestination address pointer.
srcSource address pointer.
ByteCountSize of memory copy in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_INVALID_VALUEInvalid 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.

Parameters
dstDestination HMEM pointer.
srcSource device pointer.
ByteCountSize of memory copy in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDestination virtual address pointer.
srcSource virtual address pointer.
ByteCountSize of memory copy in bytes.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDestination device pointer.
srcSource HMEM pointer.
ByteCountSize of memory copy in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDestination virtual address pointer.
srcSource virtual address pointer.
ByteCountSize of memory copy in bytes.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
xfirst 64bit value
ysecond 64bit value
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
xfirst 64bit value
ysecond 64bit value
NNumber of Elements.
hStreamStream
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
valueValue to set.
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
valueValue to set.
NNumber of Elements.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchmemory pitch
xfirst 64bit value
ysecond 64bit value
WidthWidth of 2D memset.
HeightHeight of 2D memset.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchmemory pitch
xfirst 64bit value
ysecond 64bit value
WidthWidth of 2D memset.
HeightHeight of 2D memset.
hStreamstream
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchmemory pitch.
value32bit value.
WidthWidth of 2D memset.
HeightHeight of 2D memset.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set
WidthWidth of row.
HeightNumber of rows.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
valueValue to set.
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
valueValue to set.
NNumber of Elements.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
valueValue to set.
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
valueValue to set.
NNumber of Elements.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
valueValue to set.
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceHMEM Destination device pointer.
valueValue to set.
NNumber of Elements.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.

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.

Parameters
argsHandle to VEDA function argument.
idxVEDA function argument number
valueValue to be set for the VEDA function argument.
Returns
VEDA_SUCCESS on Success
VEDA_ERROR_NOT_INITIALIZED If VEDA device is not initialized.
VEDA_ERROR_INVALID_ARGS If VEDA argument handler is not initialized.

Set the VEDA host memory location as an argument.

VEDAresult vedaMemAlloc ( VEDAdeviceptr *  ptr,
size_t  size 
)

Allocates VEDA device memory.

Parameters
ptrReturned VEDA device pointer
sizeRequested allocation size in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDA_ERROR_OUT_OF_MEMORYVEDA 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.

Parameters
ptrReturned VEDA device pointer
sizeRequested allocation size in bytes.
streamThe stream establishing the stream ordering contract and the memory pool to allocate from
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDA_ERROR_OUT_OF_MEMORYVEDA 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.

Parameters
ptrPointer of type VEDAdeviceptr to override
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDA_ERROR_OFFSET_NOT_ALLOWEDOnly 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.

Parameters
dptrReturned device pointer
pPitchReturned pitch of allocation in bytes.
WidthInBytesRequested allocation width in bytes
HeightRequested allocation height in rows
ElementSizeByteSize of largest reads/writes for range
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDA_ERROR_OUT_OF_MEMORYHost 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.

Parameters
dptrReturned device pointer
pPitchReturned pitch of allocation in bytes.
WidthInBytesRequested allocation width in bytes
HeightRequested allocation height in rows
ElementSizeByteSize of largest reads/writes for range
streamThe stream establishing the stream ordering contract and the memory pool to allocate from
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDA_ERROR_OUT_OF_MEMORYHost 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.

Parameters
ptrPointer to memory to free.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
ptrPointer to memory to free.
streamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
baseReturned base address.
sizeReturned size of device memory allocation.
vptrDevice pointer to query.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
devPointer to hold the VEDA device handle.
ptrVEDA device pointer
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaMemPtr ( void **  ptr,
VEDAdeviceptr  vptr 
)

Gets the VEDA device address for the given VEDA device virtual address.

Parameters
ptrPointer to hold the VEDA device address.
vptrPointer containing the VEDA device virtual address.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
ptrPointer to hold the VEDA device address.
sizetotal size of the allocation in bytes.
vptrPointer containing the VEDA device virtual address.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDAresult vedaMemReport ( void  )

Prints the memory information of each Intialized VEDA device.

Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
sizetotal size of the allocation in bytes.
vptrPointer containing the VEDA device virtual address.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
VEDAresult vedaMemSwap ( VEDAdeviceptr  A,
VEDAdeviceptr  B 
)

Swaps the underlying buffer of two device pointers.

Parameters
Afirst pointer
Bsecond pointer
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaMemSwapAsync ( VEDAdeviceptr  A,
VEDAdeviceptr  B,
VEDAstream  stream 
)

Swaps the underlying buffer of two device pointers.

Parameters
Afirst pointer
Bsecond pointer
streamstream
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDAresult vedaMemcpy ( VEDAdeviceptr  dst,
VEDAdeviceptr  src,
size_t  ByteCount 
)

Copies Memory.

Parameters
dstDestination virtual address pointer.
srcSource virtual address pointer.
ByteCountSize of memory copy in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDestination virtual address pointer.
srcSource virtual address pointer.
ByteCountSize of memory copy in bytes.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
srcDeviceSource device pointer.
ByteCountSize of memory copy in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDestination virtual address pointer.
srcSource virtual address pointer.
sizeSize of memory copy in bytes.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstHostDestination host pointer.
srcDeviceSource device pointer.
ByteCountSize of memory copy in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstHostDestination virtual address pointer.
srcDeviceSource virtual address pointer.
ByteCountSize of memory copy in bytes.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
srcHostSource host pointer.
ByteCountSize of memory copy in bytes.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination virtual address pointer.
srcHostSource Host virtual address pointer.
ByteCountSize of memory copy in bytes.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
xfirst 64bit value
ysecond 64bit value
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
xfirst 64bit value
ysecond 64bit value
NNumber of Elements.
hStreamStream
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
valueValue to set.
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
valueValue to set.
NNumber of Elements.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchmemory pitch
xfirst 64bit value
ysecond 64bit value
WidthWidth of 2D memset.
HeightHeight of 2D memset.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchmemory pitch
xfirst 64bit value
ysecond 64bit value
WidthWidth of 2D memset.
HeightHeight of 2D memset.
hStreamstream
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchmemory pitch.
value32bit value.
WidthWidth of 2D memset.
HeightHeight of 2D memset.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set
WidthWidth of row.
HeightNumber of rows.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
dstPitchPitch of destination device pointer.
valueValue to set.
WidthWidth of row.
HeightNumber of rows.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
valueValue to set.
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
valueValue to set.
NNumber of Elements.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
valueValue to set.
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
valueValue to set.
NNumber of Elements.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
valueValue to set.
NNumber of Elements.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA 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.

Parameters
dstDeviceDestination device pointer.
valueValue to set.
NNumber of Elements.
hStreamThe stream establishing the stream ordering contract.
Return values
VEDA_SUCCESSon Success
VEDA_ERROR_NOT_INITIALIZEDVEDA library not initialized
VEDA_ERROR_INVALID_DEVICEVEDA device id is not valid.
VEDA_ERROR_UNKNOWN_CONTEXTVEDA context is not set for the calling thread.
VEDA_ERROR_CONTEXT_IS_DESTROYEDVEDA current context is already destroyed.
Sets the memory range of N 8-bit values to the specified value "value".