imate
C++/CUDA Reference
Loading...
Searching...
No Matches
c_get_config.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright 2022, 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// =======
13// Headers
14// =======
15
16#include "./c_get_config.h"
17
18
19// ============
20// is use cblas
21// ============
22
25
27{
28 #if defined(USE_CBLAS) && (USE_CBLAS == 1)
29 return 1;
30 #else
31 return 0;
32 #endif
33}
34
35// ==========
36// is use mkl
37// ==========
38
41
43{
44 #if defined(USE_MKL) && (USE_MKL == 1)
45 return 1;
46 #else
47 return 0;
48 #endif
49}
50
51
52// =============
53// is use openmp
54// =============
55
58
60{
61 #if defined(USE_OPENMP) && (USE_OPENMP == 1)
62 return 1;
63 #else
64 return 0;
65 #endif
66}
67
68
69// =====================
70// is use loop unrolling
71// =====================
72
75
77{
78 #if defined(USE_LOOP_UNROLLING) && (USE_LOOP_UNROLLING == 1)
79 return 1;
80 #else
81 return 0;
82 #endif
83}
84
85
86// ===========
87// is use cuda
88// ===========
89
92
94{
95 #if defined(USE_CUDA) && (USE_CUDA == 1)
96 return 1;
97 #else
98 return 0;
99 #endif
100}
101
102
103// =======================
104// is cuda dynamic loading
105// =======================
106
109
111{
112 #if defined(CUDA_DYNAMIC_LOADING) && (CUDA_DYNAMIC_LOADING == 1)
113 return 1;
114 #else
115 return 0;
116 #endif
117}
118
119
120// =============
121// is debug mode
122// =============
123
126
128{
129 #if defined(DEBUG_MODE) && (DEBUG_MODE == 1)
130 return 1;
131 #else
132 return 0;
133 #endif
134}
135
136
137// =========================
138// is cython build in source
139// =========================
140
143
145{
146 #if defined(CYTHON_BUILD_IN_SOURCE) && (CYTHON_BUILD_IN_SOURCE == 1)
147 return 1;
148 #else
149 return 0;
150 #endif
151}
152
153
154// =======================
155// is cython build for doc
156// =======================
157
160
162{
163 #if defined(CYTHON_BUILD_FOR_DOC) && (CYTHON_BUILD_FOR_DOC == 1)
164 return 1;
165 #else
166 return 0;
167 #endif
168}
169
170
171// ===============
172// is use long int
173// ===============
174
177
179{
180 #if defined(USE_LONG_INT) && (USE_LONG_INT == 1)
181 return 1;
182 #else
183 return 0;
184 #endif
185}
186
187
188// ========================
189// is use unsigned long int
190// ========================
191
194
196{
197 #if defined(USE_UNSIGNED_LONG_INT) && (USE_UNSIGNED_LONG_INT == 1)
198 return 1;
199 #else
200 return 0;
201 #endif
202}
bool is_use_mkl()
Returns USE_MKL.
bool is_cython_build_in_source()
Returns CYTHON_BUILD_IN_SOURCE.
bool is_use_cuda()
Returns USE_CUDA.
bool is_use_unsigned_long_int()
Returns USE_UNSIGNED_LONG_INT.
bool is_use_loop_unrolling()
Returns USE_LOOP_UNROLLING.
bool is_cython_build_for_doc()
Returns CYTHON_BUILD_FOR_DOC.
bool is_use_cblas()
Returns USE_CBLAS.
bool is_use_long_int()
Returns USE_LONG_INT.
bool is_cuda_dynamic_loading()
Returns CUDA_DYNAMIC_LOADING.
bool is_use_openmp()
Returns USE_OPENMP.
bool is_debug_mode()
Returns DEBUG_MODE.