imate
C++/CUDA Reference
cu_matrix.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_MATRIX_H_
13 #define _CU_LINEAR_OPERATOR_CU_MATRIX_H_
14 
15 
16 // =======
17 // Headers
18 // =======
19 
20 #include "../_definitions/types.h" // FlagType, IndexType, LongIndexType
21 #include "./cu_linear_operator.h" // cuLinearOperator
22 
23 
24 // ========
25 // c Matrix
26 // ========
27 
37 
38 
39 template <typename DataType>
40 class cuMatrix : public cuLinearOperator<DataType>
41 {
42  public:
43 
44  // Member methods
45  cuMatrix();
46  explicit cuMatrix(int num_gpu_devices_);
47 
48  virtual ~cuMatrix();
49 
50  virtual void copy_host_to_device() = 0;
51 };
52 
53 
54 #endif // _CU_LINEAR_OPERATOR_CU_MATRIX_H_
Base class for linear operators. This class serves as interface for all derived classes.
Base class for constant matrices.
Definition: cu_matrix.h:41
cuMatrix()
Definition: cu_matrix.cu:24
virtual ~cuMatrix()
Definition: cu_matrix.cu:45
virtual void copy_host_to_device()=0