text
stringlengths
1
24.5M
// ====================================================================== lgtm [cpp/missing-header-guard] // == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! == // ====================================================================== // // doctest.h - the lightest feature-rich C++ single-header test...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include <functional> #include "parallel_reduce.h" namespace embree { template<typename Index, class UnaryPredicate> __forceinline bool parallel_any_of (Index first, Index last, UnaryPredicate pred) { std::ato...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "parallel_for.h" namespace embree { template<typename Ty, typename Index, typename Predicate> inline Index sequential_filter( Ty* data, const Index first, const Index last, const Predicate& predicate) { ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../tasking/taskscheduler.h" #include "../sys/array.h" #include "../math/emath.h" #include "../math/range.h" namespace embree { /* parallel_for without range */ template<typename Index, typename Func> __forc...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "parallel_for.h" namespace embree { template<typename ArrayArray, typename Func> __forceinline void sequential_for_for( ArrayArray& array2, const size_t minStepSize, const Func& func ) { size_t k=0; ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "parallel_for_for.h" #include "parallel_prefix_sum.h" namespace embree { template<typename Value> struct ParallelForForPrefixSumState : public ParallelForForState { __forceinline ParallelForForPrefixSumS...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "parallel_sort.h" namespace embree { /*! implementation of a key/value map with parallel construction */ template<typename Key, typename Val> class parallel_map { /* key/value pair to build the map */ ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "parallel_for.h" #include "../math/range.h" namespace embree { /* serial partitioning */ template<typename T, typename V, typename IsLeft, typename Reduction_T> __forceinline size_t serial_partitioning(T* ar...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "parallel_for.h" namespace embree { template<typename Value> struct ParallelPrefixSumState { enum { MAX_TASKS = 64 }; Value counts[MAX_TASKS]; Value sums [MAX_TASKS]; }; template<typename ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "parallel_for.h" namespace embree { template<typename Index, typename Value, typename Func, typename Reduction> __forceinline Value sequential_reduce( const Index first, const Index last, const Value& identity...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "parallel_sort.h" namespace embree { /* implementation of a set of values with parallel construction */ template<typename T> class parallel_set { public: /*! default constructor for the parallel set *...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../simd/simd.h" #include "parallel_for.h" #include <algorithm> namespace embree { template<class T> __forceinline void insertionsort_ascending(T *__restrict__ array, const size_t length) { for(size_t i ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "stringstream.h" #include "../sys/filename.h" #include "../math/vec2.h" #include "../math/vec3.h" #include "../math/col3.h" #include "../math/color.h" namespace embree { /*! helper class for simple command line pa...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/platform.h" #include "../sys/ref.h" #include "../sys/filename.h" #include "../sys/estring.h" #include <vector> #include <iostream> #include <cstdio> #include <string.h> namespace embree { /*! stores the l...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "stream.h" namespace embree { /* removes all line comments from a stream */ class LineCommentFilter : public Stream<int> { public: LineCommentFilter (const FileName& fileName, const std::string& lineComm...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "stringstream.h" namespace embree { static const std::string stringChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 _.,+-=:/*\\"; /* creates map for fast categorization of characters */ static void...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "stream.h" namespace embree { /*! simple tokenizer that produces a string stream */ class StringStream : public Stream<std::string> { public: StringStream(const Ref<Stream<int> >& cin, const std::string&...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "tokenstream.h" #include "../math/emath.h" namespace embree { /* shorthands for common sets of characters */ const std::string TokenStream::alpha = "abcdefghijklmnopqrstuvwxyz"; const std::string TokenStream::ALPHA = "ABCDE...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "stream.h" #include <string> #include <vector> namespace embree { /*! token class */ class Token { public: enum Type { TY_EOF, TY_CHAR, TY_INT, TY_FLOAT, TY_IDENTIFIER, TY_STRING, TY_SYMBOL }; Toke...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "linearspace2.h" #include "linearspace3.h" #include "quaternion.h" #include "bbox.h" #include "vec4.h" namespace embree { #define VectorT typename L::Vector #define ScalarT typename L::Vector::Scalar ////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "vec2.h" #include "vec3.h" namespace embree { namespace internal { template <typename T> __forceinline T divideByTwo(const T& v) { return v / T(2); } template <> __forceinline float divideByTwo<float>(con...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "emath.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// RGB Color Class ///////////////////////////////////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "emath.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// RGBA Color Class //////////////////////////////////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__) # include "color_sycl.h" #else #include "constants.h" #include "col3.h" #include "col4.h" #include "../simd/sse.h" namespace embree { ///////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "constants.h" #include "col3.h" #include "col4.h" #include "../simd/sse.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// SSE RGBA Color Class ////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "constants.h" namespace embree { }
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/platform.h" #include <limits> #define _USE_MATH_DEFINES #include <math.h> // using cmath causes issues under Windows #include <cfloat> #include <climits> namespace embree { static MAYBE_UNUSED const floa...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/platform.h" #include "../sys/intrinsics.h" #include "constants.h" #include <cmath> #if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__) # include "math_sycl.h" #else #if defined(__ARM_NEON) #i...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "vec2.h" #include "vec3.h" #include "bbox.h" namespace embree { template<typename V> struct Interval { V lower, upper; __forceinline Interval() {} __forceinline Interval ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "bbox.h" #include "range.h" namespace embree { template<typename T> __forceinline std::pair<T,T> globalLinear(const std::pair<T,T>& v, const BBox1f& dt) { const float rcp_dt_size = float(1.0f)/dt.size();...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "vec2.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// 2D Linear Transform (2x2 Matrix) ///////////////////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "vec3.h" #include "quaternion.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// 3D Linear Transform (3x3 Matrix) ///////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/platform.h" #include "../sys/intrinsics.h" #include "constants.h" #include <cmath> namespace embree { __forceinline bool isvalid ( const float& v ) { return (v > -FLT_LARGE) & (v < +FLT_LARGE); } ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "bbox.h" #include "linearspace3.h" namespace embree { /*! Oriented bounding box */ template<typename T> struct OBBox { public: __forceinline OBBox () {} __forceinline OBBox (EmptyTy) ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "vec3.h" #include "vec4.h" #include "transcendental.h" namespace embree { //////////////////////////////////////////////////////////////// // Quaternion Struct ////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/platform.h" #include "../math/emath.h" namespace embree { template<typename Ty> struct range { __forceinline range() {} __forceinline range(const Ty& begin) : _begin(begin), _...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once // Transcendental functions from "ispc": https://github.com/ispc/ispc/ // Most of the transcendental implementations in ispc code come from // Solomon Boulos's "syrah": https://github.com/boulos/syrah/ #include "../simd/simd...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "emath.h" namespace embree { struct Vec2fa; //////////////////////////////////////////////////////////////////////////////// /// Generic 2D vector Class ///////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/alloc.h" #include "emath.h" #if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__) # include "vec2fa_sycl.h" #else #include "../simd/sse.h" namespace embree { ////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/alloc.h" #include "emath.h" #include "../simd/sse.h" namespace embree { struct Vec3fa; //////////////////////////////////////////////////////////////////////////////// /// SSE Vec2fa Type ////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "emath.h" namespace embree { struct Vec3fa; //////////////////////////////////////////////////////////////////////////////// /// Generic 3D vector Class /////////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/alloc.h" #include "emath.h" #if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__) # include "vec3ba_sycl.h" #else #include "../simd/sse.h" namespace embree { ////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/alloc.h" #include "emath.h" #include "../simd/sse.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// SSE Vec3ba Type ////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/alloc.h" #include "emath.h" #if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__) # include "vec3fa_sycl.h" #else #include "../simd/sse.h" namespace embree { ////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/alloc.h" #include "emath.h" #include "../simd/sse.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// SSE Vec3fa Type ////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/alloc.h" #include "emath.h" #if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__) # include "vec3ia_sycl.h" #else #include "../simd/sse.h" namespace embree { ////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/alloc.h" #include "emath.h" #include "../simd/sse.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// SSE Vec3ia Type ////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "emath.h" #include "vec3.h" namespace embree { //////////////////////////////////////////////////////////////////////////////// /// Generic 4D vector Class /////////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "sse.h" #if defined(__AVX512VL__) #include "vboolf8_avx512.h" #include "vboold4_avx512.h" #else #include "vboolf8_avx.h" #include "vboold4_avx.h" #endif #if defined(__AVX2__) #include "vint8_avx2.h" #include "vuint...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/platform.h" #include "../sys/intrinsics.h" #include "../math/constants.h" #include "../sys/alloc.h" #include "varying.h" #include "vboolf16_avx512.h" #include "vint16_avx512.h" #include "vuint16_avx512.h" #i...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../math/emath.h" /* include SSE wrapper classes */ #if defined(__SSE__) || defined(__ARM_NEON) # include "sse.h" #endif /* include AVX wrapper classes */ #if defined(__AVX__) # include "avx.h" #endif /* include...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "sse.h" namespace embree { const __m128 mm_lookupmask_ps[16] = { _mm_castsi128_ps(_mm_set_epi32( 0, 0, 0, 0)), _mm_castsi128_ps(_mm_set_epi32( 0, 0, 0,-1)), _mm_castsi128_ps(_mm_set_epi32( 0, 0,-1, 0)), _mm_cas...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/platform.h" #include "../sys/intrinsics.h" #include "../sys/alloc.h" #include "../math/constants.h" #include "varying.h" namespace embree { #if defined(__aarch64__) || defined(__SSE4_1__) __forceinline __...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../sys/platform.h" namespace embree { /* Varying numeric types */ template<int N> struct vfloat_impl { union { float f[N]; int i[N]; }; __forceinline const float& operator [](size_t index) const { a...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 4-wide AVX bool...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 4-wide AVX-512 ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX-512 ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 16-wide AVX-512...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 4-wide AVX-512 ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 4-wide SSE bool...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX bool...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX-512 ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 4-wide AVX 64-...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX-512 ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 16-wide AVX-512...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 4-wide SSE floa...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX floa...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 16-wide AVX-51...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../math/emath.h" #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace e...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX inte...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX inte...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 4-wide AVX2 64...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX-512...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 16-wide AVX-51...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../math/emath.h" #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace e...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX inte...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #define vboolf vboolf_impl #define vboold vboold_impl #define vint vint_impl #define vuint vuint_impl #define vllong vllong_impl #define vfloat vfloat_impl #define vdouble vdouble_impl namespace embree { /* 8-wide AVX inte...
#pragma once #if !defined(__aarch64__) #error "avx2neon is only supported for AARCH64" #endif #include "sse2neon.h" #define AVX2NEON_ABI static inline __attribute__((always_inline)) struct __m256 { __m128 lo,hi; __m256() {} }; struct __m256i { __m128i lo,hi; explicit __m256i(const __m256 a) : ...
// Copyright 2009-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once /* Make precision match SSE, at the cost of some performance */ #if !defined(__aarch64__) # define SSE2NEON_PRECISE_DIV 1 # define SSE2NEON_PRECISE_SQRT 1 #endif #include "sse2neon.h" __forceinline __m128 _mm_abs_ps(__m12...
#ifndef SSE2NEON_H #define SSE2NEON_H // This header file provides a simple API translation layer // between SSE intrinsics to their corresponding Arm/Aarch64 NEON versions // // Contributors to this work are: // John W. Ratcliff <jratcliffscarab@gmail.com> // Brandon Rowlett <browlett@nvidia.com> // Ken Fast <k...
// Copyright 2009-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once // According to https://emscripten.org/docs/porting/simd.html, _MM_SET_EXCEPTION_MASK and // _mm_setcsr are unavailable in WebAssembly. #define _MM_SET_EXCEPTION_MASK(x) __forceinline void _mm_setcsr(unsigned int) { }
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "alloc.h" #include "intrinsics.h" #include "sysinfo.h" #include "mutex.h" //////////////////////////////////////////////////////////////////////////////// /// All Platforms ////////////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "platform.h" #include <vector> #include <set> namespace embree { #define ALIGNED_STRUCT_(align) \ void* operator new(size_t size) { return alignedMalloc(size,align); } ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "platform.h" #include "alloc.h" namespace embree { /*! static array with static size */ template<typename T, size_t N> class array_t { public: /********************** Iterators **************...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include <atomic> #include "intrinsics.h" namespace embree { /* compiler memory barriers */ #if defined(__INTEL_COMPILER) //#define __memory_barrier() __memory_barrier() #elif defined(__GNUC__) || defined(__clang__) # defin...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "barrier.h" #include "condition.h" #include "regression.h" #include "thread.h" #if defined (__WIN32__) #define WIN32_LEAN_AND_MEAN #include <windows.h> namespace embree { struct BarrierSysImplementation { __forceinline ...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "intrinsics.h" #include "sysinfo.h" #include "atomic.h" namespace embree { /*! system barrier using operating system */ class BarrierSys { public: /*! construction / destruction */ BarrierSys (size_...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "condition.h" #if defined(__WIN32__) && !defined(PTHREADS_WIN32) #define WIN32_LEAN_AND_MEAN #include <windows.h> namespace embree { struct ConditionImplementation { __forceinline ConditionImplementation () { Init...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "mutex.h" namespace embree { class ConditionSys { public: ConditionSys(); ~ConditionSys(); void wait( class MutexSys& mutex ); void notify_all(); template<typename Predicate> __force...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "estring.h" #include <algorithm> #include <ctype.h> namespace embree { char to_lower(char c) { return char(tolower(int(c))); } char to_upper(char c) { return char(toupper(int(c))); } std::string toLowerCase(const std::stri...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "platform.h" #include "../math/vec2.h" #include "../math/vec3.h" #include "../math/vec4.h" namespace embree { class IOStreamStateRestorer { public: IOStreamStateRestorer(std::ostream& iostream) : io...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "filename.h" #include "sysinfo.h" namespace embree { #ifdef __WIN32__ const char path_sep = '\\'; #else const char path_sep = '/'; #endif /*! create an empty filename */ FileName::FileName () {} /*! create a valid fil...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "platform.h" namespace embree { /*! Convenience class for handling file names and paths. */ class FileName { public: /*! create an empty filename */ FileName (); /*! create a valid filename fro...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "platform.h" #if defined(__WIN32__) #include <intrin.h> #endif #if defined(__ARM_NEON) #include "../simd/arm/emulation.h" #else #include <immintrin.h> #if defined(__EMSCRIPTEN__) #include "../simd/wasm/emulation.h"...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "library.h" #include "sysinfo.h" #include "filename.h" //////////////////////////////////////////////////////////////////////////////// /// Windows Platform ////////////////////////////////////////////////////////////////////////...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "platform.h" namespace embree { /*! type for shared library */ typedef struct opaque_lib_t* lib_t; /*! loads a shared library */ lib_t openLibrary(const std::string& file); /*! returns address of a symbo...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "mutex.h" #include "regression.h" #if defined(__WIN32__) && !defined(PTHREADS_WIN32) #define WIN32_LEAN_AND_MEAN #include <windows.h> namespace embree { MutexSys::MutexSys() { mutex = new CRITICAL_SECTION; InitializeCriticalS...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "platform.h" #include "intrinsics.h" #include "atomic.h" #define CPU_CACHELINE_SIZE 64 namespace embree { /*! system mutex */ class MutexSys { friend struct ConditionImplementation; public: MutexSys();...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #if !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS #endif #include <cstddef> #include <cassert> #include <cstdlib> #include <cstdio> #include <memory> #include <stdexcept> #include <iostream> #include <iom...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "atomic.h" namespace embree { struct NullTy { }; extern MAYBE_UNUSED NullTy null; class RefCount { public: RefCount(int val = 0) : refCounter(val) {} virtual ~RefCount() {}; virtual Re...