PeriDyno 0.8.2
Platform.h
Go to the documentation of this file.
1#pragma once
2#define PERIDYNO_VERSION 0.8.2
3#define PERIDYNO_VERSION_MAJOR 0
4#define PERIDYNO_VERSION_MINOR 8
5#define PERIDYNO_VERSION_PATCH 2
6
7
8#if ((defined _WIN32) || (defined(__MINGW32__) || defined(__CYGWIN__))) && defined(_DLL)
9#if !defined(PERIDYNO_DLL) && !defined(PERIDYNO_STATIC)
10#define PERIDYNO_DLL
11#endif
12#endif
13
14#if ((defined _WIN32) || (defined(__MINGW32__) || defined(__CYGWIN__))) && defined(PERIDYNO_DLL)
15#define PERIDYNO_EXPORT extern "C" __declspec(dllexport)
16#define PERIDYNO_IMPORT extern "C" __declspec(dllimport)
17#else
18#define PERIDYNO_EXPORT
19#define PERIDYNO_IMPORT
20#endif
21
22#if defined(PERIDYNO_API_EXPORTS)
23#define PERIDYNO_API PERIDYNO_EXPORT
24#else
25#define PERIDYNO_API PERIDYNO_IMPORT
26#endif
27
28#define CUDA_BACKEND
29
30#if(defined(CUDA_BACKEND))
31#include <cuda_runtime.h>
32# define DYN_FUNC __device__ __host__
33# define GPU_FUNC __device__
34# define CPU_FUNC __host__
35#else
36# define DYN_FUNC
37# define GPU_FUNC
38# define CPU_FUNC
39#endif
40
42{
46};
47
48#define PRECISION_FLOAT
49
50#include "Typedef.inl"
51const inline std::string getAssetPath() {
52#if defined(VK_USE_PLATFORM_ANDROID_KHR)
53 return "";
54#elif defined(VK_EXAMPLE_DATA_DIR)
55 return VK_EXAMPLE_DATA_DIR;
56#else
57 return "E:/Peridyno/peridyno/data/";
58#endif
59}
60
61const inline std::string getPluginPath() {
62 return "E:/Peridyno/build-peridyno-master/plugin/";
63}
64
65//#define SIMULATION2D
const std::string getAssetPath()
Definition: Platform.h:51
const std::string getPluginPath()
Definition: Platform.h:61
DeviceType
Definition: Platform.h:42
@ CPU
Definition: Platform.h:43
@ UNDEFINED
Definition: Platform.h:45
@ GPU
Definition: Platform.h:44