VulkanRaytracingCycles 0.0.0
Cycles Render Engine With VulkanRaytracingShaderModules. ( Experiment , in progress)
harness_defs.h File Reference
#include "tbb/tbb_config.h"
#include <cstdio>
#include <cstdarg>

Go to the source code of this file.

Classes

struct  Harness::internal::TbbHarnessReporter
 
class  Harness::internal::Tracer
 
struct  Harness::int_to_type< int >
 Utility helper structure to ease overload resolution. More...
 
class  NoAssign
 Base class for types that should not be assigned. More...
 
class  NoCopy
 Base class for types that should not be copied or assigned. More...
 
class  NativeParallelForTask< Index, Body >
 For internal use by template function NativeParallelFor. More...
 

Namespaces

namespace  Harness
 
namespace  Harness::internal
 

Macros

#define __TBB_harness_defs_H
 
#define __TBB_TEST_SKIP_PIC_MODE   0
 
#define __TBB_TEST_SKIP_GCC_BUILTINS_MODE   ( __TBB_TEST_BUILTINS && (!__TBB_GCC_BUILTIN_ATOMICS_PRESENT || __INTEL_COMPILER) )
 
#define __TBB_TEST_SKIP_ICC_BUILTINS_MODE   ( __TBB_TEST_BUILTINS && !__TBB_ICC_BUILTIN_ATOMICS_PRESENT )
 
#define TBB_USE_GCC_BUILTINS   ( __TBB_TEST_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT && !__INTEL_COMPILER )
 
#define TBB_USE_ICC_BUILTINS   ( __TBB_TEST_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT )
 
#define __TBB_TEST_SKIP_AFFINITY   1
 
#define __TBB_CPP14_GENERIC_LAMBDAS_PRESENT   (__cpp_generic_lambdas >= 201304 )
 
#define __TBB_TEST_SKIP_LAMBDA   (__TBB_ICC_13_0_CPP11_STDLIB_SUPPORT_BROKEN || !__TBB_CPP11_LAMBDAS_PRESENT)
 
#define __TBB_THREAD_LOCAL_VARIABLES_PRESENT   1
 
#define __TBB_ICC_BUILTIN_ATOMICS_POINTER_ALIASING_BROKEN   (TBB_USE_ICC_BUILTINS && __INTEL_COMPILER < 1400 && __INTEL_COMPILER > 1200)
 
#define __TBB_CPP11_EXCEPTION_IN_STATIC_TEST_BROKEN   (__ANDROID__ && __SIZEOF_POINTER__==4 && __clang__)
 
#define __TBB_CPP11_INIT_LIST_TEST_BROKEN   (_MSC_VER <= 1800 && _MSC_VER && !__INTEL_COMPILER) || (__ANDROID__ && __TBB_x86_32 && __clang__)
 
#define __TBB_CPP11_INIT_LIST_TEMP_OBJS_LIFETIME_BROKEN   (_MSC_FULL_VER < 180030501 && _MSC_VER && !__INTEL_COMPILER)
 
#define __TBB_CPP11_STD_PLACEHOLDERS_LINKAGE_BROKEN   ((__INTEL_COMPILER == 1300 || __INTEL_COMPILER == 1310) && __GXX_EXPERIMENTAL_CXX0X__ && __GLIBCXX__ && __TBB_GLIBCXX_VERSION < 40500)
 
#define __TBB_ICC_SCOPED_ENUM_WITH_UNDERLYING_TYPE_NEGATIVE_VALUE_BROKEN   ( _MSC_VER && !__TBB_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER <= 1500 )
 
#define __TBB_ICC_SCOPED_ENUM_WITH_UNDERLYING_TYPE_ATOMIC_LOAD_BROKEN   ( TBB_USE_ICC_BUILTINS && !__TBB_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER <= 1500 )
 
#define __TBB_CONSTEXPR_MEMBER_FUNCTION_BROKEN   (__INTEL_COMPILER == 1500)
 
#define __TBB_STATIC_CONSTEXPR_INIT_BROKEN   (_MSC_VER >= 1900 && _MSC_VER <= 1914 && !__INTEL_COMPILER && _DEBUG)
 
#define __TBB_EXCEPTION_TYPE_INFO_BROKEN   0
 
#define __TBB_FUNC_PTR_AS_TEMPL_PARAM_BROKEN   ( ((__linux__ || __APPLE__) && __INTEL_COMPILER && __INTEL_COMPILER < 1100) || __SUNPRO_CC )
 
