clBLAS 2.0
Loading...
Searching...
No Matches
DOT - Dot product of two vectors

Functions

clblasStatus clblasSdot (size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 dot product of two vectors containing float elements
 
clblasStatus clblasDdot (size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 dot product of two vectors containing double elements
 
clblasStatus clblasCdotu (size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 dot product of two vectors containing float-complex elements
 
clblasStatus clblasZdotu (size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 dot product of two vectors containing double-complex elements
 
clblasStatus clblasCdotc (size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 dot product of two vectors containing float-complex elements conjugating the first vector
 
clblasStatus clblasZdotc (size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 dot product of two vectors containing double-complex elements conjugating the first vector
 

Detailed Description

Function Documentation

◆ clblasCdotc()

clblasStatus clblasCdotc ( size_t N,
cl_mem dotProduct,
size_t offDP,
const cl_mem X,
size_t offx,
int incx,
const cl_mem Y,
size_t offy,
int incy,
cl_mem scratchBuff,
cl_uint numCommandQueues,
cl_command_queue * commandQueues,
cl_uint numEventsInWaitList,
const cl_event * eventWaitList,
cl_event * events )

dot product of two vectors containing float-complex elements conjugating the first vector

Parameters
[in]NNumber of elements in vector X.
[out]dotProductBuffer object that will contain the dot-product value
[in]offDPOffset to dot-product in dotProduct buffer object. Counted in elements.
[in]XBuffer object storing vector X.
[in]offxOffset of first element of vector X in buffer object. Counted in elements.
[in]incxIncrement for the elements of X. Must not be zero.
[in]YBuffer object storing the vector Y.
[in]offyOffset of first element of vector Y in buffer object. Counted in elements.
[in]incyIncrement for the elements of Y. Must not be zero.
[in]scratchBuffTemporary cl_mem scratch buffer object of minimum size N
[in]numCommandQueuesNumber of OpenCL command queues in which the task is to be performed.
[in]commandQueuesOpenCL command queues.
[in]numEventsInWaitListNumber of events in the event wait list.
[in]eventWaitListEvent wait list.
[in]eventsEvent objects per each command queue that identify a particular kernel execution instance.
Returns
  • clblasSuccess on success;
  • the same error codes as the clblasSdot() function otherwise.

◆ clblasCdotu()

clblasStatus clblasCdotu ( size_t N,
cl_mem dotProduct,
size_t offDP,
const cl_mem X,
size_t offx,
int incx,
const cl_mem Y,
size_t offy,
int incy,
cl_mem scratchBuff,
cl_uint numCommandQueues,
cl_command_queue * commandQueues,
cl_uint numEventsInWaitList,
const cl_event * eventWaitList,
cl_event * events )

dot product of two vectors containing float-complex elements

Parameters
[in]NNumber of elements in vector X.
[out]dotProductBuffer object that will contain the dot-product value
[in]offDPOffset to dot-product in dotProduct buffer object. Counted in elements.
[in]XBuffer object storing vector X.
[in]offxOffset of first element of vector X in buffer object. Counted in elements.
[in]incxIncrement for the elements of X. Must not be zero.
[in]YBuffer object storing the vector Y.
[in]offyOffset of first element of vector Y in buffer object. Counted in elements.
[in]incyIncrement for the elements of Y. Must not be zero.
[in]scratchBuffTemporary cl_mem scratch buffer object of minimum size N
[in]numCommandQueuesNumber of OpenCL command queues in which the task is to be performed.
[in]commandQueuesOpenCL command queues.
[in]numEventsInWaitListNumber of events in the event wait list.
[in]eventWaitListEvent wait list.
[in]eventsEvent objects per each command queue that identify a particular kernel execution instance.
Returns
  • clblasSuccess on success;
  • the same error codes as the clblasSdot() function otherwise.

◆ clblasDdot()

clblasStatus clblasDdot ( size_t N,
cl_mem dotProduct,
size_t offDP,
const cl_mem X,
size_t offx,
int incx,
const cl_mem Y,
size_t offy,
int incy,
cl_mem scratchBuff,
cl_uint numCommandQueues,
cl_command_queue * commandQueues,
cl_uint numEventsInWaitList,
const cl_event * eventWaitList,
cl_event * events )

dot product of two vectors containing double elements

Parameters
[in]NNumber of elements in vector X.
[out]dotProductBuffer object that will contain the dot-product value
[in]offDPOffset to dot-product in dotProduct buffer object. Counted in elements.
[in]XBuffer object storing vector X.
[in]offxOffset of first element of vector X in buffer object. Counted in elements.
[in]incxIncrement for the elements of X. Must not be zero.
[in]YBuffer object storing the vector Y.
[in]offyOffset of first element of vector Y in buffer object. Counted in elements.
[in]incyIncrement for the elements of Y. Must not be zero.
[in]scratchBuffTemporary cl_mem scratch buffer object of minimum size N
[in]numCommandQueuesNumber of OpenCL command queues in which the task is to be performed.
[in]commandQueuesOpenCL command queues.
[in]numEventsInWaitListNumber of events in the event wait list.
[in]eventWaitListEvent wait list.
[in]eventsEvent objects per each command queue that identify a particular kernel execution instance.
Returns
  • clblasSuccess on success;
  • clblasInvalidDevice if a target device does not support the floating point arithmetic with double precision;
  • the same error codes as the clblasSdot() function otherwise.

◆ clblasSdot()

clblasStatus clblasSdot ( size_t N,
cl_mem dotProduct,
size_t offDP,
const cl_mem X,
size_t offx,
int incx,
const cl_mem Y,
size_t offy,
int incy,
cl_mem scratchBuff,
cl_uint numCommandQueues,
cl_command_queue * commandQueues,
cl_uint numEventsInWaitList,
const cl_event * eventWaitList,
cl_event * events )

dot product of two vectors containing float elements

Parameters
[in]NNumber of elements in vector X.
[out]dotProductBuffer object that will contain the dot-product value
[in]offDPOffset to dot-product in dotProduct buffer object. Counted in elements.
[in]XBuffer object storing vector X.
[in]offxOffset of first element of vector X in buffer object. Counted in elements.
[in]incxIncrement for the elements of X. Must not be zero.
[in]YBuffer object storing the vector Y.
[in]offyOffset of first element of vector Y in buffer object. Counted in elements.
[in]incyIncrement for the elements of Y. Must not be zero.
[in]scratchBuffTemporary cl_mem scratch buffer object of minimum size N
[in]numCommandQueuesNumber of OpenCL command queues in which the task is to be performed.
[in]commandQueuesOpenCL command queues.
[in]numEventsInWaitListNumber of events in the event wait list.
[in]eventWaitListEvent wait list.
[in]eventsEvent objects per each command queue that identify a particular kernel execution instance.
Returns
  • clblasSuccess on success;
  • clblasNotInitialized if clblasSetup() was not called;
  • clblasInvalidValue if invalid parameters are passed:
    • N is zero, or
    • either incx or incy is zero, or
    • the vector sizes along with the increments lead to accessing outside of any of the buffers;
  • clblasInvalidMemObject if either X, Y or dotProduct object is Invalid, or an image object rather than the buffer one;
  • clblasOutOfHostMemory if the library can't allocate memory for internal structures;
  • clblasInvalidCommandQueue if the passed command queue is invalid;
  • clblasInvalidContext if a context a passed command queue belongs to was released;
  • clblasInvalidOperation if kernel compilation relating to a previous call has not completed for any of the target devices;
  • clblasCompilerNotAvailable if a compiler is not available;
  • clblasBuildProgramFailure if there is a failure to build a program executable.
Examples
example_sdot.c.

◆ clblasZdotc()

clblasStatus clblasZdotc ( size_t N,
cl_mem dotProduct,
size_t offDP,
const cl_mem X,
size_t offx,
int incx,
const cl_mem Y,
size_t offy,
int incy,
cl_mem scratchBuff,
cl_uint numCommandQueues,
cl_command_queue * commandQueues,
cl_uint numEventsInWaitList,
const cl_event * eventWaitList,
cl_event * events )

dot product of two vectors containing double-complex elements conjugating the first vector

Parameters
[in]NNumber of elements in vector X.
[out]dotProductBuffer object that will contain the dot-product value
[in]offDPOffset to dot-product in dotProduct buffer object. Counted in elements.
[in]XBuffer object storing vector X.
[in]offxOffset of first element of vector X in buffer object. Counted in elements.
[in]incxIncrement for the elements of X. Must not be zero.
[in]YBuffer object storing the vector Y.
[in]offyOffset of first element of vector Y in buffer object. Counted in elements.
[in]incyIncrement for the elements of Y. Must not be zero.
[in]scratchBuffTemporary cl_mem scratch buffer object of minimum size N
[in]numCommandQueuesNumber of OpenCL command queues in which the task is to be performed.
[in]commandQueuesOpenCL command queues.
[in]numEventsInWaitListNumber of events in the event wait list.
[in]eventWaitListEvent wait list.
[in]eventsEvent objects per each command queue that identify a particular kernel execution instance.
Returns
  • clblasSuccess on success;
  • clblasInvalidDevice if a target device does not support the floating point arithmetic with double precision;
  • the same error codes as the clblasSdot() function otherwise.

◆ clblasZdotu()

clblasStatus clblasZdotu ( size_t N,
cl_mem dotProduct,
size_t offDP,
const cl_mem X,
size_t offx,
int incx,
const cl_mem Y,
size_t offy,
int incy,
cl_mem scratchBuff,
cl_uint numCommandQueues,
cl_command_queue * commandQueues,
cl_uint numEventsInWaitList,
const cl_event * eventWaitList,
cl_event * events )

dot product of two vectors containing double-complex elements

Parameters
[in]NNumber of elements in vector X.
[out]dotProductBuffer object that will contain the dot-product value
[in]offDPOffset to dot-product in dotProduct buffer object. Counted in elements.
[in]XBuffer object storing vector X.
[in]offxOffset of first element of vector X in buffer object. Counted in elements.
[in]incxIncrement for the elements of X. Must not be zero.
[in]YBuffer object storing the vector Y.
[in]offyOffset of first element of vector Y in buffer object. Counted in elements.
[in]incyIncrement for the elements of Y. Must not be zero.
[in]scratchBuffTemporary cl_mem scratch buffer object of minimum size N
[in]numCommandQueuesNumber of OpenCL command queues in which the task is to be performed.
[in]commandQueuesOpenCL command queues.
[in]numEventsInWaitListNumber of events in the event wait list.
[in]eventWaitListEvent wait list.
[in]eventsEvent objects per each command queue that identify a particular kernel execution instance.
Returns
  • clblasSuccess on success;
  • clblasInvalidDevice if a target device does not support the floating point arithmetic with double precision;
  • the same error codes as the clblasSdot() function otherwise.