imate
C++/CUDA Reference
c_csc_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 _C_LINEAR_OPERATOR_C_CSC_AFFINE_MATRIX_FUNCTION_H_
13 #define _C_LINEAR_OPERATOR_C_CSC_AFFINE_MATRIX_FUNCTION_H_
14 
15 
16 // =======
17 // Headers
18 // =======
19 
20 #include "../_definitions/types.h" // LongIndexType
21 #include "./c_affine_matrix_function.h" // cAffineMatrixFunction
22 #include "./c_csc_matrix.h" // cCSCMatrix
23 
24 
25 // ============================
26 // c CSC Affine Matrix Function
27 // ============================
28 
29 template <typename DataType>
31 {
32  public:
33 
34  // Member methods
36  const DataType* A_data_,
37  const LongIndexType* A_indices_,
38  const LongIndexType* A_index_pointer_,
39  const LongIndexType num_rows_,
40  const LongIndexType num_columns_);
41 
43  const DataType* A_data_,
44  const LongIndexType* A_indices_,
45  const LongIndexType* A_index_pointer_,
46  const LongIndexType num_rows_,
47  const LongIndexType num_colums_,
48  const DataType* B_data_,
49  const LongIndexType* B_indices_,
50  const LongIndexType* B_index_pointer_);
51 
52  virtual ~cCSCAffineMatrixFunction();
53 
54  virtual void dot(
55  const DataType* vector,
56  DataType* product);
57 
58  virtual void transpose_dot(
59  const DataType* vector,
60  DataType* product);
61 
62  protected:
63 
64  // Member data
67 };
68 
69 #endif // _C_LINEAR_OPERATOR_C_CSC_AFFINE_MATRIX_FUNCTION_H_
Base class for affine matrix functions of one parameter.
virtual void transpose_dot(const DataType *vector, DataType *product)
Computes the matrix vector product:
virtual void dot(const DataType *vector, DataType *product)
Computes the matrix vector product:
cCSCAffineMatrixFunction(const DataType *A_data_, const LongIndexType *A_indices_, const LongIndexType *A_index_pointer_, const LongIndexType num_rows_, const LongIndexType num_columns_)
Constructor. Matrix B is assumed to be the identity matrix.
int LongIndexType
Definition: types.h:60