OmniSciDB  04ee39c94c
CudaMgrNoCuda.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2018 OmniSci, Inc.
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 
17 #include "CudaMgr.h"
18 #include "Shared/Logger.h"
19 
20 namespace CudaMgr_Namespace {
21 
22 CudaMgr::CudaMgr(const int, const int)
23  : device_count_(-1)
24  , gpu_driver_version_(-1)
25  , start_gpu_(-1)
26  , max_shared_memory_for_all_(0) {
27  CHECK(false);
28 }
29 
31 
32 void CudaMgr::synchronizeDevices() const {
33  CHECK(false);
34 }
35 
36 void CudaMgr::copyHostToDevice(int8_t* device_ptr,
37  const int8_t* host_ptr,
38  const size_t num_bytes,
39  const int device_num) {
40  CHECK(false);
41 }
42 void CudaMgr::copyDeviceToHost(int8_t* host_ptr,
43  const int8_t* device_ptr,
44  const size_t num_bytes,
45  const int device_num) {
46  CHECK(false);
47 }
48 void CudaMgr::copyDeviceToDevice(int8_t* dest_ptr,
49  int8_t* src_ptr,
50  const size_t num_bytes,
51  const int dest_device_num,
52  const int src_device_num) {
53  CHECK(false);
54 }
55 
56 int8_t* CudaMgr::allocatePinnedHostMem(const size_t num_bytes) {
57  CHECK(false);
58  return nullptr;
59 }
60 int8_t* CudaMgr::allocateDeviceMem(const size_t num_bytes, const int device_num) {
61  CHECK(false);
62  return nullptr;
63 }
64 void CudaMgr::freePinnedHostMem(int8_t* host_ptr) {
65  CHECK(false);
66 }
67 void CudaMgr::freeDeviceMem(int8_t* device_ptr) {
68  CHECK(false);
69 }
70 void CudaMgr::zeroDeviceMem(int8_t* device_ptr,
71  const size_t num_bytes,
72  const int device_num) {
73  CHECK(false);
74 }
75 void CudaMgr::setDeviceMem(int8_t* device_ptr,
76  const unsigned char uc,
77  const size_t num_bytes,
78  const int device_num) {
79  CHECK(false);
80 }
81 
83  CHECK(false);
84  return false;
85 }
86 bool CudaMgr::isArchVoltaForAll() const {
87  CHECK(false);
88  return false;
89 }
90 
91 void CudaMgr::setContext(const int) const {
92  CHECK(false);
93 }
94 
95 } // namespace CudaMgr_Namespace
void copyDeviceToHost(int8_t *host_ptr, const int8_t *device_ptr, const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:80
int8_t * allocatePinnedHostMem(const size_t num_bytes)
Definition: CudaMgr.cpp:197
bool isArchMaxwellOrLaterForAll() const
Definition: CudaMgr.cpp:239
void copyDeviceToDevice(int8_t *dest_ptr, int8_t *src_ptr, const size_t num_bytes, const int dest_device_num, const int src_device_num)
Definition: CudaMgr.cpp:89
void freeDeviceMem(int8_t *device_ptr)
Definition: CudaMgr.cpp:215
void synchronizeDevices() const
Definition: CudaMgr.cpp:64
void setDeviceMem(int8_t *device_ptr, const unsigned char uc, const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:227
void copyHostToDevice(int8_t *device_ptr, const int8_t *host_ptr, const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:71
bool isArchVoltaForAll() const
Definition: CudaMgr.cpp:252
void freePinnedHostMem(int8_t *host_ptr)
Definition: CudaMgr.cpp:211
#define CHECK(condition)
Definition: Logger.h:187
CudaMgr(const int num_gpus, const int start_gpu=0)
Definition: CudaMgr.cpp:26
void setContext(const int device_num) const
Definition: CudaMgr.cpp:298
void zeroDeviceMem(int8_t *device_ptr, const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:221
int8_t * allocateDeviceMem(const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:204