imate
C++/CUDA Reference
cu_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 _CU_LINEAR_OPERATOR_CU_CSC_AFFINE_MATRIX_FUNCTION_H_
13 #define _CU_LINEAR_OPERATOR_CU_CSC_AFFINE_MATRIX_FUNCTION_H_
14 
15 
16 // =======
17 // Headers
18 // =======
19 
20 #include "../_definitions/types.h" // LongIndexType
21 #include "./cu_csc_matrix.h" // cuCSCMatrix
22 #include "./cu_affine_matrix_function.h" // cuAffineMatrixFunction
23 
24 
25 // =============================
26 // cu 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  const int num_gpu_devices_);
42 
44  const DataType* A_data_,
45  const LongIndexType* A_indices_,
46  const LongIndexType* A_index_pointer_,
47  const LongIndexType num_rows_,
48  const LongIndexType num_colums_,
49  const DataType* B_data_,
50  const LongIndexType* B_indices_,
51  const LongIndexType* B_index_pointer_,
52  const int num_gpu_devices_);
53 
55 
56  virtual void dot(
57  const DataType* vector,
58  DataType* product);
59 
60  virtual void transpose_dot(
61  const DataType* vector,
62  DataType* product);
63 
64  protected:
65 
66  // Member data
69 };
70 
71 #endif // _CU_LINEAR_OPERATOR_CU_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:
cuCSCAffineMatrixFunction(const DataType *A_data_, const LongIndexType *A_indices_, const LongIndexType *A_index_pointer_, const LongIndexType num_rows_, const LongIndexType num_columns_, const int num_gpu_devices_)
Constructor. Matrix B is assumed to be the identity matrix.
virtual void dot(const DataType *vector, DataType *product)
Computes the matrix vector product:
int LongIndexType
Definition: types.h:60