godot/thirdparty/embree/common/simd/simd.h

// 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 AVX512 wrapper classes */
#if defined (__AVX512F__)
#  include "avx512.h"
#endif

namespace embree
{
  template <int N>
  __forceinline vbool<N> isfinite(const vfloat<N>& v)
  {}
  
  /* foreach unique */
  template<typename vbool, typename vint, typename Closure>
  __forceinline void foreach_unique(const vbool& valid0, const vint& vi, const Closure& closure)
  {}

  /* returns the next unique value i in vi and the corresponding valid_i mask */
  template<typename vbool, typename vint>
  __forceinline int next_unique(vbool& valid, const vint& vi, /*out*/ vbool& valid_i)
  {}

  /* foreach unique index */
  template<typename vbool, typename vint, typename Closure>
  __forceinline void foreach_unique_index(const vbool& valid0, const vint& vi, const Closure& closure)
  {}

  /* returns the index of the next unique value i in vi and the corresponding valid_i mask */
  template<typename vbool, typename vint>
  __forceinline int next_unique_index(vbool& valid, const vint& vi, /*out*/ vbool& valid_i)
  {}

  template<typename Closure>
  __forceinline void foreach2(int x0, int x1, int y0, int y1, const Closure& closure)
  {}
}