Template Function Pennylane::LightningGPU::Util::scaleAndAddC_CUDA

Function Documentation

template<class CFP_t = std::complex<double>, class T = cuDoubleComplex, class DevTypeID = int>
inline auto Pennylane::LightningGPU::Util::scaleAndAddC_CUDA(const CFP_t a, const T *v1, T *v2, const int data_size, DevTypeID dev_id, cudaStream_t stream_id, const CublasCaller &cublas)

cuBLAS backed GPU C/ZAXPY.

Template Parameters

CFP_t – Complex data-type. Accepts std::complex<float> and std::complex<double>

Parameters
  • a – scaling factor

  • v1 – Device data pointer 1 (data to be modified)

  • v2 – Device data pointer 2 (the result data)

  • data_size – Length of device data.

  • dev_id – the device on which the function should be executed.

  • stream_id – the CUDA stream on which the operation should be executed.

  • cublas – the CublasCaller object that manages the cuBLAS handle.