#pragma once
#include <stddef.h>
#include <sys/types.h>
#include <stdbool.h>
#include "rtcore_config.h"
RTC_NAMESPACE_BEGIN
#if defined(_WIN32)
#if defined(_M_X64) || defined(_M_ARM64)
typedef long long ssize_t;
#else
typedef int ssize_t;
#endif
#endif
#if defined(_WIN32) && !defined(__MINGW32__)
#define RTC_ALIGN …
#else
#define RTC_ALIGN(...) …
#endif
#if !defined (RTC_DEPRECATED)
#ifdef __GNUC__
#define RTC_DEPRECATED …
#elif defined(_MSC_VER)
#define RTC_DEPRECATED …
#else
#define RTC_DEPRECATED
#endif
#endif
#if defined(_WIN32)
#define RTC_FORCEINLINE …
#else
#define RTC_FORCEINLINE …
#endif
#if defined(__cplusplus)
#define RTC_OPTIONAL_ARGUMENT …
#else
#define RTC_OPTIONAL_ARGUMENT
#endif
#define RTC_INVALID_GEOMETRY_ID …
#define RTC_MAX_TIME_STEP_COUNT …
enum RTCFormat
{ … };
enum RTCBuildQuality
{ … };
struct RTC_ALIGN(16) RTCBounds
{ … };
struct RTC_ALIGN(16) RTCLinearBounds
{ … };
enum RTCFeatureFlags
{ … };
enum RTCRayQueryFlags
{ … };
struct RTCFilterFunctionNArguments
{ … };
RTCFilterFunctionN;
struct RTCIntersectFunctionNArguments;
RTCIntersectFunctionN;
struct RTCOccludedFunctionNArguments;
RTCOccludedFunctionN;
struct RTCRayQueryContext
{ … };
RTC_FORCEINLINE void rtcInitRayQueryContext(struct RTCRayQueryContext* context)
{ … }
struct RTC_ALIGN(16) RTCPointQuery
{ … };
struct RTC_ALIGN(16) RTCPointQuery4
{ … };
struct RTC_ALIGN(32) RTCPointQuery8
{ … };
struct RTC_ALIGN(64) RTCPointQuery16
{ … };
struct RTCPointQueryN;
struct RTC_ALIGN(16) RTCPointQueryContext
{ … };
RTC_FORCEINLINE void rtcInitPointQueryContext(struct RTCPointQueryContext* context)
{ … }
struct RTC_ALIGN(16) RTCPointQueryFunctionArguments
{ … };
RTCPointQueryFunction;
#if defined(EMBREE_SYCL_SUPPORT) && defined(SYCL_LANGUAGE_VERSION)
template<auto F>
inline decltype(F) rtcGetSYCLDeviceFunctionPointer(sycl::queue& queue)
{
sycl::buffer<cl_ulong> fptr_buf(1);
{
auto fptr_acc = fptr_buf.get_host_access();
fptr_acc[0] = 0;
}
queue.submit([&](sycl::handler& cgh) {
auto fptr_acc = fptr_buf.get_access<sycl::access::mode::discard_write>(cgh);
cgh.single_task([=]() {
fptr_acc[0] = reinterpret_cast<cl_ulong>(F);
});
});
queue.wait_and_throw();
auto fptr_acc = fptr_buf.get_host_access();
return (decltype(F)) fptr_acc[0];
}
#endif
RTC_NAMESPACE_END