#define __TBB_UNQUALIFIED_CALL_OF_DTOR_BROKEN   (__GNUC__==3 && __GNUC_MINOR__<=3)
 
#define __TBB_CAS_8_CODEGEN_BROKEN   (__TBB_x86_32 && __PIC__ && __TBB_GCC_VERSION == 40102 && !__INTEL_COMPILER)
 
#define __TBB_THROW_FROM_DTOR_BROKEN   (__clang__ && __apple_build_version__ && __apple_build_version__ < 5000279)
 
#define __TBB_STD_UNCAUGHT_EXCEPTION_BROKEN   (__TBB_GLIBCXX_VERSION == 40407)
 
#define __TBB_COMPLICATED_ADL_BROKEN   ( __GNUC__ && __TBB_GCC_VERSION < 40400 )
 
#define __TBB_NOTHROW_MOVE_MEMBERS_IMPLICIT_GENERATION_BROKEN    (__INTEL_COMPILER>=1600 && __INTEL_COMPILER<=1900 || __INTEL_COMPILER==1500 && __INTEL_COMPILER_UPDATE>3)
 
#define __TBB_IS_COPY_CONSTRUCTIBLE_BROKEN   ( _MSC_VER && (_MSC_VER <= 1700 || _MSC_VER <= 1800 && !__INTEL_COMPILER) )
 
#define __TBB_SCOPED_ALLOCATOR_BROKEN
 
#define MAX_TUPLE_TEST_SIZE   5
 
#define harness_assert_H
 
#define ASSERT_CUSTOM(p, message, file, line)
 
#define ASSERT(p, message)
 
#define ASSERT_WARNING(p, message)
 
#define tbb_tests_harness_report_H
 
#define MAX_TRACE_SIZE   1024
 
#define HARNESS_TRACE_ORIG_INFO   __FILE__, __LINE__, ""
 
#define __FUNCTION__   ""
 
#define TRACE   Harness::internal::tracer.set_trace_info(Harness::internal::Tracer::need_lf, HARNESS_TRACE_ORIG_INFO)->trace
 printf style tracing macro More...
 
#define TRACENL   Harness::internal::tracer.set_trace_info(0, HARNESS_TRACE_ORIG_INFO)->trace
 printf style tracing macro without automatic new line character adding More...
 
#define TRACEP
 printf style tracing macro with additional information prefix (e.g. current function name) More...
 
#define REMARK   !Verbose ? (void)0 : TRACENL
 printf style remark macro More...
 
#define REMARK_ONCE   (!Verbose || Harness::internal::not_the_first_call<__LINE__>()) ? (void)0 : TRACE
 printf style remark macro More...
 
#define REPORT   TRACENL
 printf style reporting macro More...
 
#define REPORT_ONCE   (Harness::internal::not_the_first_call<__LINE__>()) ? (void)0 : TRACENL
 printf style reporting macro More...
 
#define HARNESS_NO_ASSERT   1
 

Functions

template<typename T >
void AssertSameType (const T &, const T &)
 Compile-time error if x and y have different types. More...
 
template<int >
bool Harness::internal::not_the_first_call ()
 
template<typename T >
void Harness::suppress_unused_warning (const T &)
 Utility template function to prevent "unused" warnings by various compilers. More...
 
template<typename Index , typename Body >
void NativeParallelFor (Index n, const Body &body)
 

Variables

const unsigned MByte = 1024 * 1024
 

Macro Definition Documentation

◆ __FUNCTION__

#define __FUNCTION__   ""

Definition at line 375 of file harness_defs.h.

◆ __TBB_CAS_8_CODEGEN_BROKEN

#define __TBB_CAS_8_CODEGEN_BROKEN   (__TBB_x86_32 && __PIC__ && __TBB_GCC_VERSION == 40102 && !__INTEL_COMPILER)

Definition at line 122 of file harness_defs.h.

◆ __TBB_COMPLICATED_ADL_BROKEN

#define __TBB_COMPLICATED_ADL_BROKEN   ( __GNUC__ && __TBB_GCC_VERSION < 40400 )

Definition at line 135 of file harness_defs.h.

◆ __TBB_CONSTEXPR_MEMBER_FUNCTION_BROKEN

