imate
C++/CUDA Reference
Loading...
Searching...
No Matches
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
53
54template <typename DataType>
55class cuAffineMatrixFunction : virtual public cuLinearOperator<DataType>
56{
57 public:
58
59 // Member methods
61
63
64 void set_parameters(DataType* t);
65
66 virtual void set_symmetry(FlagType symmetric) = 0;
67
68 DataType get_eigenvalue(
69 const DataType* known_parameters,
70 const DataType known_eigenvalue,
71 const DataType* inquiry_parameters) const;
72
73 protected:
74
75 // Member methods
77 const DataType* input_vector,
78 const LongIndexType vector_size,
79 const DataType scale,
80 DataType* output_vector) const;
81
82 // Member data
84};
85
86
87#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)
virtual void set_symmetry(FlagType symmetric)=0
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
int FlagType
Definition types.h:68