OmniSciDB  8a228a1076
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 "Logger/Logger.h"
19 
20 namespace CudaMgr_Namespace {
21 
22 CudaMgr::CudaMgr(const int, const int) : device_count_(-1), start_gpu_(-1) {
23  CHECK(false);
24 }
25 
27 
28 void CudaMgr::synchronizeDevices() const {
29  CHECK(false);
30 }
31 
32 void CudaMgr::copyHostToDevice(int8_t* device_ptr,
33  const int8_t* host_ptr,
34  const size_t num_bytes,
35  const int device_num) {
36  CHECK(false);
37 }
38 void CudaMgr::copyDeviceToHost(int8_t* host_ptr,
39  const int8_t* device_ptr,
40  const size_t num_bytes,
41  const int device_num) {
42  CHECK(false);
43 }
44 void CudaMgr::copyDeviceToDevice(int8_t* dest_ptr,
45  int8_t* src_ptr,
46  const size_t num_bytes,
47  const int dest_device_num,
48  const int src_device_num) {
49  CHECK(false);
50 }
51 
52 int8_t* CudaMgr::allocatePinnedHostMem(const size_t num_bytes) {
53  CHECK(false);
54  return nullptr;
55 }
56 int8_t* CudaMgr::allocateDeviceMem(const size_t num_bytes, const int device_num) {
57  CHECK(false);
58  return nullptr;
59 }
60 void CudaMgr::freePinnedHostMem(int8_t* host_ptr) {
61  CHECK(false);
62 }
63 void CudaMgr::freeDeviceMem(int8_t* device_ptr) {
64  CHECK(false);
65 }
66 void CudaMgr::zeroDeviceMem(int8_t* device_ptr,
67  const size_t num_bytes,
68  const int device_num) {
69  CHECK(false);
70 }
71 void CudaMgr::setDeviceMem(int8_t* device_ptr,
72  const unsigned char uc,
73  const size_t num_bytes,
74  const int device_num) {
75  CHECK(false);
76 }
77 
79  CHECK(false);
80  return false;
81 }
83  CHECK(false);
84  return false;
85 }
86 
87 void CudaMgr::setContext(const int) const {
88  CHECK(false);
89 }
90 
91 } // 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:118
int8_t * allocatePinnedHostMem(const size_t num_bytes)
Definition: CudaMgr.cpp:246
bool isArchMaxwellOrLaterForAll() const
Definition: CudaMgr.cpp:288
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:127
void freeDeviceMem(int8_t *device_ptr)
Definition: CudaMgr.cpp:264
void synchronizeDevices() const
Definition: CudaMgr.cpp:102
void setDeviceMem(int8_t *device_ptr, const unsigned char uc, const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:276
bool isArchVoltaOrGreaterForAll() const
Definition: CudaMgr.cpp:301
void copyHostToDevice(int8_t *device_ptr, const int8_t *host_ptr, const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:109
void freePinnedHostMem(int8_t *host_ptr)
Definition: CudaMgr.cpp:260
#define CHECK(condition)
Definition: Logger.h:197
CudaMgr(const int num_gpus, const int start_gpu=0)
Definition: CudaMgr.cpp:48
void setContext(const int device_num) const
Definition: CudaMgr.cpp:362
void zeroDeviceMem(int8_t *device_ptr, const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:270
int8_t * allocateDeviceMem(const size_t num_bytes, const int device_num)
Definition: CudaMgr.cpp:253