Ejemplo n.º 1
0
static void kTermGetCpuFeatures()
{
	print("\r\n");
	scrollDisable();
	getCPUFeatures();
	scrollEnable();
}
Ejemplo n.º 2
0
  void BVH8Register () 
  {
    int features = getCPUFeatures();

    /* select builders */
    SELECT_SYMBOL_AVX(features,BVH8Triangle4Builder);
    SELECT_SYMBOL_AVX(features,BVH8Triangle8Builder);
 
    /* select intersectors1 */
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle4Intersector1Moeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle8Intersector1Moeller);

    /* select intersectors4 */
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle4Intersector4HybridMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle4Intersector4HybridMoellerNoFilter);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle8Intersector4HybridMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle8Intersector4HybridMoellerNoFilter);

    /* select intersectors8 */
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle4Intersector8ChunkMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle4Intersector8HybridMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle4Intersector8HybridMoellerNoFilter);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle8Intersector8ChunkMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle8Intersector8HybridMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH8Triangle8Intersector8HybridMoellerNoFilter);
  }
Ejemplo n.º 3
0
  void BVH4MBRegister () 
  {
    int features = getCPUFeatures();

    SELECT_SYMBOL_DEFAULT_AVX_AVX2(features,BVH4MBTriangle1vIntersector1Moeller);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2(features,BVH4MBTriangle1vIntersector4ChunkMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4MBTriangle1vIntersector8ChunkMoeller);
  }
Ejemplo n.º 4
0
  void BVH4MBRegister () 
  {
    int features = getCPUFeatures();
 
    /* default target */
    SELECT_SYMBOL_KNC(features,BVH4mbTriangle1Intersector1);
    SELECT_SYMBOL_KNC(features,BVH4mbTriangle1Intersector16ChunkMoeller);
    SELECT_SYMBOL_KNC(features,BVH4mbTriangle1Intersector16SingleMoeller);
    SELECT_SYMBOL_KNC(features,BVH4mbTriangle1Intersector16HybridMoeller);

  }
Ejemplo n.º 5
0
const VSAPI *VS_CC getVapourSynthAPI(int version) {
    CPUFeatures f;
    getCPUFeatures(&f);
    if (!f.can_run_vs) {
        qWarning("System does not meet minimum requirements to run VapourSynth");
        return NULL;
    } else if (version == VAPOURSYNTH_API_VERSION) {
        return &vsapi;
    } else {
        return NULL;
    }
}
Ejemplo n.º 6
0
  State::State (bool singledevice) 
    : thread_error(createTls()), cpu_features(getCPUFeatures())
  {
    tri_accel = "default";
    tri_builder = "default";
    tri_traverser = "default";
    tri_builder_replication_factor = 2.0f;
    
    tri_accel_mb = "default";
    tri_builder_mb = "default";
    tri_traverser_mb = "default";
    
    hair_accel = "default";
    hair_builder = "default";
    hair_traverser = "default";
    hair_builder_replication_factor = 3.0f;

    memory_preallocation_factor     = 1.0f; 

    tessellation_cache_size = 128*1024*1024;

    /* large default cache size only for old mode single device mode */
#if defined(__X86_64__)
      if (singledevice) tessellation_cache_size = 1024*1024*1024;
#else
      if (singledevice) tessellation_cache_size = 128*1024*1024;
#endif

    subdiv_accel = "default";

    instancing_open_min = 0;
    instancing_block_size = 0;
    instancing_open_factor = 8.0f; 
    instancing_open_max_depth = 32;
    instancing_open_max = 50000000;

    float_exceptions = false;
    scene_flags = -1;
    verbose = 0;
    benchmark = 0;
    regression_testing = 0;

    numThreads = 0;
#if TASKING_TBB_INTERNAL || defined(__MIC__)
    set_affinity = true;
#else
    set_affinity = false;
#endif

    error_function = nullptr;
    memory_monitor_function = nullptr;
  }
