SCAL - Scales a vector by a constant

pyclblas.clblasCscal(N, alpha, X, offx, incx, commandQueues, eventWaitList)

wraps: clblasCscal

Scales a complex-float vector by a complex-float constant.

  • ( X ← α X )
Parameters:
  • N (int [in]) – Number of elements in vector X.
  • alpha (complex [in]) – The constant factor for vector X.
  • X (pyopencl.Buffer [out]) – 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.
  • 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.clblasDscal(N, alpha, X, offx, incx, commandQueues, eventWaitList)

wraps: clblasDscal

Scales a double vector by a double constant.

  • ( X ← α X )
Parameters:
  • N (int [in]) – Number of elements in vector X.
  • alpha (float [in]) – The constant factor for vector X.
  • X (pyopencl.Buffer [out]) – 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.
  • 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.clblasSscal(N, alpha, X, offx, incx, commandQueues, eventWaitList)

wraps: clblasSscal

Scales a float vector by a float constant.

  • ( X ← α X )
Parameters:
  • N (int [in]) – Number of elements in vector X.
  • alpha (float [in]) – The constant factor for vector X.
  • X (pyopencl.Buffer [out]) – 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.
  • 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.clblasZscal(N, alpha, X, offx, incx, commandQueues, eventWaitList)

wraps: clblasZscal

Scales a complex-double vector by a complex-double constant.

  • ( X ← α X )
Parameters:
  • N (int [in]) – Number of elements in vector X.
  • alpha (complex [in]) – The constant factor for vector X.
  • X (pyopencl.Buffer [out]) – 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.
  • 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.