1 #ifndef NV_CORE_H 2 #error "Do not include this file directly." 3 #endif 4 5 //#include <stdint.h> // uint8_t, int8_t, ... 6 7 // Function linkage 8 #define DLL_IMPORT 9 #if __GNUC__ >= 4 10 # define DLL_EXPORT __attribute__((visibility("default"))) 11 # define DLL_EXPORT_CLASS DLL_EXPORT 12 #else 13 # define DLL_EXPORT 14 # define DLL_EXPORT_CLASS 15 #endif 16 17 // Function calling modes 18 #if NV_CPU_X86 19 # define NV_CDECL __attribute__((cdecl)) 20 # define NV_STDCALL __attribute__((stdcall)) 21 #else 22 # define NV_CDECL 23 # define NV_STDCALL 24 #endif 25 26 #define NV_FASTCALL __attribute__((fastcall)) 27 #define NV_FORCEINLINE __attribute__((always_inline)) 28 #define NV_DEPRECATED __attribute__((deprecated)) 29 30 #if __GNUC__ > 2 31 #define NV_PURE __attribute__((pure)) 32 #define NV_CONST __attribute__((const)) 33 #else 34 #define NV_PURE 35 #define NV_CONST 36 #endif 37 38 // Define __FUNC__ properly. 39 #if __STDC_VERSION__ < 199901L 40 # if __GNUC__ >= 2 41 # define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__ 42 # else 43 # define __FUNC__ "<unknown>" 44 # endif 45 #else 46 # define __FUNC__ __PRETTY_FUNCTION__ 47 #endif 48 49 #define restrict __restrict__ 50 51 /* 52 // Type definitions 53 typedef uint8_t uint8; 54 typedef int8_t int8; 55 56 typedef uint16_t uint16; 57 typedef int16_t int16; 58 59 typedef uint32_t uint32; 60 typedef int32_t int32; 61 62 typedef uint64_t uint64; 63 typedef int64_t int64; 64 65 // Aliases 66 typedef uint32 uint; 67 */ 68