18 #include "../_definitions/debugging.h"
19 #include "../_cu_basic_algebra/cu_vector_operations.h"
20 #include "../_cuda_utilities/cuda_interface.h"
30 template <
typename DataType>
45 template <
typename DataType>
92 template <
typename DataType>
94 const DataType* known_parameters,
95 const DataType known_eigenvalue,
96 const DataType* inquiry_parameters)
const
98 ASSERT((this->eigenvalue_relation_known == 1),
99 "An eigenvalue relation is not known. This function should be "
100 "called only when the matrix B is a scalar multiple of the "
104 DataType inquiry_eigenvalue = \
105 known_eigenvalue - known_parameters[0] + inquiry_parameters[0];
107 return inquiry_eigenvalue;
130 template <
typename DataType>
132 const DataType* input_vector,
134 const DataType scale,
135 DataType* output_vector)
const
142 this->cublas_handle[device_id], input_vector, vector_size, -scale,
static int get_device()
Gets the current device in multi-gpu applications.
Base class for affine matrix functions of one parameter.
virtual ~cuAffineMatrixFunction()
Virtual destructor.
cuAffineMatrixFunction()
Constructor.
DataType get_eigenvalue(const DataType *known_parameters, const DataType known_eigenvalue, const DataType *inquiry_parameters) const
This function defines an analytic relationship between a given set of parameters and the correspondin...
void _add_scaled_vector(const DataType *input_vector, const LongIndexType vector_size, const DataType scale, DataType *output_vector) const
Performs the operation , where is an input vector scaled by and it the output vector.
static void subtract_scaled_vector(cublasHandle_t cublas_handle, const DataType *input_vector, const LongIndexType vector_size, const DataType scale, DataType *output_vector)
Subtracts the scaled input vector from the output vector.
#define ASSERT(condition, message)