NRM2 - Euclidean norm of a vector

pyclblas.clblasDnrm2(N, NRM2, offNRM2, X, offx, incx, scratchBuff, commandQueues, eventWaitList)

wraps: clblasDnrm2

computes the euclidean norm of vector containing double elements NRM2 = sqrt( X’ * X )

Parameters:
  • N (int [in]) – Number of elements in vector X.
  • NRM2 (pyopencl.Buffer [out]) – Buffer object that will contain the NRM2 value.
  • offNRM2 (int [in]) – Offset to NRM2 value in NRM2 buffer object. Counted in elements.
  • X (pyopencl.Buffer [in]) – Buffer object storing vector X.
  • offx (int [in]) – Offset of first element of vector X in buffer object. Counted in elements.
  • incx (int [in]) – Increment for the elements of X. Must not be zero.
  • scratchBuff (pyopencl.Buffer [in]) – Temporary cl_mem scratch buffer object that can hold minimum of (2*N) elements.
  • commandQueues (pyopencl.CommandQueue [in]) – OpenCL command queues. A list, tuple, or single instance of pyopencl.CommandQueue. Must not be None.
  • eventWaitList (pyopencl.Event [in]) – Event wait list. A list, tuple, or single instance of pyopencl.Event. May be None.
Returns:

A tuple of pyopencl.Event instances, one for each commandQueue supplied.

pyclblas.clblasSnrm2(N, NRM2, offNRM2, X, offx, incx, scratchBuff, commandQueues, eventWaitList)

wraps: clblasSnrm2

computes the euclidean norm of vector containing float elements NRM2 = sqrt( X’ * X )

Parameters:
  • N (int [in]) – Number of elements in vector X.
  • NRM2 (pyopencl.Buffer [out]) – Buffer object that will contain the NRM2 value.
  • offNRM2 (int [in]) – Offset to NRM2 value in NRM2 buffer object. Counted in elements.
  • X (pyopencl.Buffer [in]) – Buffer object storing vector X.
  • offx (int [in]) – Offset of first element of vector X in buffer object. Counted in elements.
  • incx (int [in]) – Increment for the elements of X. Must not be zero.
  • scratchBuff (pyopencl.Buffer [in]) – Temporary cl_mem scratch buffer object that can hold minimum of (2*N) elements.
  • commandQueues (pyopencl.CommandQueue [in]) – OpenCL command queues. A list, tuple, or single instance of pyopencl.CommandQueue. Must not be None.
  • eventWaitList (pyopencl.Event [in]) – Event wait list. A list, tuple, or single instance of pyopencl.Event. May be None.
Returns:

A tuple of pyopencl.Event instances, one for each commandQueue supplied.

pyclblas.clblasScnrm2(N, NRM2, offNRM2, X, offx, incx, scratchBuff, commandQueues, eventWaitList)

wraps: clblasScnrm2

computes the euclidean norm of vector containing float-complex elements NRM2 = sqrt( X**H * X )

Parameters:
  • N (int [in]) – Number of elements in vector X.
  • NRM2 (pyopencl.Buffer [out]) – Buffer object that will contain the NRM2 value. Note that the answer of Scnrm2 is a real value.
  • offNRM2 (int [in]) – Offset to NRM2 value in NRM2 buffer object. Counted in elements.
  • X (pyopencl.Buffer [in]) – Buffer object storing vector X.
  • offx (int [in]) – Offset of first element of vector X in buffer object. Counted in elements.
  • incx (int [in]) – Increment for the elements of X. Must not be zero.
  • scratchBuff (pyopencl.Buffer [in]) – Temporary cl_mem scratch buffer object that can hold minimum of (2*N) elements.
  • commandQueues (pyopencl.CommandQueue [in]) – OpenCL command queues. A list, tuple, or single instance of pyopencl.CommandQueue. Must not be None.
  • eventWaitList (pyopencl.Event [in]) – Event wait list. A list, tuple, or single instance of pyopencl.Event. May be None.
Returns:

A tuple of pyopencl.Event instances, one for each commandQueue supplied.

pyclblas.clblasDznrm2(N, NRM2, offNRM2, X, offx, incx, scratchBuff, commandQueues, eventWaitList)

wraps: clblasDznrm2

computes the euclidean norm of vector containing double-complex elements NRM2 = sqrt( X**H * X )

Parameters:
  • N (int [in]) – Number of elements in vector X.
  • NRM2 (pyopencl.Buffer [out]) – Buffer object that will contain the NRM2 value. Note that the answer of Dznrm2 is a real value.
  • offNRM2 (int [in]) – Offset to NRM2 value in NRM2 buffer object. Counted in elements.
  • X (pyopencl.Buffer [in]) – Buffer object storing vector X.
  • offx (int [in]) – Offset of first element of vector X in buffer object. Counted in elements.
  • incx (int [in]) – Increment for the elements of X. Must not be zero.
  • scratchBuff (pyopencl.Buffer [in]) – Temporary cl_mem scratch buffer object that can hold minimum of (2*N) elements.
  • commandQueues (pyopencl.CommandQueue [in]) – OpenCL command queues. A list, tuple, or single instance of pyopencl.CommandQueue. Must not be None.
  • eventWaitList (pyopencl.Event [in]) – Event wait list. A list, tuple, or single instance of pyopencl.Event. May be None.
Returns:

A tuple of pyopencl.Event instances, one for each commandQueue supplied.