Ejemplo n.º 7
0
  void InstanceIntersectorsRegister ()
  {
    int features = getCPUFeatures();
#if defined(__MIC__)
    SELECT_SYMBOL_KNC(features,InstanceBoundsFunc);
    SELECT_SYMBOL_KNC(features,InstanceIntersector1);
    SELECT_SYMBOL_KNC(features,InstanceIntersector16);
#else
    SELECT_SYMBOL_DEFAULT_AVX_AVX2(features,InstanceBoundsFunc);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2(features,InstanceIntersector1);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2(features,InstanceIntersector4);
    SELECT_SYMBOL_AVX_AVX2(features,InstanceIntersector8);
#endif
  }
Ejemplo n.º 8
0
  void BVH4iRegister ()
  {
    int features = getCPUFeatures();

    /* default target */
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector1);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector1NoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector1Robust);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector1NoFilterRobust);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector16ChunkMoeller);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector16ChunkMoellerNoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector16SingleMoeller);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector16SingleMoellerNoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector16SingleMoellerRobust);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector16SingleMoellerNoFilterRobust);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector16HybridMoeller);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1Intersector16HybridMoellerNoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iVirtualGeometryIntersector1);
    SELECT_SYMBOL_KNC(features,BVH4iVirtualGeometryIntersector1NoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iVirtualGeometryIntersector16);
    SELECT_SYMBOL_KNC(features,BVH4iVirtualGeometryIntersector16NoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1mcIntersector1);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1mcIntersector1NoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1mcIntersector16SingleMoeller);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1mcIntersector16SingleMoellerNoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1mcIntersector16ChunkMoeller);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1mcIntersector16ChunkMoellerNoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iTriangle1mcIntersector16HybridMoeller);
    SELECT_SYMBOL_KNC(features,BVH4iTriangle1mcIntersector16HybridMoellerNoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iSubdivMeshIntersector1);
    SELECT_SYMBOL_KNC(features,BVH4iSubdivMeshIntersector1NoFilter);

    SELECT_SYMBOL_KNC(features,BVH4iSubdivMeshIntersector16);
    SELECT_SYMBOL_KNC(features,BVH4iSubdivMeshIntersector16NoFilter);

  }
Ejemplo n.º 9
0
  void Device::print()
  {
    const int cpu_features = getCPUFeatures();
    std::cout << std::endl;
    std::cout << "Embree Ray Tracing Kernels " << RTC_VERSION_STRING << " (" << RTC_HASH << ")" << std::endl;
    std::cout << "  Compiler  : " << getCompilerName() << std::endl;
    std::cout << "  Build     : ";
#if defined(DEBUG)
    std::cout << "Debug " << std::endl;
#else
    std::cout << "Release " << std::endl;
#endif
    std::cout << "  Platform  : " << getPlatformName() << std::endl;
    std::cout << "  CPU       : " << stringOfCPUModel(getCPUModel()) << " (" << getCPUVendor() << ")" << std::endl;
    std::cout << "   Threads  : " << getNumberOfLogicalThreads() << std::endl;
    std::cout << "   ISA      : " << stringOfCPUFeatures(cpu_features) << std::endl;
    std::cout << "   Targets  : " << supportedTargetList(cpu_features) << std::endl;
    const bool hasFTZ = _mm_getcsr() & _MM_FLUSH_ZERO_ON;
    const bool hasDAZ = _mm_getcsr() & _MM_DENORMALS_ZERO_ON;
    std::cout << "   MXCSR    : " << "FTZ=" << hasFTZ << ", DAZ=" << hasDAZ << std::endl;
    std::cout << "  Config" << std::endl;
    std::cout << "    Threads : " << (numThreads ? toString(numThreads) : std::string("default")) << std::endl;
    std::cout << "    ISA     : " << stringOfCPUFeatures(enabled_cpu_features) << std::endl;
    std::cout << "    Targets : " << supportedTargetList(enabled_cpu_features) << " (supported)" << std::endl;
    std::cout << "              " << getEnabledTargets() << " (compile time enabled)" << std::endl;
    std::cout << "    Features: " << getEmbreeFeatures() << std::endl;
    std::cout << "    Tasking : ";
#if defined(TASKING_TBB)
    std::cout << "TBB" << TBB_VERSION_MAJOR << "." << TBB_VERSION_MINOR << " ";
    std::cout << "TBB_header_interface_" << TBB_INTERFACE_VERSION << " TBB_lib_interface_" << tbb::TBB_runtime_interface_version() << " ";
#endif
#if defined(TASKING_INTERNAL)
    std::cout << "internal_tasking_system ";
#endif
#if defined(TASKING_PPL)
	std::cout << "PPL ";
#endif
    std::cout << std::endl;

    /* check of FTZ and DAZ flags are set in CSR */
    if (!hasFTZ || !hasDAZ) 
    {
#if !defined(_DEBUG)
      if (State::verbosity(1)) 
#endif
      {
        std::cout << std::endl;
        std::cout << "================================================================================" << std::endl;
        std::cout << "  WARNING: \"Flush to Zero\" or \"Denormals are Zero\" mode not enabled "         << std::endl 
                  << "           in the MXCSR control and status register. This can have a severe "     << std::endl
                  << "           performance impact. Please enable these modes for each application "   << std::endl
                  << "           thread the following way:" << std::endl
                  << std::endl 
                  << "           #include \"xmmintrin.h\"" << std::endl 
                  << "           #include \"pmmintrin.h\"" << std::endl 
                  << std::endl 
                  << "           _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);" << std::endl 
                  << "           _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);" << std::endl;
        std::cout << "================================================================================" << std::endl;
        std::cout << std::endl;
      }
    }
    std::cout << std::endl;
  }
