imate
C++/CUDA Reference
cu_affine_matrix_function.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3  * SPDX-License-Identifier: BSD-3-Clause
4  * SPDX-FileType: SOURCE
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the license found in the LICENSE.txt file in the root
8  * directory of this source tree.
9  */
10 
11 
12 #ifndef _CU_LINEAR_OPERATOR_CU_AFFINE_MATRIX_FUNCTION_H_
13 #define _CU_LINEAR_OPERATOR_CU_AFFINE_MATRIX_FUNCTION_H_
14 
15 
16 // =======
17 // Headers
18 // =======
19 
20 #include "../_definitions/types.h" // LongIndexType
21 #include "./cu_linear_operator.h" // cuLinearOperator
22 
23 
24 // =========================
25 // cu Affine Matrix Function
26 // =========================
27 
37 
38 
39 template <typename DataType>
40 class cuAffineMatrixFunction : public cuLinearOperator<DataType>
41 {
42  public:
43 
44  // Member methods
46 
47  virtual ~cuAffineMatrixFunction();
48 
49  void set_parameters(DataType* t);
50 
51  DataType get_eigenvalue(
52  const DataType* known_parameters,
53  const DataType known_eigenvalue,
54  const DataType* inquiry_parameters) const;
55 
56  protected:
57 
58  // Member methods
59  void _add_scaled_vector(
60  const DataType* input_vector,
61  const LongIndexType vector_size,
62  const DataType scale,
63  DataType* output_vector) const;
64 
65  // Member data
67 };
68 
69 
70 #endif // _CU_LINEAR_OPERATOR_CU_AFFINE_MATRIX_FUNCTION_H_
Base class for affine matrix functions of one parameter.
virtual ~cuAffineMatrixFunction()
Virtual destructor.
void set_parameters(DataType *t)
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.
Base class for linear operators. This class serves as interface for all derived classes.
int LongIndexType
Definition: types.h:60