imate
C++/CUDA Reference
Loading...
Searching...
No Matches
c_linear_operator.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 _C_LINEAR_OPERATOR_C_LINEAR_OPERATOR_H_
13#define _C_LINEAR_OPERATOR_C_LINEAR_OPERATOR_H_
14
15// =======
16// Headers
17// =======
18
19#include "../_definitions/types.h" // FlagType, IndexType, LongIndexType
20#include "./c_linear_operator_base.h" // cLinearOperatorBase
21
22
23// =================
24// c Linear Operator
25// =================
26
40
41template <typename DataType>
43{
44 public:
45
46 // Member methods
48
49 virtual ~cLinearOperator();
50
51 void set_parameters(DataType* parameters_);
52
53 virtual DataType get_eigenvalue(
54 const DataType* known_parameters,
55 const DataType known_eigenvalue,
56 const DataType* inquiry_parameters) const = 0;
57
58 virtual void dot(
59 const DataType* vector,
60 DataType* product) = 0;
61
62 virtual void transpose_dot(
63 const DataType* vector,
64 DataType* product) = 0;
65
66 protected:
67
68 // Member data
69 DataType* parameters;
70};
71
72#endif // _C_LINEAR_OPERATOR_C_LINEAR_OPERATOR_H_
Base class for cLinearOperator and cuLinearOperator . This class is not templated so that both cpp an...
Base class for linear operators. This class serves as interface for all derived classes.
virtual DataType get_eigenvalue(const DataType *known_parameters, const DataType known_eigenvalue, const DataType *inquiry_parameters) const =0
virtual void transpose_dot(const DataType *vector, DataType *product)=0
virtual void dot(const DataType *vector, DataType *product)=0
virtual ~cLinearOperator()
Destructor.
cLinearOperator()
Default constructor.
void set_parameters(DataType *parameters_)
Sets the scalar parameter this->parameters. Parameter is initialized to NULL. However,...