Ejemplo n.º 10
0
  RTCORE_API void rtcInit(const char* cfg) 
  {
      cout << "in rtcInit " << endl;
    Lock<MutexSys> lock(g_mutex);
    TRACE(rtcInit);
    CATCH_BEGIN;

    if (g_initialized) {
      g_mutex.unlock();
      process_error(RTC_INVALID_OPERATION,"already initialized");
      g_mutex.lock();
      return;
    }
    g_initialized = true;

    /* reset global state */
    initSettings();
    
    if (cfg != NULL) 
    {
      size_t pos = 0;
      do {
        std::string tok = parseIdentifier (cfg,pos);

        if (tok == "threads" && parseSymbol(cfg,'=',pos)) 
	{
	  g_numThreads = parseInt(cfg,pos);
#if defined(__MIC__)
	  if (!(g_numThreads == 1 || (g_numThreads % 4) == 0)) {
	    g_mutex.unlock();
	    process_error(RTC_INVALID_OPERATION,"Xeon Phi supports only number of threads % 4 == 0, or threads == 1");
	    g_mutex.lock();
            return;
          }
#endif
        }
        else if (tok == "isa" && parseSymbol (cfg,'=',pos)) 
	{
	  std::string isa = parseIdentifier (cfg,pos);
	  if      (isa == "sse" ) cpu_features = SSE;
	  else if (isa == "sse2") cpu_features = SSE2;
	  else if (isa == "sse3") cpu_features = SSE3;
	  else if (isa == "ssse3") cpu_features = SSSE3;
	  else if (isa == "sse41") cpu_features = SSE41;
	  else if (isa == "sse42") cpu_features = SSE42;
	  else if (isa == "avx") cpu_features = AVX;
	  else if (isa == "avxi") cpu_features = AVXI;
	  else if (isa == "avx2") cpu_features = AVX2;
	}
        else if ((tok == "tri_accel" || tok == "accel") && parseSymbol (cfg,'=',pos))
            g_tri_accel = parseIdentifier (cfg,pos);
	else if ((tok == "tri_builder" || tok == "builder") && parseSymbol (cfg,'=',pos))
	    g_tri_builder = parseIdentifier (cfg,pos);
	else if ((tok == "tri_traverser" || tok == "traverser") && parseSymbol (cfg,'=',pos))
            g_tri_traverser = parseIdentifier (cfg,pos);
      	else if ((tok == "tri_accel_mb" || tok == "accel_mb") && parseSymbol (cfg,'=',pos))
            g_tri_accel = parseIdentifier (cfg,pos);
	else if ((tok == "tri_builder_mb" || tok == "builder_mb") && parseSymbol (cfg,'=',pos))
	    g_tri_builder = parseIdentifier (cfg,pos);
        else if ((tok == "tri_traverser_mb" || tok == "traverser_mb") && parseSymbol (cfg,'=',pos))
            g_tri_traverser = parseIdentifier (cfg,pos);
        else if (tok == "hair_accel" && parseSymbol (cfg,'=',pos))
            g_hair_accel = parseIdentifier (cfg,pos);
	else if (tok == "hair_builder" && parseSymbol (cfg,'=',pos))
            g_hair_builder = parseIdentifier (cfg,pos);
	else if (tok == "hair_traverser" && parseSymbol (cfg,'=',pos))
            g_hair_traverser = parseIdentifier (cfg,pos);
	else if (tok == "hair_builder_replication_factor" && parseSymbol (cfg,'=',pos))
            g_hair_builder_replication_factor = parseInt (cfg,pos);
	
        else if (tok == "verbose" && parseSymbol (cfg,'=',pos))
            g_verbose = parseInt (cfg,pos);
	else if (tok == "benchmark" && parseSymbol (cfg,'=',pos))
            g_benchmark = parseInt (cfg,pos);
        else if (tok == "flags") {
          g_scene_flags = 0;
          if (parseSymbol (cfg,'=',pos)) {
            do {
              std::string flag = parseIdentifier (cfg,pos);
              if      (flag == "static" ) g_scene_flags |= RTC_SCENE_STATIC;
              else if (flag == "dynamic") g_scene_flags |= RTC_SCENE_DYNAMIC;
              else if (flag == "compact") g_scene_flags |= RTC_SCENE_COMPACT;
              else if (flag == "coherent") g_scene_flags |= RTC_SCENE_COHERENT;
              else if (flag == "incoherent") g_scene_flags |= RTC_SCENE_INCOHERENT;
              else if (flag == "high_quality") g_scene_flags |= RTC_SCENE_HIGH_QUALITY;
              else if (flag == "robust") g_scene_flags |= RTC_SCENE_ROBUST;
            } while (parseSymbol (cfg,',',pos));
          }
        }
        
      } while (findNext (cfg,',',pos));
    }

    if (g_verbose >= 1)
    {
      std::cout << "Embree Ray Tracing Kernels " << __EMBREE_VERSION__ << " (" << __DATE__ << ")" << std::endl;
      std::cout << "  Compiler : " << getCompilerName() << std::endl;
      std::cout << "  Platform : " << getPlatformName() << std::endl;
      std::cout << "  CPU      : " << stringOfCPUFeatures(getCPUFeatures()) << std::endl;
      std::cout << "  Features : ";
#if defined(__USE_RAY_MASK__)
      std::cout << "raymasks ";
#endif
#if defined (__BACKFACE_CULLING__)
      std::cout << "backfaceculling ";
#endif
#if defined(__INTERSECTION_FILTER__)
      std::cout << "intersection_filter ";
#endif
#if defined(__BUFFER_STRIDE__)
      std::cout << "bufferstride ";
#endif
      std::cout << std::endl;

#if defined (__MIC__)
#if defined(__BUFFER_STRIDE__)
      std::cout << "  WARNING: enabled 'bufferstride' support will lower BVH build performance" << std::endl;
#endif
#endif
    }

    /* CPU has to support at least SSE2 */
#if !defined (__MIC__)
    if (!has_feature(SSE2)) {
      g_mutex.unlock();
      process_error(RTC_UNSUPPORTED_CPU,"CPU does not support SSE2");
      g_mutex.lock();
      return;
    }
#endif

    g_error = createTls();
    g_error_function = NULL;

    init_globals();
    cout << "in rtcInit(), BVH4Register() " << endl;
#if !defined(__MIC__)
    cout << "BVH4Register()" << endl;
    BVH4Register();
#else
    cout << "BVH4iRegister() " << endl;
    BVH4iRegister();
#endif 
    cout << "BVH4MBRegister() " << endl;
    BVH4MBRegister();
    BVH4HairRegister();    
#if defined(__TARGET_AVX__)
    cout << "BVH8Register() " << endl;
    if (has_feature(AVX)) {
      BVH8Register();
    }
#endif
    
    InstanceIntersectorsRegister();

//if (g_verbose >= 2) 
    printSettings();
    
    TaskScheduler::create(g_numThreads);

    cout << " end rtcInit " << endl;
    CATCH_END;
  }