#define __TBB_CONSTEXPR_MEMBER_FUNCTION_BROKEN   (__INTEL_COMPILER == 1500)

Definition at line 105 of file harness_defs.h.

◆ __TBB_CPP11_EXCEPTION_IN_STATIC_TEST_BROKEN

#define __TBB_CPP11_EXCEPTION_IN_STATIC_TEST_BROKEN   (__ANDROID__ && __SIZEOF_POINTER__==4 && __clang__)

Definition at line 88 of file harness_defs.h.

◆ __TBB_CPP11_INIT_LIST_TEMP_OBJS_LIFETIME_BROKEN

#define __TBB_CPP11_INIT_LIST_TEMP_OBJS_LIFETIME_BROKEN   (_MSC_FULL_VER < 180030501 && _MSC_VER && !__INTEL_COMPILER)

Definition at line 94 of file harness_defs.h.

◆ __TBB_CPP11_INIT_LIST_TEST_BROKEN

#define __TBB_CPP11_INIT_LIST_TEST_BROKEN   (_MSC_VER <= 1800 && _MSC_VER && !__INTEL_COMPILER) || (__ANDROID__ && __TBB_x86_32 && __clang__)

Definition at line 92 of file harness_defs.h.

◆ __TBB_CPP11_STD_PLACEHOLDERS_LINKAGE_BROKEN

#define __TBB_CPP11_STD_PLACEHOLDERS_LINKAGE_BROKEN   ((__INTEL_COMPILER == 1300 || __INTEL_COMPILER == 1310) && __GXX_EXPERIMENTAL_CXX0X__ && __GLIBCXX__ && __TBB_GLIBCXX_VERSION < 40500)

Definition at line 97 of file harness_defs.h.

◆ __TBB_CPP14_GENERIC_LAMBDAS_PRESENT

#define __TBB_CPP14_GENERIC_LAMBDAS_PRESENT   (__cpp_generic_lambdas >= 201304 )

Definition at line 73 of file harness_defs.h.

◆ __TBB_EXCEPTION_TYPE_INFO_BROKEN

#define __TBB_EXCEPTION_TYPE_INFO_BROKEN   0

Definition at line 114 of file harness_defs.h.

◆ __TBB_FUNC_PTR_AS_TEMPL_PARAM_BROKEN

#define __TBB_FUNC_PTR_AS_TEMPL_PARAM_BROKEN   ( ((__linux__ || __APPLE__) && __INTEL_COMPILER && __INTEL_COMPILER < 1100) || __SUNPRO_CC )

Definition at line 118 of file harness_defs.h.

◆ __TBB_harness_defs_H

#define __TBB_harness_defs_H

Definition at line 19 of file harness_defs.h.

◆ __TBB_ICC_BUILTIN_ATOMICS_POINTER_ALIASING_BROKEN

#define __TBB_ICC_BUILTIN_ATOMICS_POINTER_ALIASING_BROKEN   (TBB_USE_ICC_BUILTINS && __INTEL_COMPILER < 1400 && __INTEL_COMPILER > 1200)

Definition at line 85 of file harness_defs.h.

◆ __TBB_ICC_SCOPED_ENUM_WITH_UNDERLYING_TYPE_ATOMIC_LOAD_BROKEN

#define __TBB_ICC_SCOPED_ENUM_WITH_UNDERLYING_TYPE_ATOMIC_LOAD_BROKEN   ( TBB_USE_ICC_BUILTINS && !__TBB_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER <= 1500 )

Definition at line 102 of file harness_defs.h.

◆ __TBB_ICC_SCOPED_ENUM_WITH_UNDERLYING_TYPE_NEGATIVE_VALUE_BROKEN

#define __TBB_ICC_SCOPED_ENUM_WITH_UNDERLYING_TYPE_NEGATIVE_VALUE_BROKEN   ( _MSC_VER && !__TBB_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER <= 1500 )

Definition at line 100 of file harness_defs.h.

◆ __TBB_IS_COPY_CONSTRUCTIBLE_BROKEN

#define __TBB_IS_COPY_CONSTRUCTIBLE_BROKEN   ( _MSC_VER && (_MSC_VER <= 1700 || _MSC_VER <= 1800 && !__INTEL_COMPILER) )

Definition at line 152 of file harness_defs.h.

◆ __TBB_NOTHROW_MOVE_MEMBERS_IMPLICIT_GENERATION_BROKEN

