Template Function Pennylane::LightningGPU::Util::scaleAndAdd_CUDA¶
Defined in File LinearAlg.hpp
Function Documentation¶
-
template<class T = double, class DevTypeID = int>
inline auto Pennylane::LightningGPU::Util::scaleAndAdd_CUDA(const T a, const T *v1, T *v2, const int data_size, DevTypeID dev_id, cudaStream_t stream_id, const CublasCaller &cublas)¶ cuBLAS backed GPU SAXPY/DAXPY.
- Template Parameters
T – Float data-type. Accepts float and 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.
api/function_LinearAlg_8hpp_1a8928eac1b83a84b256ef55197c17b84e
Download Python script
Download Notebook
View on GitHub