ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleBase::vector_mul_real_op< T, Device > Struct Template Reference

#include <math_kernel_op.h>

Collaboration diagram for ModuleBase::vector_mul_real_op< T, Device >:

Public Types

using Real = typename GetTypeReal<T>::type

Public Member Functions

void operator() (const int dim, T *result, const T *vector, const Real constant)
 result[i] = vector[i] * constant, where vector is complex number and constant is real number。 It is different from the scal_op, which is used to multiply a complex number by a complex number.

Member Typedef Documentation

◆ Real

template<typename T, typename Device>
using ModuleBase::vector_mul_real_op< T, Device >::Real = typename GetTypeReal<T>::type

Member Function Documentation

◆ operator()()

template<typename T, typename Device>
void ModuleBase::vector_mul_real_op< T, Device >::operator() ( const int dim,
T * result,
const T * vector,
const Real constant )

result[i] = vector[i] * constant, where vector is complex number and constant is real number。 It is different from the scal_op, which is used to multiply a complex number by a complex number.

Input Parameters

Parameters
dim: array size
vector: input array
constant: input constant

Output Parameters

Parameters
result: output array
Note
Use mulitple instead of divide. It is faster.

The documentation for this struct was generated from the following file: