base.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2022, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <raft/core/handle.hpp>
19 #include <raft/core/interruptible.hpp>
20 #include <raft/util/cuda_utils.cuh>
21 
22 namespace ML {
23 
24 template <typename T>
25 struct SimpleDenseMat;
26 
27 template <typename T>
28 struct SimpleMat {
29  int m, n;
30 
31  SimpleMat(int m, int n) : m(m), n(n) {}
32 
33  void operator=(const SimpleMat<T>& other) = delete;
34 
35  virtual void print(std::ostream& oss) const = 0;
36 
44  virtual void gemmb(const raft::handle_t& handle,
45  const T alpha,
46  const SimpleDenseMat<T>& A,
47  const bool transA,
48  const bool transB,
49  const T beta,
51  cudaStream_t stream) const = 0;
52 };
53 
54 }; // namespace ML
Definition: dbscan.hpp:30
Definition: dense.hpp:41
Definition: base.hpp:28
int m
Definition: base.hpp:29
int n
Definition: base.hpp:29
virtual void print(std::ostream &oss) const =0
void operator=(const SimpleMat< T > &other)=delete
virtual void gemmb(const raft::handle_t &handle, const T alpha, const SimpleDenseMat< T > &A, const bool transA, const bool transB, const T beta, SimpleDenseMat< T > &C, cudaStream_t stream) const =0
SimpleMat(int m, int n)
Definition: base.hpp:31