<commit_before>// ======================================================================== //
// Copyright 2009-2013 Intel Corporation                                    //
//                                                                          //
// Licensed under the Apache License, Version 2.0 (the "License");          //
// you may not use this file except in compliance with the License.         //
// You may obtain a copy of the License at                                  //
//                                                                          //
//     http://www.apache.org/licenses/LICENSE-2.0                           //
//                                                                          //
// Unless required by applicable law or agreed to in writing, software      //
// distributed under the License is distributed on an "AS IS" BASIS,        //
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
// See the License for the specific language governing permissions and      //
// limitations under the License.                                           //
// ======================================================================== //

#ifndef __EMBREE_ACCEL_TRIANGLE8_INTERSECTOR1_MOELLER_H__
#define __EMBREE_ACCEL_TRIANGLE8_INTERSECTOR1_MOELLER_H__

#include "../common/default.h"
#include "triangle8.h"
#include "../common/ray.h"

namespace embree
{
  /*! Intersector for a single ray with 8 triangles. This intersector
   *  implements a modified version of the Moeller Trumbore
   *  intersector from the paper "Fast, Minimum Storage Ray-Triangle
   *  Intersection". In contrast to the paper we precalculate some
   *  factors and factor the calculations differently to allow
   *  precalculating the cross product e1 x e2. The resulting
   *  algorithm is similar to the fastest one of the paper "Optimizing
   *  Ray-Triangle Intersection via Automated Search". */
  struct Triangle8Intersector1MoellerTrumbore
  {
    typedef Triangle8 Primitive;

    /*! Intersect a ray with the 8 triangles and updates the hit. */
    static __forceinline void intersect(Ray& ray, const Triangle8& tri, void* geom)
    {
      /* calculate denominator */
      STAT3(normal.trav_prims,1,1,1);
      const avx3f O = avx3f(ray.org);
      const avx3f D = avx3f(ray.dir);
      const avx3f C = avx3f(tri.v0) - O;
      const avx3f R = cross(D,C);
      const avxf den = dot(avx3f(tri.Ng),D);
      const avxf absDen = abs(den);
      const avxf sgnDen = signmsk(den);<commit_msg>compile fix in triangle8_intersector1_moeller.h<commit_after>// ======================================================================== //
// Copyright 2009-2013 Intel Corporation                                    //
//                                                                          //
// Licensed under the Apache License, Version 2.0 (the "License");          //
// you may not use this file except in compliance with the License.         //
// You may obtain a copy of the License at                                  //
//                                                                          //
//     http://www.apache.org/licenses/LICENSE-2.0                           //
//                                                                          //
// Unless required by applicable law or agreed to in writing, software      //
// distributed under the License is distributed on an "AS IS" BASIS,        //
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
// See the License for the specific language governing permissions and      //
// limitations under the License.                                           //
// ======================================================================== //

#ifndef __EMBREE_ACCEL_TRIANGLE8_INTERSECTOR1_MOELLER_H__
#define __EMBREE_ACCEL_TRIANGLE8_INTERSECTOR1_MOELLER_H__

#include "triangle8.h"
#include "common/ray.h"
#include "geometry/filter.h"

namespace embree
{
  /*! Intersector for a single ray with 8 triangles. This intersector
   *  implements a modified version of the Moeller Trumbore
   *  intersector from the paper "Fast, Minimum Storage Ray-Triangle
   *  Intersection". In contrast to the paper we precalculate some
   *  factors and factor the calculations differently to allow
   *  precalculating the cross product e1 x e2. The resulting
   *  algorithm is similar to the fastest one of the paper "Optimizing
   *  Ray-Triangle Intersection via Automated Search". */
  struct Triangle8Intersector1MoellerTrumbore
  {
    typedef Triangle8 Primitive;

    /*! Intersect a ray with the 8 triangles and updates the hit. */
    static __forceinline void intersect(Ray& ray, const Triangle8& tri, void* geom)
    {
      /* calculate denominator */
      STAT3(normal.trav_prims,1,1,1);
      const avx3f O = avx3f(ray.org);
      const avx3f D = avx3f(ray.dir);
      const avx3f C = avx3f(tri.v0) - O;
      const avx3f R = cross(D,C);
      const avxf den = dot(avx3f(tri.Ng),D);
      const avxf absDen = abs(den);
      const avxf sgnDen = signmsk(den);
{'fraction_non_alphanumeric': 0.13305898491083676, 'fraction_numerical': 0.015285126396237508, 'mean_word_length': 1.9049516220830962, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '412094', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1259, 'n_words': 444}