Loading...
Searching...
No Matches
setvector: CPU => GPU
Utilities » Communication CPU <=> GPU

## Macros

#define | magma_isetvector( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector() for magma_int_t arrays.
#define | magma_isetvector_async( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector_async() for magma_int_t arrays.
#define | magma_index_setvector( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector() for magma_index_t arrays.
#define | magma_index_setvector_async( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector_async() for magma_index_t arrays.
#define | magma_uindex_setvector( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector() for magma_uindex_t arrays.
#define | magma_uindex_setvector_async( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector_async() for magma_uindex_t arrays.
#define | magma_csetvector( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector() for magmaFloatComplex arrays.
#define | magma_csetvector_async( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector_async() for magmaFloatComplex arrays.
#define | magma_dsetvector( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector() for double arrays.
#define | magma_dsetvector_async( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector_async() for double arrays.
#define | magma_ssetvector( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector() for float arrays.
#define | magma_ssetvector_async( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector_async() for float arrays.
#define | magma_zsetvector( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector() for magmaDoubleComplex arrays.
#define | magma_zsetvector_async( n, hx_src, incx, dy_dst, incy, queue)
| Type-safe version of magma_setvector_async() for magmaDoubleComplex arrays.
#define | magma_setvector( n, elemSize, hx_src, incx, dy_dst, incy, queue)
| Copy vector hx_src on CPU host to dy_dst on GPU device.
#define | magma_setvector_async( n, elemSize, hx_src, incx, dy_dst, incy, queue)
| Copy vector hx_src on CPU host to dy_dst on GPU device.

## Detailed Description

## Macro Definition Documentation

## magma_setvector

#define magma_setvector | ( |  | n,
|  |  | elemSize,
|  |  | hx_src,
|  |  | incx,
|  |  | dy_dst,
|  |  | incy,
|  |  | queue )

Copy vector hx_src on CPU host to dy_dst on GPU device.

Elements may be arbitrary size. Type-safe versions set elemSize appropriately.

This version synchronizes the queue after the transfer. See magma_setvector_async() for an asynchronous version.

Parameters

  [in] | n | Number of elements in vector.
  [in] | elemSize | Size of each element, e.g., sizeof(double).
  [in] | hx_src | Source array of dimension (1 + (n-1))*incx, on CPU host.
  [in] | incx | Increment between elements of hx_src. incx > 0.
  [out] | dy_dst | Destination array of dimension (1 + (n-1))*incy, on GPU device.
  [in] | incy | Increment between elements of dy_dst. incy > 0.
  [in] | queue | Queue to execute in.

## magma_setvector_async

#define magma_setvector_async | ( |  | n,
|  |  | elemSize,
|  |  | hx_src,
|  |  | incx,
|  |  | dy_dst,
|  |  | incy,
|  |  | queue )

Copy vector hx_src on CPU host to dy_dst on GPU device.

Elements may be arbitrary size. Type-safe versions set elemSize appropriately.

This version is asynchronous: it may return before the transfer finishes, if hx_src is pinned CPU memory. See magma_setvector() for a synchronous version.

Parameters

  [in] | n | Number of elements in vector.
  [in] | elemSize | Size of each element, e.g., sizeof(double).
  [in] | hx_src | Source array of dimension (1 + (n-1))*incx, on CPU host.
  [in] | incx | Increment between elements of hx_src. incx > 0.
  [out] | dy_dst | Destination array of dimension (1 + (n-1))*incy, on GPU device.
  [in] | incy | Increment between elements of dy_dst. incy > 0.
  [in] | queue | Queue to execute in.