Rocprofiler SDK Developer API: rocprofiler-sdk/defines.h Source File
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
|
Go to the documentation of this file.
47#define ROCPROFILER_SDK_VERSION_0_0
51#if !defined(ROCPROFILER_ATTRIBUTE)
53# define ROCPROFILER_ATTRIBUTE(...) __declspec(__VA_ARGS__)
55# define ROCPROFILER_ATTRIBUTE(...) __attribute__((__VA_ARGS__))
59#if !defined(ROCPROFILER_PUBLIC_API)
61# define ROCPROFILER_PUBLIC_API ROCPROFILER_ATTRIBUTE(dllexport)
63# define ROCPROFILER_PUBLIC_API ROCPROFILER_ATTRIBUTE(visibility("default"))
67#if !defined(ROCPROFILER_HIDDEN_API)
69# define ROCPROFILER_HIDDEN_API
71# define ROCPROFILER_HIDDEN_API ROCPROFILER_ATTRIBUTE(visibility("hidden"))
75#if !defined(ROCPROFILER_EXPORT_DECORATOR)
76# define ROCPROFILER_EXPORT_DECORATOR ROCPROFILER_PUBLIC_API
79#if !defined(ROCPROFILER_IMPORT_DECORATOR)
81# define ROCPROFILER_IMPORT_DECORATOR ROCPROFILER_ATTRIBUTE(dllimport)
83# define ROCPROFILER_IMPORT_DECORATOR
87#define ROCPROFILER_EXPORT ROCPROFILER_EXPORT_DECORATOR
88#define ROCPROFILER_IMPORT ROCPROFILER_IMPORT_DECORATOR
90#if !defined(ROCPROFILER_API)
91# if defined(rocprofiler_EXPORTS)
92# define ROCPROFILER_API ROCPROFILER_EXPORT
94# define ROCPROFILER_API ROCPROFILER_IMPORT
98#if defined(__has_attribute)
99# if __has_attribute(nonnull)
100# define ROCPROFILER_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
102# define ROCPROFILER_NONNULL(...)
105# if defined(__GNUC__)
106# define ROCPROFILER_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
108# define ROCPROFILER_NONNULL(...)
112#if __cplusplus >= 201103L
114# define ROCPROFILER_HANDLE_LITERAL(type, value) (type{value})
115#elif __STDC_VERSION__ >= 199901L
117# define ROCPROFILER_HANDLE_LITERAL(type, value) ((type){value})
119# define ROCPROFILER_HANDLE_LITERAL(type, value) \
126# define ROCPROFILER_EXTERN_C_INIT extern "C" {
127# define ROCPROFILER_EXTERN_C_FINI }
128# define ROCPROFILER_CXX_CODE(...) __VA_ARGS__
130# define ROCPROFILER_EXTERN_C_INIT
131# define ROCPROFILER_EXTERN_C_FINI
132# define ROCPROFILER_CXX_CODE(...)
136# define ROCPROFILER_UINT64_C(value) uint64_t(value)
138# define ROCPROFILER_UINT64_C(value) UINT64_C(value)