14#if defined(_WIN32) || defined(__CYGWIN__)
15#define OPEN3D_DLL_IMPORT __declspec(dllimport)
16#define OPEN3D_DLL_EXPORT __declspec(dllexport)
17#define OPEN3D_DLL_LOCAL
19#define OPEN3D_DLL_IMPORT [[gnu::visibility("default")]]
20#define OPEN3D_DLL_EXPORT [[gnu::visibility("default")]]
21#define OPEN3D_DLL_LOCAL [[gnu::visibility("hidden")]]
28#define OPEN3D_LOCAL OPEN3D_DLL_LOCAL
29#if defined(OPEN3D_ENABLE_DLL_EXPORTS)
30#define OPEN3D_API OPEN3D_DLL_EXPORT
32#define OPEN3D_API OPEN3D_DLL_IMPORT
39#define OPEN3D_FUNCTION __FUNCSIG__
41#define OPEN3D_FUNCTION __PRETTY_FUNCTION__
53#define OPEN3D_ASSERT_EXPAND(...) __VA_ARGS__
54#define OPEN3D_ASSERT_GET_MACRO(_1, _2, NAME, ...) NAME
55#define OPEN3D_ASSERT_CHOOSER(...) \
56 OPEN3D_ASSERT_EXPAND(OPEN3D_ASSERT_GET_MACRO( \
57 __VA_ARGS__, OPEN3D_ASSERT_MSG, OPEN3D_ASSERT_1, ))
58#define OPEN3D_ASSERT(...) \
59 OPEN3D_ASSERT_EXPAND(OPEN3D_ASSERT_CHOOSER(__VA_ARGS__)(__VA_ARGS__))
60#define OPEN3D_ASSERT_1(condition) \
61 OPEN3D_ASSERT_MSG(condition, "Assertion failed: " #condition)
63#if defined(__CUDA_ARCH__)
67#define OPEN3D_ASSERT_MSG(condition, message) \
70 ::open3d::detail::Open3DCudaAssertReportAndTrap(message); \
74#elif defined(__SYCL_DEVICE_ONLY__)
76#include <sycl/ext/oneapi/experimental/builtins.hpp>
77#include <sycl/sycl.hpp>
82inline void Open3DSyclAssertReportAndTrap(
const char *message) {
83 sycl::ext::oneapi::experimental::printf(
84 "Open3D SYCL device assertion failed: %s\n", message);
91#define OPEN3D_ASSERT_MSG(condition, message) \
94 ::open3d::detail::Open3DSyclAssertReportAndTrap(message); \
100#define OPEN3D_ASSERT_MSG(condition, message) \
102 if (!(condition)) { \
103 ::open3d::utility::Logger::LogError_( \
104 __FILE__, __LINE__, \
105 static_cast<const char *>(OPEN3D_FUNCTION), "{}", \
Definition PinholeCameraIntrinsic.cpp:16