Ponca
aa50bfdf187919869239c5b44b748842569114c1
Point Cloud Analysis library
Loading...
Searching...
No Matches
defines.h
1
/*
2
This Source Code Form is subject to the terms of the Mozilla Public
3
License, v. 2.0. If a copy of the MPL was not distributed with this
4
file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
*/
6
7
8
#pragma once
9
18
// Compatibility types, macros, functions
19
//
20
#ifdef __CUDACC__
21
# include <cuda.h>
22
# define PONCA_MULTIARCH __host__ __device__
23
#else
24
# define PONCA_MULTIARCH
25
26
// GCC: compile with -std=c++0x
27
# if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ >= 5))
28
# if defined(nullptr_t) || (__cplusplus > 199711L) || defined(HACK_GCC_ITS_CPP0X)
29
# define __CPP0X__
30
# endif
31
# endif
32
33
#endif
// ifdef __CUDACC__
34
35
#ifdef __CUDA_ARCH__
36
#define PONCA_MULTIARCH_INCLUDE_STD(FILENAME) "defines.h"
37
#define PONCA_MULTIARCH_STD_MATH(FUNC)
38
39
//see https://nvidia.github.io/libcudacxx/standard_api.html
40
#define PONCA_MULTIARCH_CU_STD_NAMESPACE(FUNC) cuda::std::FUNC
41
#define PONCA_MULTIARCH_INCLUDE_CU_STD(FILENAME) <cuda/std/FILENAME>
42
43
#define PONCA_CUDA_ARCH
44
#else
45
#define PONCA_MULTIARCH_INCLUDE_STD(FILENAME) <FILENAME>
46
#define PONCA_MULTIARCH_STD_MATH(FUNC) using std::FUNC;
47
#define PONCA_MULTIARCH_CU_STD_NAMESPACE(FUNC) std::FUNC
48
#define PONCA_MULTIARCH_INCLUDE_CU_STD(FILENAME) <FILENAME>
49
#define PONCA_CPU_ARCH
50
#endif
51
52
#ifndef PONCA_DEBUG
53
#define STD_SAFE_AT(C,i) C[i]
54
#else
55
#define STD_SAFE_AT(C,i) C.at(i)
56
#endif
src
Ponca
src
Common
defines.h
Generated on Tue Oct 29 2024 09:49:07 for Ponca by
1.9.6