#define __TBB_NOTHROW_MOVE_MEMBERS_IMPLICIT_GENERATION_BROKEN    (__INTEL_COMPILER>=1600 && __INTEL_COMPILER<=1900 || __INTEL_COMPILER==1500 && __INTEL_COMPILER_UPDATE>3)

Definition at line 148 of file harness_defs.h.

◆ __TBB_SCOPED_ALLOCATOR_BROKEN

#define __TBB_SCOPED_ALLOCATOR_BROKEN
Value:
(__TBB_GCC_VERSION <= 50100 || (__APPLE__ && __TBB_CLANG_VERSION < 90000) || \
(__FreeBSD__ && __TBB_CLANG_VERSION <= 60000) || \
(__ANDROID__ && (_WIN32 || _WIN64)) || \
(_MSC_VER && _MSC_VER == 1912 && __INTEL_COMPILER == 1700))

Definition at line 163 of file harness_defs.h.

◆ __TBB_STATIC_CONSTEXPR_INIT_BROKEN

#define __TBB_STATIC_CONSTEXPR_INIT_BROKEN   (_MSC_VER >= 1900 && _MSC_VER <= 1914 && !__INTEL_COMPILER && _DEBUG)

Definition at line 107 of file harness_defs.h.

◆ __TBB_STD_UNCAUGHT_EXCEPTION_BROKEN

#define __TBB_STD_UNCAUGHT_EXCEPTION_BROKEN   (__TBB_GLIBCXX_VERSION == 40407)

Definition at line 127 of file harness_defs.h.

◆ __TBB_TEST_SKIP_AFFINITY

#define __TBB_TEST_SKIP_AFFINITY   1

Definition at line 50 of file harness_defs.h.

◆ __TBB_TEST_SKIP_GCC_BUILTINS_MODE

#define __TBB_TEST_SKIP_GCC_BUILTINS_MODE   ( __TBB_TEST_BUILTINS && (!__TBB_GCC_BUILTIN_ATOMICS_PRESENT || __INTEL_COMPILER) )

Definition at line 33 of file harness_defs.h.

◆ __TBB_TEST_SKIP_ICC_BUILTINS_MODE

#define __TBB_TEST_SKIP_ICC_BUILTINS_MODE   ( __TBB_TEST_BUILTINS && !__TBB_ICC_BUILTIN_ATOMICS_PRESENT )

Definition at line 35 of file harness_defs.h.

◆ __TBB_TEST_SKIP_LAMBDA

#define __TBB_TEST_SKIP_LAMBDA   (__TBB_ICC_13_0_CPP11_STDLIB_SUPPORT_BROKEN || !__TBB_CPP11_LAMBDAS_PRESENT)

Definition at line 75 of file harness_defs.h.

◆ __TBB_TEST_SKIP_PIC_MODE

#define __TBB_TEST_SKIP_PIC_MODE   0

Definition at line 29 of file harness_defs.h.

◆ __TBB_THREAD_LOCAL_VARIABLES_PRESENT

#define __TBB_THREAD_LOCAL_VARIABLES_PRESENT   1

Definition at line 81 of file harness_defs.h.

◆ __TBB_THROW_FROM_DTOR_BROKEN

#define __TBB_THROW_FROM_DTOR_BROKEN   (__clang__ && __apple_build_version__ && __apple_build_version__ < 5000279)

Definition at line 124 of file harness_defs.h.

◆ __TBB_UNQUALIFIED_CALL_OF_DTOR_BROKEN

#define __TBB_UNQUALIFIED_CALL_OF_DTOR_BROKEN   (__GNUC__==3 && __GNUC_MINOR__<=3)

Definition at line 120 of file harness_defs.h.

◆ ASSERT

#define ASSERT (   p,
  message 
)

Definition at line 225 of file harness_defs.h.

◆ ASSERT_CUSTOM

#define ASSERT_CUSTOM (   p,
  message,
  file,
  line 
)

Definition at line 224 of file harness_defs.h.

◆ ASSERT_WARNING

#define ASSERT_WARNING (   p,
  message 
)

Definition at line 226 of file harness_defs.h.

◆ harness_assert_H

#define harness_assert_H

Definition at line 213 of file harness_defs.h.

◆ HARNESS_NO_ASSERT

#define HARNESS_NO_ASSERT   1

Definition at line 410 of file harness_defs.h.

◆ HARNESS_TRACE_ORIG_INFO