Ejemplo n.º 11
0
  void BVH4Register () 
  {
    int features = getCPUFeatures();

    /* select builders */
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4BuilderTwoLevelSAH);

    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Bezier1vBuilder_OBB_New);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Bezier1iBuilder_OBB_New);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Bezier1iMBBuilder_OBB_New);

    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4SceneBuilderSAH);
    SELECT_SYMBOL_AVX        (features,BVH4Triangle8SceneBuilderSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4vSceneBuilderSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4iSceneBuilderSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4vMBSceneBuilderSAH);

    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4SceneBuilderSpatialSAH);
    SELECT_SYMBOL_AVX        (features,BVH4Triangle8SceneBuilderSpatialSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4vSceneBuilderSpatialSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4iSceneBuilderSpatialSAH);
    
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4MeshBuilderSAH);
    SELECT_SYMBOL_AVX        (features,BVH4Triangle8MeshBuilderSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4vMeshBuilderSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4iMeshBuilderSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Bezier1vSceneBuilderSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Bezier1iSceneBuilderSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4VirtualSceneBuilderSAH);

    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4SubdivPatch1BuilderBinnedSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4SubdivPatch1CachedBuilderBinnedSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4SubdivGridBuilderBinnedSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4SubdivGridEagerBuilderBinnedSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4SubdivGridLazyBuilderBinnedSAH);

    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4MeshRefitSAH);
    SELECT_SYMBOL_AVX        (features,BVH4Triangle8MeshRefitSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4vMeshRefitSAH);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4iMeshRefitSAH);

    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4SceneBuilderMortonGeneral);
    SELECT_SYMBOL_AVX        (features,BVH4Triangle8SceneBuilderMortonGeneral);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4vSceneBuilderMortonGeneral);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4iSceneBuilderMortonGeneral);

    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4MeshBuilderMortonGeneral);
    SELECT_SYMBOL_AVX        (features,BVH4Triangle8MeshBuilderMortonGeneral);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4vMeshBuilderMortonGeneral);
    SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Triangle4iMeshBuilderMortonGeneral);

    /* select intersectors1 */
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1vIntersector1);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1iIntersector1);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1vIntersector1_OBB);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1iIntersector1_OBB);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1iMBIntersector1_OBB);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4Triangle4Intersector1Moeller);
    SELECT_SYMBOL_AVX_AVX2              (features,BVH4Triangle8Intersector1Moeller);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX     (features,BVH4Triangle4vIntersector1Pluecker);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX     (features,BVH4Triangle4iIntersector1Pluecker);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4Triangle4vMBIntersector1Moeller);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4Subdivpatch1Intersector1);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4Subdivpatch1CachedIntersector1);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4GridIntersector1);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4GridLazyIntersector1);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4VirtualIntersector1);

    /* select intersectors4 */
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1vIntersector4Chunk);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1iIntersector4Chunk);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1vIntersector4Single_OBB);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1iIntersector4Single_OBB);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Bezier1iMBIntersector4Single_OBB);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4Triangle4Intersector4ChunkMoeller);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4Triangle4Intersector4ChunkMoellerNoFilter);
    SELECT_SYMBOL_AVX_AVX2              (features,BVH4Triangle8Intersector4ChunkMoeller);
    SELECT_SYMBOL_DEFAULT2              (features,BVH4Triangle4Intersector4HybridMoeller,BVH4Triangle4Intersector4ChunkMoeller); // hybrid not supported below SSE4.2
    SELECT_SYMBOL_AVX_AVX2              (features,BVH4Triangle8Intersector4ChunkMoellerNoFilter);
    SELECT_SYMBOL_DEFAULT2              (features,BVH4Triangle4Intersector4HybridMoellerNoFilter,BVH4Triangle4Intersector4ChunkMoellerNoFilter); // hybrid not supported below SSE4.2
    SELECT_SYMBOL_SSE42_AVX_AVX2        (features,BVH4Triangle4Intersector4HybridMoeller);
    SELECT_SYMBOL_SSE42_AVX_AVX2        (features,BVH4Triangle4Intersector4HybridMoellerNoFilter);
    SELECT_SYMBOL_AVX_AVX2              (features,BVH4Triangle8Intersector4HybridMoeller);
    SELECT_SYMBOL_AVX_AVX2              (features,BVH4Triangle8Intersector4HybridMoellerNoFilter);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX     (features,BVH4Triangle4vIntersector4ChunkPluecker);
    SELECT_SYMBOL_DEFAULT2              (features,BVH4Triangle4vIntersector4HybridPluecker,BVH4Triangle4vIntersector4ChunkPluecker); // hybrid not supported below SSE4.2
    SELECT_SYMBOL_SSE42_AVX             (features,BVH4Triangle4vIntersector4HybridPluecker);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX     (features,BVH4Triangle4iIntersector4ChunkPluecker);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4Triangle4vMBIntersector4ChunkMoeller);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Subdivpatch1Intersector4);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4Subdivpatch1CachedIntersector4);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4GridIntersector4);
    SELECT_SYMBOL_DEFAULT_AVX_AVX2      (features,BVH4GridLazyIntersector4);
    SELECT_SYMBOL_DEFAULT_SSE41_AVX_AVX2(features,BVH4VirtualIntersector4Chunk);
   
    /* select intersectors8 */
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Bezier1vIntersector8Chunk);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Bezier1iIntersector8Chunk);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Bezier1vIntersector8Single_OBB);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Bezier1iIntersector8Single_OBB);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Bezier1iMBIntersector8Single_OBB);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle4Intersector8ChunkMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle4Intersector8ChunkMoellerNoFilter);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle8Intersector8ChunkMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle8Intersector8ChunkMoellerNoFilter);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle4Intersector8HybridMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle4Intersector8HybridMoellerNoFilter);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle8Intersector8HybridMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle8Intersector8HybridMoellerNoFilter);
    SELECT_SYMBOL_AVX     (features,BVH4Triangle4vIntersector8ChunkPluecker);
    SELECT_SYMBOL_AVX     (features,BVH4Triangle4vIntersector8HybridPluecker);
    SELECT_SYMBOL_AVX     (features,BVH4Triangle4iIntersector8ChunkPluecker);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Triangle4vMBIntersector8ChunkMoeller);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Subdivpatch1Intersector8);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4Subdivpatch1CachedIntersector8);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4GridIntersector8);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4GridLazyIntersector8);
    SELECT_SYMBOL_AVX_AVX2(features,BVH4VirtualIntersector8Chunk);
  }
