Function File: octave_mat = ocl_to_octave (ocl_mat)

Transfer the data from an OCL matrix into an octave matrix of corresponding type.

ocl_to_octave takes as input any OCL matrix ocl_mat. The OCL data contained is copied into a conventional octave matrix octave_mat, preserving the underlying data type (e.g., int32). This data transfer thus copies the data from the OpenCL device to conventional memory. It is an operation which destroys the asynchronous workflow of OCL calculations and should be avoided during time-critical tasks. It is suitable for the inspection of the results of OCL calculations.

The reverse operation can be performed with the oclArray function (see example there).

For an explanation of OCL matrices, see ocl_double.

For compatibility with MATLAB, the gather function is an alias to ocl_to_octave.

See also: oclArray, ocl_double, ocl_single, ocl_int8, ocl_int16, ocl_int32, ocl_int64, ocl_uint8, ocl_uint16, ocl_uint32, ocl_uint64, gpuArray, gather.

Package: ocl