#define HARNESS_TRACE_ORIG_INFO   __FILE__, __LINE__, ""

Definition at line 374 of file harness_defs.h.

◆ MAX_TRACE_SIZE

#define MAX_TRACE_SIZE   1024

Definition at line 268 of file harness_defs.h.

◆ MAX_TUPLE_TEST_SIZE

#define MAX_TUPLE_TEST_SIZE   5

Definition at line 179 of file harness_defs.h.

◆ REMARK

#define REMARK   !Verbose ? (void)0 : TRACENL

printf style remark macro

Produces output only when the test is run with the -v (verbose) option.

Definition at line 392 of file harness_defs.h.

◆ REMARK_ONCE

#define REMARK_ONCE   (!Verbose || Harness::internal::not_the_first_call<__LINE__>()) ? (void)0 : TRACE

printf style remark macro

Produces output only when invoked first time. Only one instance of this macro is allowed per source code line.

Definition at line 397 of file harness_defs.h.

◆ REPORT

#define REPORT   TRACENL

printf style reporting macro

On heterogeneous platforms redirects its output to the host side.

Definition at line 401 of file harness_defs.h.

◆ REPORT_ONCE

#define REPORT_ONCE   (Harness::internal::not_the_first_call<__LINE__>()) ? (void)0 : TRACENL

printf style reporting macro

Produces output only when invoked first time. Only one instance of this macro is allowed per source code line.

Definition at line 406 of file harness_defs.h.

◆ tbb_tests_harness_report_H

#define tbb_tests_harness_report_H

Definition at line 262 of file harness_defs.h.

◆ TBB_USE_GCC_BUILTINS

#define TBB_USE_GCC_BUILTINS   ( __TBB_TEST_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT && !__INTEL_COMPILER )

Definition at line 39 of file harness_defs.h.

◆ TBB_USE_ICC_BUILTINS

#define TBB_USE_ICC_BUILTINS   ( __TBB_TEST_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT )

Definition at line 44 of file harness_defs.h.

◆ TRACE

#define TRACE   Harness::internal::tracer.set_trace_info(Harness::internal::Tracer::need_lf, HARNESS_TRACE_ORIG_INFO)->trace

printf style tracing macro

This variant of TRACE adds trailing line-feed (new line) character, if it is absent.

Definition at line 381 of file harness_defs.h.

◆ TRACENL

#define TRACENL   Harness::internal::tracer.set_trace_info(0, HARNESS_TRACE_ORIG_INFO)->trace

printf style tracing macro without automatic new line character adding

Definition at line 384 of file harness_defs.h.

◆ TRACEP

#define TRACEP
Value:
Harness::internal::tracer.set_trace_info(Harness::internal::Tracer::prefix | \
Tracer * set_trace_info(int flags, const char *file, size_t line, const char *func)
Definition: harness_defs.h:328
void trace(const char *fmt,...)
Definition: harness_defs.h:336
#define HARNESS_TRACE_ORIG_INFO
Definition: harness_defs.h:374

printf style tracing macro with additional information prefix (e.g. current function name)

Definition at line 387 of file harness_defs.h.

Function Documentation

◆ AssertSameType()

template<typename T >
void AssertSameType ( const T &  ,
const T &   
)

Compile-time error if x and y have different types.

Definition at line 230 of file harness_defs.h.

230{}

◆ NativeParallelFor()

template<typename Index , typename Body >
void NativeParallelFor ( Index  n,
const Body &  body 
)

Definition at line 623 of file harness_defs.h.

623 {
625
626 if (n > 0) {
627 // Allocate array to hold the tasks
628 task* array = static_cast<task*>(operator new(n * sizeof(task)));
629
630 // Construct the tasks
631 for (Index i = 0; i != n; ++i)
632 new(&array[i]) task(i, body);
633
634 // Start the tasks
635 for (Index i = 0; i != n; ++i)
636 array[i].start();
637
638 // Wait for the tasks to finish and destroy each one.
639 for (Index i = n; i; --i) {
640 array[i - 1].wait_to_finish();
641 array[i - 1].~task();
642 }
643
644 // Deallocate the task array
645 operator delete(array);
646 }
647}
For internal use by template function NativeParallelFor.
Definition: harness_defs.h:519

Variable Documentation

◆ MByte

const unsigned MByte = 1024 * 1024

Definition at line 420 of file harness_defs.h.