Ejemplo n.º 12
0
  State::State (bool singledevice) 
    : enabled_cpu_features(getCPUFeatures())
  {
    tri_accel = "default";
    tri_builder = "default";
    tri_traverser = "default";
    tri_builder_replication_factor = 2.0f;

    tri_accel_mb = "default";
    tri_builder_mb = "default";
    tri_traverser_mb = "default";

    quad_accel = "default";
    quad_builder = "default";
    quad_traverser = "default";

    quad_accel_mb = "default";
    quad_builder_mb = "default";
    quad_traverser_mb = "default";

    line_accel = "default";
    line_builder = "default";
    line_traverser = "default";

    line_accel_mb = "default";
    line_builder_mb = "default";
    line_traverser_mb = "default";
    
    hair_accel = "default";
    hair_builder = "default";
    hair_traverser = "default";
    hair_builder_replication_factor = 3.0f;

    hair_accel_mb = "default";

    object_accel_min_leaf_size = 1;
    object_accel_max_leaf_size = 1;

    object_accel_mb_min_leaf_size = 1;
    object_accel_mb_max_leaf_size = 1;

    memory_preallocation_factor     = 1.0f; 

    tessellation_cache_size = 128*1024*1024;

    /* large default cache size only for old mode single device mode */
#if defined(__X86_64__)
      if (singledevice) tessellation_cache_size = 1024*1024*1024;
#else
      if (singledevice) tessellation_cache_size = 128*1024*1024;
#endif

    subdiv_accel = "default";

    float_exceptions = false;
    scene_flags = -1;
    verbose = 0;
    benchmark = 0;
    regression_testing = 0;

    numThreads = 0;
#if TASKING_TBB_INTERNAL || defined(__MIC__)
    set_affinity = true;
#else
    set_affinity = false;
#endif

    error_function = nullptr;
    memory_monitor_function = nullptr;
  }