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

// 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
  {};
  
  template<int N>
  struct vdouble_impl
  {};

  template<int N>
  struct vint_impl
  {};
  
  template<int N>
  struct vuint_impl
  {};

  template<int N>
  struct vllong_impl
  {};

  /* Varying bool types */
  template<int N> struct vboolf_impl {}; // for float/int
  template<int N> struct vboold_impl {}; // for double/long long
 
  /* Varying size constants */
#if defined(__AVX512VL__) // SKX
  const int VSIZEX = 8;  // default size
  const int VSIZEL = 16; // large size
#elif defined(__AVX__)
  const int VSIZEX = 8;
  const int VSIZEL = 8;
#else
  const int VSIZEX =;
  const int VSIZEL =;
#endif

  template<int N>
  struct vtypes {};

  template<>
  struct vtypes<1> {};

  /* Aliases to default types */
  vbool;
  vboolf;
  vboold;
  vint;
  vuint;
  vllong;
  vreal;
  vfloat;
  vdouble;

  /* 4-wide shortcuts */
  vfloat4;
  vdouble4;
  vreal4;
  vint4;
  vuint4;
  vllong4;
  vbool4;
  vboolf4;
  vboold4;

  /* 8-wide shortcuts */
  vfloat8;
  vdouble8;
  vreal8;
  vint8;
  vuint8;
  vllong8;
  vbool8;
  vboolf8;
  vboold8;

  /* 16-wide shortcuts */
  vfloat16;
  vdouble16;
  vreal16;
  vint16;
  vuint16;
  vllong16;
  vbool16;
  vboolf16;
  vboold16;

  /* Default shortcuts */
  vfloatx;
  vdoublex;
  vrealx;
  vintx;
  vuintx;
  vllongx;
  vboolx;
  vboolfx;
  vbooldx;
}