godot/thirdparty/embree/kernels/subdiv/linear_bezier_patch.h

// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "bezier_curve.h"

namespace embree
{
  namespace isa
  {   
    template<typename V>
      struct TensorLinearQuadraticBezierSurface
      {};

#if !defined(__SYCL_DEVICE_ONLY__)   
    template<>
      struct TensorLinearQuadraticBezierSurface<Vec2fa>
    {};
#endif
    
    template<typename V>
      struct TensorLinearCubicBezierSurface
      {};

#if !defined(__SYCL_DEVICE_ONLY__)
    
    template<>
      struct TensorLinearCubicBezierSurface<Vec2fa>
    {};

    template<>
    __forceinline TensorLinearCubicBezierSurface<Vec2f> TensorLinearCubicBezierSurface<Vec2fa>::vsplit_u<1>(bool& valid, const BBox1f& u, int& i, int N) const {}
    
#else

    template<> template<>
    __forceinline TensorLinearCubicBezierSurface<Vec2f> TensorLinearCubicBezierSurface<Vec2fa>::vsplit_u<1>(bool& valid, const BBox1f& u, int& i, int N) const {
      auto r = TensorLinearCubicBezierSurface<Vec2f>(L.split1(u,i,N),R.split1(u,i,N));
      valid = true; i += 1;
      return r;
    }

#endif

    TensorLinearCubicBezierSurface1f;
    TensorLinearCubicBezierSurface2fa;
    TensorLinearCubicBezierSurface3fa;
  }
}