clBLAS  2.11
 All Functions Typedefs Enumerations Enumerator Groups Pages
Functions
iAMAX - Index of max absolute value

Functions

clblasStatus clblasiSamax (size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 index of max absolute value in a float array More...
 
clblasStatus clblasiDamax (size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 index of max absolute value in a double array More...
 
clblasStatus clblasiCamax (size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 index of max absolute value in a complex float array More...
 
clblasStatus clblasiZamax (size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue *commandQueues, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *events)
 index of max absolute value in a complex double array More...
 

Detailed Description

Function Documentation

clblasStatus clblasiCamax ( size_t  N,
cl_mem  iMax,
size_t  offiMax,
const cl_mem  X,
size_t  offx,
int  incx,
cl_mem  scratchBuff,
cl_uint  numCommandQueues,
cl_command_queue *  commandQueues,
cl_uint  numEventsInWaitList,
const cl_event *  eventWaitList,
cl_event *  events 
)

index of max absolute value in a complex float array

Parameters
[in]NNumber of elements in vector X.
[out]iMaxBuffer object storing the index of first absolute max. The index will be of type unsigned int
[in]offiMaxOffset for storing index in the buffer iMax 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]scratchBuffTemprory cl_mem object to store intermediate results It should be able to hold minimum of (2*N) elements
[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 clblasiSamax() function otherwise.
clblasStatus clblasiDamax ( size_t  N,
cl_mem  iMax,
size_t  offiMax,
const cl_mem  X,
size_t  offx,
int  incx,
cl_mem  scratchBuff,
cl_uint  numCommandQueues,
cl_command_queue *  commandQueues,
cl_uint  numEventsInWaitList,
const cl_event *  eventWaitList,
cl_event *  events 
)

index of max absolute value in a double array

Parameters
[in]NNumber of elements in vector X.
[out]iMaxBuffer object storing the index of first absolute max. The index will be of type unsigned int
[in]offiMaxOffset for storing index in the buffer iMax 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]scratchBuffTemprory cl_mem object to store intermediate results It should be able to hold minimum of (2*N) elements
[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 clblasiSamax() function otherwise.
clblasStatus clblasiSamax ( size_t  N,
cl_mem  iMax,
size_t  offiMax,
const cl_mem  X,
size_t  offx,
int  incx,
cl_mem  scratchBuff,
cl_uint  numCommandQueues,
cl_command_queue *  commandQueues,
cl_uint  numEventsInWaitList,
const cl_event *  eventWaitList,
cl_event *  events 
)

index of max absolute value in a float array

Parameters
[in]NNumber of elements in vector X.
[out]iMaxBuffer object storing the index of first absolute max. The index will be of type unsigned int
[in]offiMaxOffset for storing index in the buffer iMax 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]scratchBuffTemprory cl_mem object to store intermediate results It should be able to hold minimum of (2*N) elements
[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 is zero, or
    • the vector sizes along with the increments lead to accessing outside of any of the buffers;
  • clblasInvalidMemObject if any of iMax X or scratchBuff 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 the context, the 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_isamax.c.
clblasStatus clblasiZamax ( size_t  N,
cl_mem  iMax,
size_t  offiMax,
const cl_mem  X,
size_t  offx,
int  incx,
cl_mem  scratchBuff,
cl_uint  numCommandQueues,
cl_command_queue *  commandQueues,
cl_uint  numEventsInWaitList,
const cl_event *  eventWaitList,
cl_event *  events 
)

index of max absolute value in a complex double array

Parameters
[in]NNumber of elements in vector X.
[out]iMaxBuffer object storing the index of first absolute max. The index will be of type unsigned int
[in]offiMaxOffset for storing index in the buffer iMax 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]scratchBuffTemprory cl_mem object to store intermediate results It should be able to hold minimum of (2*N) elements
[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 clblasiSamax() function otherwise.