diff --git a/CMakeLists.txt b/CMakeLists.txt index df71a7985..dfce2f275 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required (VERSION 3.19) -set (OSL_VERSION "1.14.3.0") +set (OSL_VERSION "1.14.4.0") set (OSL_VERSION_OVERRIDE "" CACHE STRING "Version override (use with caution)!") mark_as_advanced (OSL_VERSION_OVERRIDE) @@ -163,22 +163,32 @@ add_compile_definitions (OSL_INTERNAL=1) # OIIO_DISABLE_DEPRECATED before including any OIIO headers. add_compile_definitions (OIIO_DISABLE_DEPRECATED=900000) -# Set the default namespace. For symbol hiding reasons, it's important that -# the project name is a subset of the namespace name. -set (${PROJ_NAME}_NAMESPACE ${PROJECT_NAME} CACHE STRING - "Customized outer namespace base name (version will be added)") -option (${PROJ_NAME}_NAMESPACE_INCLUDE_PATCH - "Should the inner namespace include the patch number" ${${PROJECT_NAME}_DEV_RELEASE}) -set (PROJ_NAMESPACE "${${PROJ_NAME}_NAMESPACE}") -string(REGEX MATCH ${PROJECT_NAME} NAMESPACE_HAS_PROJECT_NAME ${PROJ_NAMESPACE}) -if (NOT NAMESPACE_HAS_PROJECT_NAME) - set (PROJ_NAMESPACE ${PROJECT_NAME}_${PROJ_NAMESPACE}) +# Namespace settings +# +# The "outer namespace" defaults to the project name, but it can be overridden +# to allow custom builds that put everything inside a unique namespace that +# can't conflict with default builds. +set (${PROJ_NAME}_OUTER_NAMESPACE ${PROJECT_NAME} CACHE STRING + "Customized outer namespace") +set (PROJ_NAMESPACE "${${PROJ_NAME}_OUTER_NAMESPACE}") # synonym +if (NOT ${PROJ_NAME}_OUTER_NAMESPACE STREQUAL ${PROJECT_NAME}) + set (${PROJ_NAME}_CUSTOM_OUTER_NAMESPACE 1) endif () -set (PROJ_NAMESPACE_V "${PROJ_NAMESPACE}_v${PROJECT_VERSION_MAJOR}_${PROJECT_VERSION_MINOR}") -if (${PROJ_NAME}_NAMESPACE_INCLUDE_PATCH) - set (PROJ_NAMESPACE_V "${PROJ_NAMESPACE_V}_${PROJECT_VERSION_PATCH}") +# There is also an inner namespace that is either vMAJ_MIN or vMAJ_MIN_PATCH, +# depending on the setting of ${PROJ_NAME}_INNER_NAMESPACE_INCLUDE_PATCH. +option (${PROJ_NAME}_INNER_NAMESPACE_INCLUDE_PATCH + "Should the inner namespace include the patch number" ${${PROJECT_NAME}_DEV_RELEASE}) +if (${PROJ_NAME}_INNER_NAMESPACE_INCLUDE_PATCH) + set (PROJ_VERSION_NAMESPACE "v${PROJECT_VERSION_MAJOR}_${PROJECT_VERSION_MINOR}_${PROJECT_VERSION_PATCH}") +else () + set (PROJ_VERSION_NAMESPACE "v${PROJECT_VERSION_MAJOR}_${PROJECT_VERSION_MINOR}") endif () -message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") +# PROJ_NAMESPACE_V combines the outer and inner namespaces into one symbol +set (PROJ_NAMESPACE_V "${PROJ_NAMESPACE}_${PROJ_VERSION_NAMESPACE}") +message(STATUS "Outer namespace PROJ_OUTER_NAMESPACE: ${PROJ_NAMESPACE}") +message(STATUS "Inner namespace PROJ_VERSION_NAMESPACE: ${PROJ_VERSION_NAMESPACE}") +message(STATUS "Joint namespace PROJ_NAMESPACE_V: ${PROJ_NAMESPACE_V}") + # Define OSL_INTERNAL symbol only when building OSL itself, will not be # defined for downstream projects using OSL. diff --git a/src/doc/Doxyfile b/src/doc/Doxyfile index fe789d67f..cb8e50f0d 100644 --- a/src/doc/Doxyfile +++ b/src/doc/Doxyfile @@ -697,7 +697,7 @@ SHOW_FILES = YES # Folder Tree View (if specified). # The default value is: YES. -SHOW_NAMESPACES = YES +SHOW_NAMESPACES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from @@ -2162,6 +2162,8 @@ PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ OSL_HOSTDEVICE= \ OSL_NAMESPACE_BEGIN="namespace OSL {" \ OSL_NAMESPACE_END="}" \ + OSL_NS_BEGIN="namespace OSL {" \ + OSL_NS_END="}" \ OSL_CONSTEXPR14=constexpr \ OSL_CONSTEXPR17=constexpr \ OSL_CONSTEXPR20=constexpr \ diff --git a/src/include/OSL/Imathx/Imathx.h b/src/include/OSL/Imathx/Imathx.h index 2a63a7ed3..85f89238b 100644 --- a/src/include/OSL/Imathx/Imathx.h +++ b/src/include/OSL/Imathx/Imathx.h @@ -18,7 +18,7 @@ // clang-format off -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // Choose to treat helper functions as static @@ -494,4 +494,4 @@ det4x4(const Imath::Matrix44& m) } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/accum.h b/src/include/OSL/accum.h index 4f5202651..ebfc27f6e 100644 --- a/src/include/OSL/accum.h +++ b/src/include/OSL/accum.h @@ -9,7 +9,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN class Aov { public: @@ -230,4 +230,4 @@ class OSLEXECPUBLIC Accumulator { }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/batched_rendererservices.h b/src/include/OSL/batched_rendererservices.h index 760e5605e..541e25c52 100644 --- a/src/include/OSL/batched_rendererservices.h +++ b/src/include/OSL/batched_rendererservices.h @@ -11,7 +11,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // Implementation detail: virtual methods that have a corresponding // virtual bool is_overridden_* method @@ -456,4 +456,4 @@ template class OSLEXECPUBLIC BatchedRendererServices { }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/batched_shaderglobals.h b/src/include/OSL/batched_shaderglobals.h index 44f0ebe91..9f119b8da 100644 --- a/src/include/OSL/batched_shaderglobals.h +++ b/src/include/OSL/batched_shaderglobals.h @@ -12,7 +12,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { class BatchedBackendLLVM; @@ -197,8 +197,7 @@ template struct alignas(64) BatchedShaderGlobals { }; #define __OSL_USING_SHADERGLOBALS(WIDTH_OF_OSL_DATA) \ - using BatchedShaderGlobals \ - = OSL_NAMESPACE::BatchedShaderGlobals; + using BatchedShaderGlobals = OSL::BatchedShaderGlobals; #undef OSL_USING_DATA_WIDTH #ifdef __OSL_USING_BATCHED_TEXTURE @@ -212,4 +211,4 @@ template struct alignas(64) BatchedShaderGlobals { __OSL_USING_SHADERGLOBALS(WIDTH_OF_OSL_DATA) #endif -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/batched_texture.h b/src/include/OSL/batched_texture.h index 5f10cc5ff..3b6cd6a20 100644 --- a/src/include/OSL/batched_texture.h +++ b/src/include/OSL/batched_texture.h @@ -6,7 +6,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace Tex { @@ -279,11 +279,10 @@ template class BatchedTextureOutputs { Mask m_mask; }; -#define __OSL_USING_BATCHED_TEXTURE(WIDTH_OF_OSL_DATA) \ - using BatchedTextureOutputs \ - = OSL_NAMESPACE::BatchedTextureOutputs; \ - using BatchedTextureOptions \ - = OSL_NAMESPACE::BatchedTextureOptions; +#define __OSL_USING_BATCHED_TEXTURE(WIDTH_OF_OSL_DATA) \ + using BatchedTextureOutputs \ + = OSL::BatchedTextureOutputs; \ + using BatchedTextureOptions = OSL::BatchedTextureOptions; #undef OSL_USING_DATA_WIDTH #ifdef __OSL_USING_SHADERGLOBALS @@ -297,4 +296,4 @@ template class BatchedTextureOutputs { __OSL_USING_BATCHED_TEXTURE(WIDTH_OF_OSL_DATA) #endif -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/device_ptr.h b/src/include/OSL/device_ptr.h index 6c3c039b8..f447ba278 100644 --- a/src/include/OSL/device_ptr.h +++ b/src/include/OSL/device_ptr.h @@ -8,7 +8,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN /// Wrapper class for holding a "device" pointer -- GPU or whatnot. It @@ -54,4 +54,4 @@ template class device_ptr { -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/dual.h b/src/include/OSL/dual.h index 60ec05ee8..ce7794f76 100644 --- a/src/include/OSL/dual.h +++ b/src/include/OSL/dual.h @@ -13,7 +13,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // Shortcut notation for enable_if trickery @@ -1367,4 +1367,4 @@ ifloor (const Dual &x) } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/dual_vec.h b/src/include/OSL/dual_vec.h index 920c662cc..0d5bfa68b 100644 --- a/src/include/OSL/dual_vec.h +++ b/src/include/OSL/dual_vec.h @@ -26,7 +26,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #if 0 // appears unused /// Templated trick to be able to derive what type we use to represent @@ -559,4 +559,4 @@ distance (const Vec3 &a, const Dual &b) return length (a - b); } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/encodedtypes.h b/src/include/OSL/encodedtypes.h index eac1342db..8c263670d 100644 --- a/src/include/OSL/encodedtypes.h +++ b/src/include/OSL/encodedtypes.h @@ -6,7 +6,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // Substitute for variable argument list, which is traditionally used with a printf, with arrays @@ -214,4 +214,4 @@ template<> struct TypeEncoder { } // namespace pvt -OSL_NAMESPACE_EXIT \ No newline at end of file +OSL_NAMESPACE_END diff --git a/src/include/OSL/fmt_util.h b/src/include/OSL/fmt_util.h index 5f975aa63..133f3c212 100644 --- a/src/include/OSL/fmt_util.h +++ b/src/include/OSL/fmt_util.h @@ -15,7 +15,7 @@ // functions must be ustringhash. To make this easier, these wrappers // automatically convert ustring and const char * to ustringhash. -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // PackedArgs is similar to tuple but packs its data back to back @@ -143,4 +143,4 @@ warningfmt(OpaqueExecContextPtr oec, const SpecifierT& fmt_specification, } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/genclosure.h b/src/include/OSL/genclosure.h index 559707c4c..4cca6c017 100644 --- a/src/include/OSL/genclosure.h +++ b/src/include/OSL/genclosure.h @@ -9,7 +9,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN struct ClosureParam { @@ -61,4 +61,4 @@ struct ClosureParam { #define CLOSURE_FINISH_PARAM(st) { TypeDesc(), sizeof(st), nullptr, alignof(st) } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/hashes.h b/src/include/OSL/hashes.h index 1e91f36fc..79ae4fe3f 100644 --- a/src/include/OSL/hashes.h +++ b/src/include/OSL/hashes.h @@ -14,7 +14,7 @@ // specifying the string literal and the name to use for the variable. -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -68,4 +68,4 @@ namespace Hashes { -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/journal.h b/src/include/OSL/journal.h index 7fa437b55..9dde3c5cf 100644 --- a/src/include/OSL/journal.h +++ b/src/include/OSL/journal.h @@ -13,7 +13,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN /// Journal Buffer approach: each thread gets its own chain of pages within /// the shared journal buffer for recording errors, warnings, etc. @@ -361,4 +361,4 @@ class OSLEXECPUBLIC Writer { } // namespace journal -OSL_NAMESPACE_EXIT \ No newline at end of file +OSL_NAMESPACE_END diff --git a/src/include/OSL/llvm_util.h b/src/include/OSL/llvm_util.h index 49df62891..be0ea444d 100644 --- a/src/include/OSL/llvm_util.h +++ b/src/include/OSL/llvm_util.h @@ -48,7 +48,7 @@ class PassManager; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -1247,4 +1247,4 @@ class OSLEXECPUBLIC LLVM_Util { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/mask.h b/src/include/OSL/mask.h index 3baeb147d..e4b2fa2e0 100644 --- a/src/include/OSL/mask.h +++ b/src/include/OSL/mask.h @@ -8,7 +8,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // clang-format off @@ -371,4 +371,4 @@ Mask::invoke_foreach(FunctorT f) const } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/optautomata.h b/src/include/OSL/optautomata.h index 3ea2077a4..5d3e856e3 100644 --- a/src/include/OSL/optautomata.h +++ b/src/include/OSL/optautomata.h @@ -11,7 +11,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN class DfAutomata; @@ -68,4 +68,4 @@ class OSLEXECPUBLIC DfOptimizedAutomata { std::vector m_states; }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/oslclosure.h b/src/include/OSL/oslclosure.h index 80b81e502..be096c33f 100644 --- a/src/include/OSL/oslclosure.h +++ b/src/include/OSL/oslclosure.h @@ -7,7 +7,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN /// Labels for light walks /// @@ -146,4 +146,4 @@ typedef ClosureComponent* ClosureComponentPtr; typedef ClosureAdd* ClosureAddPtr; typedef ClosureMul* ClosureMulPtr; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/oslcomp.h b/src/include/OSL/oslcomp.h index b126232a0..727143d6e 100644 --- a/src/include/OSL/oslcomp.h +++ b/src/include/OSL/oslcomp.h @@ -6,7 +6,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -48,4 +48,4 @@ class OSLCOMPPUBLIC OSLCompiler { -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/oslconfig.h.in b/src/include/OSL/oslconfig.h.in index ac8c82d20..4e18ca316 100644 --- a/src/include/OSL/oslconfig.h.in +++ b/src/include/OSL/oslconfig.h.in @@ -55,7 +55,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN /// Various compile-time defaults are defined here that could, in /// principle, be redefined if you are using OSL in some particular @@ -306,7 +306,7 @@ using ConstIndex = std::integral_constant; #endif -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END namespace std { // not necessary in C++17, then we can just say std::hash diff --git a/src/include/OSL/oslexec.h b/src/include/OSL/oslexec.h index 5e2220e51..ad86ecc76 100644 --- a/src/include/OSL/oslexec.h +++ b/src/include/OSL/oslexec.h @@ -12,7 +12,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // Various forward declarations class RendererServices; @@ -1164,4 +1164,4 @@ shade_image(ShadingSystem& shadingsys, ShaderGroup& group, #endif -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/oslnoise.h b/src/include/OSL/oslnoise.h index 7183d1c5f..3b027a1ce 100644 --- a/src/include/OSL/oslnoise.h +++ b/src/include/OSL/oslnoise.h @@ -21,7 +21,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace oslnoise { @@ -3379,4 +3379,4 @@ DECLNOISE (hashnoise, HashNoise) } // namespace oslnoise -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/oslquery.h b/src/include/OSL/oslquery.h index 4ea758352..8cebbc3fa 100644 --- a/src/include/OSL/oslquery.h +++ b/src/include/OSL/oslquery.h @@ -30,7 +30,7 @@ Sony Pictures Imageworks terms, above. // #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN using OIIO::cspan; using OIIO::span; @@ -304,4 +304,4 @@ OSLQuery::getparam(ustring name) const // more documentation /// -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/oslversion.h.in b/src/include/OSL/oslversion.h.in index 39186dadb..7e8485ff3 100644 --- a/src/include/OSL/oslversion.h.in +++ b/src/include/OSL/oslversion.h.in @@ -66,17 +66,33 @@ // Establish the name spaces -namespace @PROJ_NAMESPACE_V@ { } -namespace @PROJ_NAME@ = @PROJ_NAMESPACE_V@; +namespace @PROJ_NAMESPACE@ { + // Current version's new inner namespace is inline so it's used by default. + inline namespace @PROJ_VERSION_NAMESPACE@ { } + // Legacy namespaces: + // namespace v1_13 { } +} +#cmakedefine01 OSL_CUSTOM_OUTER_NAMESPACE +#if OSL_CUSTOM_OUTER_NAMESPACE +namespace OSL = @PROJ_NAMESPACE@; +#endif + + +// Macros to declare things in the current version's inline namespace. +#define OSL_NAMESPACE_BEGIN namespace @PROJ_NAMESPACE@ { inline namespace @PROJ_VERSION_NAMESPACE@ { +#define OSL_NAMESPACE_END } } +#define OSL_CURRENT_NAMESPACE @PROJ_NAMESPACE@::@PROJ_VERSION_NAMESPACE@ + +// Macros for defining legacy namespaces with an explicit version +#define OSL_NS_BEGIN(ver) namespace @PROJ_NAMESPACE@ { namespace ver { +#define OSL_NS_END } } -// Macros to use in each file to enter and exit the right name spaces. -#define @PROJ_NAME@_NAMESPACE @PROJ_NAMESPACE_V@ -#define @PROJ_NAME@_NAMESPACE_STRING "@PROJ_NAMESPACE_V@" -#define @PROJ_NAME@_NAMESPACE_ENTER namespace @PROJ_NAMESPACE_V@ { -#define @PROJ_NAME@_NAMESPACE_EXIT } +// Legacy definitions, DEPRECATED(1.14) +#define OSL_NAMESPACE_ENTER OSL_NAMESPACE_BEGIN +#define OSL_NAMESPACE_EXIT OSL_NAMESPACE_END -// Which CPP standard (11, 14, etc.) was this copy of OIIO *built* with? +// Which CPP standard (11, 14, etc.) was this copy of OSL *built* with? #define @PROJ_NAME@_BUILD_CPP @CMAKE_CXX_STANDARD@ // DEPRECATED(2.1): old macros separately giving compatibility. diff --git a/src/include/OSL/platform.h b/src/include/OSL/platform.h index 33268e732..6a94bdc43 100644 --- a/src/include/OSL/platform.h +++ b/src/include/OSL/platform.h @@ -508,7 +508,7 @@ # define OSL_ALLOCA(type, size) (assert(size < (1<<20)), (size) != 0 ? (reinterpret_cast(alloca((size) * sizeof(type)))) : nullptr) #endif -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN /// Standards-compliant bit cast of two equally sized types. This is used @@ -610,4 +610,4 @@ DataT* assume_aligned(DataT* ptr) static constexpr int MaxSupportedSimdLaneCount = 16; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/rendererservices.h b/src/include/OSL/rendererservices.h index 5d36b99d4..97fd30b71 100644 --- a/src/include/OSL/rendererservices.h +++ b/src/include/OSL/rendererservices.h @@ -10,7 +10,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN class RendererServices; template class BatchedRendererServices; @@ -594,4 +594,4 @@ class OSLEXECPUBLIC RendererServices { OSL_PRAGMA_WARNING_POP -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/rs_free_function.h b/src/include/OSL/rs_free_function.h index 925ecfd5d..de9b3316f 100644 --- a/src/include/OSL/rs_free_function.h +++ b/src/include/OSL/rs_free_function.h @@ -9,13 +9,13 @@ // Make all the strings defined in OSL // available to the renderer services free functions -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace Strings { #define STRDECL(str, var_name) OSLEXECPUBLIC extern const ustring var_name; #include #undef STRDECL }; // namespace Strings -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #ifdef OSL_HOST_RS_BITCODE extern "C" { @@ -351,7 +351,7 @@ rs_warningfmt(OSL::OpaqueExecContextPtr oec, OSL::ustringhash fmt_specification, #if 0 // C++ helpers to accept variable arguements and encode messages to be sent // through renderer service free functions -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // PackedArgs is similar to tuple but packs its data back to back @@ -467,5 +467,5 @@ warningfmt(OpaqueExecContextPtr oec, const SpecifierT& fmt_specification, } -OSL_NAMESPACE_EXIT -#endif \ No newline at end of file +OSL_NAMESPACE_END +#endif diff --git a/src/include/OSL/sfm_simplex.h b/src/include/OSL/sfm_simplex.h index c73c2a376..a3bf8a2a0 100644 --- a/src/include/OSL/sfm_simplex.h +++ b/src/include/OSL/sfm_simplex.h @@ -15,7 +15,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN /////////////////////////////////////////////////////////////////////// @@ -1234,4 +1234,4 @@ static fast_simplex::mask_emitter the_fast_simplex_mask_emitter; } // namespace __OSL_WIDE_PVT or pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/sfm_staticmatrix.h b/src/include/OSL/sfm_staticmatrix.h index 54281360c..80163c262 100644 --- a/src/include/OSL/sfm_staticmatrix.h +++ b/src/include/OSL/sfm_staticmatrix.h @@ -9,7 +9,7 @@ using namespace std; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { @@ -476,4 +476,4 @@ struct DynamicMatrix44 { } // namespace sfm } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/sfmath.h b/src/include/OSL/sfmath.h index a24e5d1d7..b9a281d77 100644 --- a/src/include/OSL/sfmath.h +++ b/src/include/OSL/sfmath.h @@ -17,7 +17,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #ifdef __OSL_WIDE_PVT namespace __OSL_WIDE_PVT { @@ -278,4 +278,4 @@ namespace sfm -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/shaderglobals.h b/src/include/OSL/shaderglobals.h index cc6c22d2c..2e5646ad0 100644 --- a/src/include/OSL/shaderglobals.h +++ b/src/include/OSL/shaderglobals.h @@ -5,7 +5,7 @@ #pragma once -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN struct ClosureColor; class ShadingContext; @@ -480,4 +480,4 @@ get_max_warnings_per_thread(const OpaqueExecContextPtr oec) -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/variant.h b/src/include/OSL/variant.h index 1c0858cdd..3ac347f27 100644 --- a/src/include/OSL/variant.h +++ b/src/include/OSL/variant.h @@ -8,7 +8,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // TODO: When minimum required C++ reaches C++17, replace with std::variant. template class ArgVariant { @@ -251,4 +251,4 @@ template class FunctionSpec { }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/wide.h b/src/include/OSL/wide.h index 1cad87e54..048719357 100644 --- a/src/include/OSL/wide.h +++ b/src/include/OSL/wide.h @@ -12,7 +12,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // template // struct ImplDefinedProxy @@ -3485,27 +3485,25 @@ MaskedData::assign_all_from_scalar(const void* ptr_data) const } -#define __OSL_USING_WIDE(WIDTH_OF_OSL_DATA) \ - template \ - using Block = OSL_NAMESPACE::Block; \ - \ - using Mask = OSL_NAMESPACE::Mask; \ - \ - using MaskedData = OSL_NAMESPACE::MaskedData; \ - \ - template \ - using Wide = OSL_NAMESPACE::Wide; \ - \ - template \ - using UniformAsWide \ - = OSL_NAMESPACE::UniformAsWide; \ - \ - template \ - using Masked = OSL_NAMESPACE::Masked; \ - template \ - using MaskedDx = OSL_NAMESPACE::MaskedDx; \ - template \ - using MaskedDy = OSL_NAMESPACE::MaskedDy; +#define __OSL_USING_WIDE(WIDTH_OF_OSL_DATA) \ + template \ + using Block = OSL::Block; \ + \ + using Mask = OSL::Mask; \ + \ + using MaskedData = OSL::MaskedData; \ + \ + template using Wide = OSL::Wide; \ + \ + template \ + using UniformAsWide = OSL::UniformAsWide; \ + \ + template \ + using Masked = OSL::Masked; \ + template \ + using MaskedDx = OSL::MaskedDx; \ + template \ + using MaskedDy = OSL::MaskedDy; // Use inside of @@ -3523,4 +3521,4 @@ MaskedData::assign_all_from_scalar(const void* ptr_data) const #undef __OSL_INHERIT_BASE_CTORS -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/OSL/wide/wide_gabornoise_fwd.h b/src/include/OSL/wide/wide_gabornoise_fwd.h index 24ef5a1af..a6bd4447f 100644 --- a/src/include/OSL/wide/wide_gabornoise_fwd.h +++ b/src/include/OSL/wide/wide_gabornoise_fwd.h @@ -11,7 +11,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN struct NoiseParams; @@ -121,4 +121,4 @@ wide_pgabor3(Masked> wResult, Wide> wP, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/optix_compat.h b/src/include/optix_compat.h index 05a959363..f108ae423 100644 --- a/src/include/optix_compat.h +++ b/src/include/optix_compat.h @@ -27,7 +27,7 @@ using float3 = OSL::Vec3; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #if OSL_USE_OPTIX @@ -86,4 +86,4 @@ cudaFree(void* p) #endif -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/include/osl_pvt.h b/src/include/osl_pvt.h index 10530b62f..f36e3d280 100644 --- a/src/include/osl_pvt.h +++ b/src/include/osl_pvt.h @@ -9,7 +9,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { class ASTNode; @@ -1164,7 +1164,7 @@ track_variable_lifetimes_main(const OpcodeVec& ircode, }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslcomp/ast.cpp b/src/liboslcomp/ast.cpp index 4b54fa41a..6d0e4a858 100644 --- a/src/liboslcomp/ast.cpp +++ b/src/liboslcomp/ast.cpp @@ -19,7 +19,7 @@ #include namespace Strutil = OIIO::Strutil; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -1426,4 +1426,4 @@ ASTliteral::print(std::ostream& out, int indentlevel) const }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslcomp/ast.h b/src/liboslcomp/ast.h index b057f8dfd..b9f94a8da 100644 --- a/src/liboslcomp/ast.h +++ b/src/liboslcomp/ast.h @@ -13,7 +13,7 @@ class oslFlexLexer; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -1069,4 +1069,4 @@ class ASTliteral final : public ASTNode { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslcomp/codegen.cpp b/src/liboslcomp/codegen.cpp index 16dbbbcdf..1c3be53c2 100644 --- a/src/liboslcomp/codegen.cpp +++ b/src/liboslcomp/codegen.cpp @@ -12,7 +12,7 @@ namespace Strutil = OIIO::Strutil; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -2053,4 +2053,4 @@ ASTliteral::codegen(Symbol* /*dest*/) }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslcomp/oslcomp.cpp b/src/liboslcomp/oslcomp.cpp index f4c4803d9..28ce89fe4 100644 --- a/src/liboslcomp/oslcomp.cpp +++ b/src/liboslcomp/oslcomp.cpp @@ -36,7 +36,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN OSLCompiler::OSLCompiler(ErrorHandler* errhandler) @@ -1393,4 +1393,4 @@ OSLCompilerImpl::syms_used_in_op_range(OpcodeVec::const_iterator opbegin, }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslcomp/oslcomp_pvt.h b/src/liboslcomp/oslcomp_pvt.h index 27a1cedb3..8a1898755 100644 --- a/src/liboslcomp/oslcomp_pvt.h +++ b/src/liboslcomp/oslcomp_pvt.h @@ -17,7 +17,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -477,4 +477,4 @@ class OSLCompilerImpl { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslcomp/oslgram.y b/src/liboslcomp/oslgram.y index 052c09821..715ab77f8 100644 --- a/src/liboslcomp/oslgram.y +++ b/src/liboslcomp/oslgram.y @@ -52,7 +52,7 @@ using namespace OSL::pvt; } %{ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { int yylex(YYSTYPE* yylval_param, YYLTYPE* yylloc_param, void* yyscanner, OSLCompilerImpl* oslcompiler); @@ -61,7 +61,7 @@ void yyerror (YYLTYPE* yylloc_param, void* yyscanner, OSLCompilerImpl* oslcompil TypeDesc osllextype (int lex); } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END %} diff --git a/src/liboslcomp/osllex.l b/src/liboslcomp/osllex.l index 3f8fce221..d304cdea8 100644 --- a/src/liboslcomp/osllex.l +++ b/src/liboslcomp/osllex.l @@ -120,12 +120,12 @@ using namespace OSL::pvt; #pragma GCC visibility push(hidden) #endif -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { void preprocess (const char *str, OSLCompilerImpl* oslcompiler, YYLTYPE* yyloc_param); int osllex(YYSTYPE* yylval_param, YYLTYPE* yyloc_param, void* yyscanner, OSLCompilerImpl* oslcompiler); } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #define YY_DECL int OSL::pvt::osllex(YYSTYPE* yylval_param, YYLTYPE* yyloc_param, void* yyscanner, OSLCompilerImpl* oslcompiler) // Macro that sets the yylloc line variables to the current parse line. @@ -292,7 +292,7 @@ OSL_NAMESPACE_EXIT %% -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt void @@ -412,7 +412,7 @@ OSLCompilerImpl::osl_parse_buffer (const std::string &preprocessed_buffer) } }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #if defined(__GNUC__) || defined(__clang__) #pragma GCC visibility pop diff --git a/src/liboslcomp/symtab.cpp b/src/liboslcomp/symtab.cpp index 845553ea6..7fc519752 100644 --- a/src/liboslcomp/symtab.cpp +++ b/src/liboslcomp/symtab.cpp @@ -12,7 +12,7 @@ namespace Strutil = OIIO::Strutil; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -422,4 +422,4 @@ track_variable_lifetimes_main(const OpcodeVec& code, const SymbolPtrVec& opargs, }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslcomp/symtab.h b/src/liboslcomp/symtab.h index 3e58eebe5..22b726d7e 100644 --- a/src/liboslcomp/symtab.h +++ b/src/liboslcomp/symtab.h @@ -15,7 +15,7 @@ #include "osl_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -269,4 +269,4 @@ class SymbolTable { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslcomp/typecheck.cpp b/src/liboslcomp/typecheck.cpp index f933464ec..919266647 100644 --- a/src/liboslcomp/typecheck.cpp +++ b/src/liboslcomp/typecheck.cpp @@ -11,7 +11,7 @@ namespace Strutil = OIIO::Strutil; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -2233,4 +2233,4 @@ OSLCompilerImpl::initialize_builtin_funcs() }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/accum.cpp b/src/liboslexec/accum.cpp index 223d2e3cc..53fd7b03a 100644 --- a/src/liboslexec/accum.cpp +++ b/src/liboslexec/accum.cpp @@ -7,7 +7,7 @@ #include "lpeparse.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN @@ -201,4 +201,4 @@ Accumulator::end(void* flush_data) m_outputs[i].flush(flush_data); } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/automata.cpp b/src/liboslexec/automata.cpp index 64f367775..418fe6759 100644 --- a/src/liboslexec/automata.cpp +++ b/src/liboslexec/automata.cpp @@ -8,7 +8,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace Strutil = OIIO::Strutil; @@ -687,4 +687,4 @@ DfOptimizedAutomata::compileFrom(const DfAutomata& dfautomata) } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/automata.h b/src/liboslexec/automata.h index 1a9c43b73..9130e7693 100644 --- a/src/liboslexec/automata.h +++ b/src/liboslexec/automata.h @@ -14,7 +14,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // General container for all symbol sets @@ -314,4 +314,4 @@ class StateSetRecord { void ndfautoToDfauto(const NdfAutomata& ndfautomata, DfAutomata& dfautomata); -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/backendllvm.cpp b/src/liboslexec/backendllvm.cpp index a72854152..161ec852a 100644 --- a/src/liboslexec/backendllvm.cpp +++ b/src/liboslexec/backendllvm.cpp @@ -12,7 +12,7 @@ using namespace OSL; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -927,4 +927,4 @@ BackendLLVM::find_userdata_index(const Symbol& sym) }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/backendllvm.h b/src/liboslexec/backendllvm.h index 9dfa12d00..64cdd76d1 100644 --- a/src/liboslexec/backendllvm.h +++ b/src/liboslexec/backendllvm.h @@ -20,7 +20,7 @@ using namespace OSL::pvt; #include "llvm/IR/Module.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -657,4 +657,4 @@ append_constant_arg(BackendLLVM& rop, const TArgVariant& arg, }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/batched_analysis.cpp b/src/liboslexec/batched_analysis.cpp index 626c7e78e..97287529b 100644 --- a/src/liboslexec/batched_analysis.cpp +++ b/src/liboslexec/batched_analysis.cpp @@ -25,7 +25,7 @@ using namespace OSL; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace Strings { @@ -2989,4 +2989,4 @@ BatchedAnalysis::dump_layer(ShaderInstance* inst) } }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/batched_analysis.h b/src/liboslexec/batched_analysis.h index 3cb6f9867..143180205 100644 --- a/src/liboslexec/batched_analysis.h +++ b/src/liboslexec/batched_analysis.h @@ -6,7 +6,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -35,4 +35,4 @@ class BatchedAnalysis { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/batched_backendllvm.cpp b/src/liboslexec/batched_backendllvm.cpp index 79f87ca90..ddce7776d 100644 --- a/src/liboslexec/batched_backendllvm.cpp +++ b/src/liboslexec/batched_backendllvm.cpp @@ -17,7 +17,7 @@ using namespace OSL; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace Strings { @@ -2180,4 +2180,4 @@ BatchedBackendLLVM::llvm_print_mask(const char* title, llvm::Value* mask) } }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/batched_backendllvm.h b/src/liboslexec/batched_backendllvm.h index 088aa5939..0417b7d48 100644 --- a/src/liboslexec/batched_backendllvm.h +++ b/src/liboslexec/batched_backendllvm.h @@ -25,7 +25,7 @@ class raw_svector_ostream; } -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -844,4 +844,4 @@ class BatchedBackendLLVM : public OSOProcessorBase { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/batched_llvm_gen.cpp b/src/liboslexec/batched_llvm_gen.cpp index d78554309..8ec1af80a 100644 --- a/src/liboslexec/batched_llvm_gen.cpp +++ b/src/liboslexec/batched_llvm_gen.cpp @@ -21,7 +21,7 @@ using namespace OSL; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -8745,4 +8745,4 @@ LLVMGEN(llvm_gen_end) }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/batched_llvm_instance.cpp b/src/liboslexec/batched_llvm_instance.cpp index 2af1127d7..b9bf7423a 100644 --- a/src/liboslexec/batched_llvm_instance.cpp +++ b/src/liboslexec/batched_llvm_instance.cpp @@ -123,7 +123,7 @@ extern unsigned char osl_llvm_compiled_ops_block[]; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -2960,4 +2960,4 @@ BatchedBackendLLVM::run() }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/batched_rendservices.cpp b/src/liboslexec/batched_rendservices.cpp index e36dff3a2..b8fa14721 100644 --- a/src/liboslexec/batched_rendservices.cpp +++ b/src/liboslexec/batched_rendservices.cpp @@ -11,7 +11,7 @@ using namespace OSL; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #ifdef OIIO_TEXTURESYSTEM_CREATE_SHARED @@ -349,4 +349,4 @@ template class OSLEXECPUBLIC BatchedRendererServices<16>; template class OSLEXECPUBLIC BatchedRendererServices<8>; template class OSLEXECPUBLIC BatchedRendererServices<4>; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/closure.cpp b/src/liboslexec/closure.cpp index 8f27d4333..1d763ff18 100644 --- a/src/liboslexec/closure.cpp +++ b/src/liboslexec/closure.cpp @@ -16,7 +16,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN const ustring Labels::NONE = ustring(NULL); const ustring Labels::CAMERA = ustring("C"); @@ -146,4 +146,4 @@ print_closure(std::ostream& out, const ClosureColor* closure, -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/constantpool.h b/src/liboslexec/constantpool.h index bc46c0da2..2604c3da1 100644 --- a/src/liboslexec/constantpool.h +++ b/src/liboslexec/constantpool.h @@ -13,7 +13,7 @@ using namespace OSL; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -71,4 +71,4 @@ template class ConstantPool { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/constfold.cpp b/src/liboslexec/constfold.cpp index 2e7664f27..76d22ccb0 100644 --- a/src/liboslexec/constfold.cpp +++ b/src/liboslexec/constfold.cpp @@ -41,7 +41,7 @@ static ustring u_sqrt("sqrt"); static ustring u_sub("sub"); -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -3070,4 +3070,4 @@ DECLFOLDER(constfold_raytype) }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/context.cpp b/src/liboslexec/context.cpp index b001315a8..8331924a7 100644 --- a/src/liboslexec/context.cpp +++ b/src/liboslexec/context.cpp @@ -22,7 +22,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN static mutex buffered_errors_mutex; #if OSL_USE_BATCHED @@ -678,4 +678,4 @@ template class ShadingContext::Batched<4>; #endif -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/dictionary.cpp b/src/liboslexec/dictionary.cpp index 9762819e3..93355923b 100644 --- a/src/liboslexec/dictionary.cpp +++ b/src/liboslexec/dictionary.cpp @@ -21,7 +21,7 @@ namespace pugi = OIIO::pugi; #include "oslexec_pvt.h" #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -506,4 +506,4 @@ osl_dict_value(OpaqueExecContextPtr oec, int nodeID, -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/instance.cpp b/src/liboslexec/instance.cpp index 46a4a6129..038a33c94 100644 --- a/src/liboslexec/instance.cpp +++ b/src/liboslexec/instance.cpp @@ -12,7 +12,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -937,4 +937,4 @@ ShaderGroup::serialize() const } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/journal.cpp b/src/liboslexec/journal.cpp index c582e44e1..a53556d3d 100644 --- a/src/liboslexec/journal.cpp +++ b/src/liboslexec/journal.cpp @@ -10,7 +10,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN int decode_message(uint64_t format_hash, int32_t arg_count, @@ -436,4 +436,4 @@ Reader::process_entries_for_thread(int thread_index) } //namespace journal -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/llvm_gen.cpp b/src/liboslexec/llvm_gen.cpp index 5b7b1d824..09c9ddd94 100644 --- a/src/liboslexec/llvm_gen.cpp +++ b/src/liboslexec/llvm_gen.cpp @@ -13,7 +13,7 @@ using namespace OSL; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -4449,4 +4449,4 @@ OSL_PRAGMA_WARNING_POP }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/llvm_instance.cpp b/src/liboslexec/llvm_instance.cpp index be17cfb0e..32b184e8c 100644 --- a/src/liboslexec/llvm_instance.cpp +++ b/src/liboslexec/llvm_instance.cpp @@ -128,7 +128,7 @@ extern unsigned char shadeops_cuda_llvm_compiled_ops_block[]; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -2519,4 +2519,4 @@ BackendLLVM::run() }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/llvm_passes.h b/src/liboslexec/llvm_passes.h index 4bab1f8a1..99014e3cc 100644 --- a/src/liboslexec/llvm_passes.h +++ b/src/liboslexec/llvm_passes.h @@ -18,7 +18,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -438,4 +438,4 @@ template<> char LegacyPreventBitMasksFromBeingLiveinsToBasicBlocks<16>::ID = 0; } // end of anonymous namespace } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp index ae0b01ca9..df23c38d1 100644 --- a/src/liboslexec/llvm_util.cpp +++ b/src/liboslexec/llvm_util.cpp @@ -128,7 +128,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // Convert our cspan<> to llvm's ArrayRef. @@ -6885,4 +6885,4 @@ LLVM_Util::getCurrentInliningSite() const } }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/loadshader.cpp b/src/liboslexec/loadshader.cpp index 4c274735f..0ea41a866 100644 --- a/src/liboslexec/loadshader.cpp +++ b/src/liboslexec/loadshader.cpp @@ -18,7 +18,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -662,4 +662,4 @@ ShadingSystemImpl::LoadMemoryCompiledShader(string_view shadername, }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/lpeparse.cpp b/src/liboslexec/lpeparse.cpp index 01a10c4ce..29ac7c878 100644 --- a/src/liboslexec/lpeparse.cpp +++ b/src/liboslexec/lpeparse.cpp @@ -6,7 +6,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN @@ -452,4 +452,4 @@ Parser::parse(const char* text) } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/lpeparse.h b/src/liboslexec/lpeparse.h index f76c66de3..8bd5cd061 100644 --- a/src/liboslexec/lpeparse.h +++ b/src/liboslexec/lpeparse.h @@ -7,7 +7,7 @@ #include "lpexp.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN @@ -121,4 +121,4 @@ class Parser { }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/lpexp.cpp b/src/liboslexec/lpexp.cpp index 99fca6339..acd41f8a0 100644 --- a/src/liboslexec/lpexp.cpp +++ b/src/liboslexec/lpexp.cpp @@ -5,7 +5,7 @@ #include "lpexp.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN @@ -192,4 +192,4 @@ lpexp::Rule::genAuto(NdfAutomata& automata) const } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/lpexp.h b/src/liboslexec/lpexp.h index f672187f6..6581fc02a 100644 --- a/src/liboslexec/lpexp.h +++ b/src/liboslexec/lpexp.h @@ -6,7 +6,7 @@ #include "automata.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace lpexp { @@ -178,4 +178,4 @@ class Rule { } // namespace lpexp -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/master.cpp b/src/liboslexec/master.cpp index f1a5fe169..67f7863e5 100644 --- a/src/liboslexec/master.cpp +++ b/src/liboslexec/master.cpp @@ -14,7 +14,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt ShaderMaster::ShaderMaster(ShadingSystemImpl& shadingsys) @@ -257,4 +257,4 @@ ShaderMaster::print() } }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/null_noise.h b/src/liboslexec/null_noise.h index 4468ec6f6..b0f8626b3 100644 --- a/src/liboslexec/null_noise.h +++ b/src/liboslexec/null_noise.h @@ -6,7 +6,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -181,4 +181,4 @@ struct UNullNoise { }; } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/opclosure.cpp b/src/liboslexec/opclosure.cpp index 319b7ec0a..6aa32a072 100644 --- a/src/liboslexec/opclosure.cpp +++ b/src/liboslexec/opclosure.cpp @@ -9,7 +9,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -95,4 +95,4 @@ osl_closure_to_ustringhash(ShaderGlobals* sg, ClosureColor* c) } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/opcolor.cpp b/src/liboslexec/opcolor.cpp index 0da9421b3..028550134 100644 --- a/src/liboslexec/opcolor.cpp +++ b/src/liboslexec/opcolor.cpp @@ -23,7 +23,7 @@ #include "opcolor_impl.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -519,4 +519,4 @@ osl_transformc(OpaqueExecContextPtr oec, void* Cin, int Cin_derivs, void* Cout, -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/opcolor.h b/src/liboslexec/opcolor.h index 7112b90d4..8e1890692 100644 --- a/src/liboslexec/opcolor.h +++ b/src/liboslexec/opcolor.h @@ -20,7 +20,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN //Forward declare class ShadingContext; @@ -164,4 +164,4 @@ class OCIOColorSystem { } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/opcolor_impl.h b/src/liboslexec/opcolor_impl.h index d6d65d019..ea32f9873 100644 --- a/src/liboslexec/opcolor_impl.h +++ b/src/liboslexec/opcolor_impl.h @@ -19,7 +19,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #ifdef __OSL_WIDE_PVT namespace __OSL_WIDE_PVT { @@ -576,4 +576,4 @@ ColorSystem::blackbody_rgb(float T) const } } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/opfmt.cpp b/src/liboslexec/opfmt.cpp index c0caa21fd..3c1f1fc92 100644 --- a/src/liboslexec/opfmt.cpp +++ b/src/liboslexec/opfmt.cpp @@ -23,7 +23,7 @@ #include "shading_state_uniform.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -114,4 +114,4 @@ get_max_warnings_per_thread(OpaqueExecContextPtr oec) } //namespace pvt -OSL_NAMESPACE_EXIT \ No newline at end of file +OSL_NAMESPACE_END diff --git a/src/liboslexec/opmatrix.cpp b/src/liboslexec/opmatrix.cpp index 7335fe278..8e6f0e5be 100644 --- a/src/liboslexec/opmatrix.cpp +++ b/src/liboslexec/opmatrix.cpp @@ -26,7 +26,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -345,4 +345,4 @@ osl_determinant_fm(void* m) } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/opmessage.cpp b/src/liboslexec/opmessage.cpp index ef63995f7..b23c4690b 100644 --- a/src/liboslexec/opmessage.cpp +++ b/src/liboslexec/opmessage.cpp @@ -23,7 +23,7 @@ // -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -138,4 +138,4 @@ osl_getmessage(ShaderGlobals* sg, ustringhash_pod source_, } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/opnoise.cpp b/src/liboslexec/opnoise.cpp index 35345af23..4b039e4ec 100644 --- a/src/liboslexec/opnoise.cpp +++ b/src/liboslexec/opnoise.cpp @@ -13,7 +13,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -978,6 +978,6 @@ osl_hash_ivf(void* x, float y) } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #endif diff --git a/src/liboslexec/opspline.cpp b/src/liboslexec/opspline.cpp index eed07933b..a4baa7c1e 100644 --- a/src/liboslexec/opspline.cpp +++ b/src/liboslexec/opspline.cpp @@ -25,7 +25,7 @@ #include #include "splineimpl.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -155,4 +155,4 @@ osl_splineinverse_dffdf(void* out, ustringhash_pod spline_, void* x, } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/opstring.cpp b/src/liboslexec/opstring.cpp index e4d41ce5a..664d081a6 100644 --- a/src/liboslexec/opstring.cpp +++ b/src/liboslexec/opstring.cpp @@ -21,7 +21,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -245,4 +245,4 @@ osl_formatfmt(OpaqueExecContextPtr exec_ctx, } // end namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/optexture.cpp b/src/liboslexec/optexture.cpp index 42b91421c..cbd010f85 100644 --- a/src/liboslexec/optexture.cpp +++ b/src/liboslexec/optexture.cpp @@ -21,7 +21,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -635,4 +635,4 @@ osl_trace_get(OpaqueExecContextPtr oec, ustringhash_pod name_, long long type_, } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/oslexec.cpp b/src/liboslexec/oslexec.cpp index 9cef337b2..50b74a615 100644 --- a/src/liboslexec/oslexec.cpp +++ b/src/liboslexec/oslexec.cpp @@ -14,7 +14,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -52,4 +52,4 @@ shadertype_from_name(string_view name) }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/oslexec_pvt.h b/src/liboslexec/oslexec_pvt.h index 7a8dedc81..92f29f954 100644 --- a/src/liboslexec/oslexec_pvt.h +++ b/src/liboslexec/oslexec_pvt.h @@ -64,7 +64,7 @@ using OIIO::spin_mutex; namespace Strutil = OIIO::Strutil; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN @@ -2705,4 +2705,4 @@ class OSOProcessorBase { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/osogram.y b/src/liboslexec/osogram.y index d474ccd7b..b5c0fbac8 100644 --- a/src/liboslexec/osogram.y +++ b/src/liboslexec/osogram.y @@ -48,7 +48,7 @@ } %{ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { int yylex(YYSTYPE* yylval_param, YYLTYPE* yylloc_param, void* yyscanner, OSOReader* osoreader); @@ -57,7 +57,7 @@ void yyerror (YYLTYPE* yylloc_param, void* yyscanner, OSOReader* osoreader, cons TypeDesc osolextype (int lex); } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END using namespace OSL; using namespace OSL::pvt; diff --git a/src/liboslexec/osolex.l b/src/liboslexec/osolex.l index 1cd8ec8b8..9c87489ab 100644 --- a/src/liboslexec/osolex.l +++ b/src/liboslexec/osolex.l @@ -93,11 +93,11 @@ using namespace OSL::pvt; #include "osogram.hpp" /* Generated by bison/yacc */ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { int osolex(YYSTYPE* yylval_param, YYLTYPE* yylloc_param, void* yyscanner, OSOReader* osoreader); } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #define YY_DECL int OSL::pvt::osolex(YYSTYPE* yylval_param, YYLTYPE* yylloc_param, void* yyscanner, OSOReader* osoreader) #ifdef _WIN32 @@ -259,7 +259,7 @@ OSL_NAMESPACE_EXIT -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -342,7 +342,7 @@ OSOReader::parse_memory (const std::string &buffer) }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #if defined(__GNUC__) || defined(__clang__) #pragma GCC visibility pop diff --git a/src/liboslexec/osoreader.h b/src/liboslexec/osoreader.h index b16e3144e..d2f58f40e 100644 --- a/src/liboslexec/osoreader.h +++ b/src/liboslexec/osoreader.h @@ -12,7 +12,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -135,4 +135,4 @@ OSL_PRAGMA_WARNING_POP }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/pointcloud.cpp b/src/liboslexec/pointcloud.cpp index 19bf7216f..6037ec94c 100644 --- a/src/liboslexec/pointcloud.cpp +++ b/src/liboslexec/pointcloud.cpp @@ -11,7 +11,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { #ifdef USE_PARTIO @@ -496,4 +496,4 @@ osl_pointcloud_write(OpaqueExecContextPtr oec, ustringhash_pod filename_, } } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/pointcloud.h b/src/liboslexec/pointcloud.h index 7dcfcfe04..4b49e24a8 100644 --- a/src/liboslexec/pointcloud.h +++ b/src/liboslexec/pointcloud.h @@ -10,7 +10,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { #ifdef USE_PARTIO @@ -151,4 +151,4 @@ TypeDescOfPartioType(const Partio::ParticleAttribute* ptype) #endif } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/rendservices.cpp b/src/liboslexec/rendservices.cpp index d97376011..89f35a131 100644 --- a/src/liboslexec/rendservices.cpp +++ b/src/liboslexec/rendservices.cpp @@ -16,7 +16,7 @@ using namespace OSL::pvt; #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #ifdef OIIO_TEXTURESYSTEM_CREATE_SHARED @@ -549,4 +549,4 @@ RendererServices::batched(WidthOf<4>) return nullptr; } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/runtimeoptimize.cpp b/src/liboslexec/runtimeoptimize.cpp index 74be3eae1..63bf5f8fd 100644 --- a/src/liboslexec/runtimeoptimize.cpp +++ b/src/liboslexec/runtimeoptimize.cpp @@ -48,7 +48,7 @@ static ustring u_I("I"); static ustring main_method_name("___main___"); -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -3577,4 +3577,4 @@ RuntimeOptimizer::police_failed_optimizations() } }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/runtimeoptimize.h b/src/liboslexec/runtimeoptimize.h index 355b8a482..990d836f7 100644 --- a/src/liboslexec/runtimeoptimize.h +++ b/src/liboslexec/runtimeoptimize.h @@ -20,7 +20,7 @@ using namespace OSL; using namespace OSL::pvt; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -531,4 +531,4 @@ class RuntimeOptimizer final : public OSOProcessorBase { }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/shadeimage.cpp b/src/liboslexec/shadeimage.cpp index 247a74459..da982670e 100644 --- a/src/liboslexec/shadeimage.cpp +++ b/src/liboslexec/shadeimage.cpp @@ -18,7 +18,7 @@ using namespace OSL::pvt; # undef RGB #endif -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN @@ -185,4 +185,4 @@ shade_image(ShadingSystem& shadingsys, ShaderGroup& group, shadelocations, roi, OIIO::paropt(popt)); } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/shading_state_uniform.h b/src/liboslexec/shading_state_uniform.h index 05fb1cf5b..d89fc8867 100644 --- a/src/liboslexec/shading_state_uniform.h +++ b/src/liboslexec/shading_state_uniform.h @@ -6,7 +6,7 @@ #include #include "opcolor.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -42,4 +42,4 @@ get_commonspace_synonym(const OpaqueExecContextPtr oec) } // namespace pvt -OSL_NAMESPACE_EXIT \ No newline at end of file +OSL_NAMESPACE_END diff --git a/src/liboslexec/shadingsys.cpp b/src/liboslexec/shadingsys.cpp index 6fc64cb61..900912cb5 100644 --- a/src/liboslexec/shadingsys.cpp +++ b/src/liboslexec/shadingsys.cpp @@ -56,7 +56,7 @@ extern unsigned char shadeops_cuda_ptx_compiled_ops_block[]; #endif -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN @@ -4440,7 +4440,7 @@ ShadingContext::ocio_transform(ustring fromspace, ustring tospace, -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/splineimpl.h b/src/liboslexec/splineimpl.h index 1d8dbfa6b..52563ba87 100644 --- a/src/liboslexec/splineimpl.h +++ b/src/liboslexec/splineimpl.h @@ -4,7 +4,7 @@ #pragma once -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -292,4 +292,4 @@ struct SplineInterp { }; // namespace Spline }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/typespec.cpp b/src/liboslexec/typespec.cpp index 1d0df3aca..0722585f7 100644 --- a/src/liboslexec/typespec.cpp +++ b/src/liboslexec/typespec.cpp @@ -14,7 +14,7 @@ -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { // OSL::pvt @@ -333,4 +333,4 @@ relaxed_equivalent(const TypeSpec& a, const TypeSpec& b) }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/wide/batched_cg_policy.h b/src/liboslexec/wide/batched_cg_policy.h index 5384fc92b..6c1247f08 100644 --- a/src/liboslexec/wide/batched_cg_policy.h +++ b/src/liboslexec/wide/batched_cg_policy.h @@ -13,7 +13,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -45,6 +45,6 @@ template struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #endif diff --git a/src/liboslexec/wide/wide_opalgebraic.cpp b/src/liboslexec/wide/wide_opalgebraic.cpp index f476c5d56..cc0e0bee2 100644 --- a/src/liboslexec/wide/wide_opalgebraic.cpp +++ b/src/liboslexec/wide/wide_opalgebraic.cpp @@ -23,7 +23,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -1438,6 +1438,6 @@ __OSL_MASKED_OP4(smoothstep, Wdf, Wf, Wdf, Wf)(void* r_, void* e0_, void* e1_, } } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_opclosure.cpp b/src/liboslexec/wide/wide_opclosure.cpp index 872abe7fe..0f81abf43 100644 --- a/src/liboslexec/wide/wide_opclosure.cpp +++ b/src/liboslexec/wide/wide_opclosure.cpp @@ -15,7 +15,7 @@ #include "define_opname_macros.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -216,4 +216,4 @@ __OSL_OP(closure_to_string)(void* bsg_, ClosureColor* c) } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/wide/wide_opcolor.cpp b/src/liboslexec/wide/wide_opcolor.cpp index d1e96320f..ba347766c 100644 --- a/src/liboslexec/wide/wide_opcolor.cpp +++ b/src/liboslexec/wide/wide_opcolor.cpp @@ -22,7 +22,7 @@ #include "opcolor_impl.h" #include "opcolor.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -539,6 +539,6 @@ __OSL_OP3(transform_color, v, s, s)(void* bsg_, void* Cin, int Cin_derivs, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_opdictionary.cpp b/src/liboslexec/wide/wide_opdictionary.cpp index b209d9bf8..7cdbc21fa 100644 --- a/src/liboslexec/wide/wide_opdictionary.cpp +++ b/src/liboslexec/wide/wide_opdictionary.cpp @@ -23,7 +23,7 @@ //#include "oslexec_pvt.h" //#include "define_opname_macros.h" // -//OSL_NAMESPACE_ENTER +//OSL_NAMESPACE_BEGIN // //namespace __OSL_WIDE_PVT { // @@ -39,7 +39,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { @@ -258,6 +258,6 @@ __OSL_MASKED_OP(dict_value)(void* bsg_, void* wOut /*return int dict_value*/, }; // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_ophash.cpp b/src/liboslexec/wide/wide_ophash.cpp index b640f7148..475d24706 100644 --- a/src/liboslexec/wide/wide_ophash.cpp +++ b/src/liboslexec/wide/wide_ophash.cpp @@ -16,7 +16,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -235,4 +235,4 @@ __OSL_MASKED_OP3(hash, Wi, Wv, Wf)(void* r_, void* val_, void* val2_, } } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/wide/wide_opmatrix.cpp b/src/liboslexec/wide/wide_opmatrix.cpp index 33b3ef2aa..3849ca355 100644 --- a/src/liboslexec/wide/wide_opmatrix.cpp +++ b/src/liboslexec/wide/wide_opmatrix.cpp @@ -18,7 +18,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -1605,6 +1605,6 @@ __OSL_MASKED_OP2(determinant, Wf, Wm)(void* wr_, void* wm_, } } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_opmessage.cpp b/src/liboslexec/wide/wide_opmessage.cpp index de426f9c7..ac6d9e41c 100644 --- a/src/liboslexec/wide/wide_opmessage.cpp +++ b/src/liboslexec/wide/wide_opmessage.cpp @@ -9,7 +9,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { @@ -450,4 +450,4 @@ __OSL_MASKED_OP(trace)(void* bsg_, void* result, void* opt_, void* Pos_, } } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/wide/wide_opnoise.cpp b/src/liboslexec/wide/wide_opnoise.cpp index f951df4cb..a3c291646 100644 --- a/src/liboslexec/wide/wide_opnoise.cpp +++ b/src/liboslexec/wide/wide_opnoise.cpp @@ -12,7 +12,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -35,6 +35,6 @@ __OSL_MASKED_OP(count_noise)(void* bsg_, unsigned int mask_value) } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_opnoise_gabor_impl.cpp b/src/liboslexec/wide/wide_opnoise_gabor_impl.cpp index 7dd2b66b5..7d593763a 100644 --- a/src/liboslexec/wide/wide_opnoise_gabor_impl.cpp +++ b/src/liboslexec/wide/wide_opnoise_gabor_impl.cpp @@ -17,7 +17,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { #include "define_opname_macros.h" @@ -191,7 +191,7 @@ __OSL_NOISE_OP2(Wdv, Wdv)(char* name, char* r_ptr, char* p_ptr, char* bsg, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #undef LOOKUP_WIDE_GABOR_IMPL_BY_OPT diff --git a/src/liboslexec/wide/wide_opnoise_generic_impl.cpp b/src/liboslexec/wide/wide_opnoise_generic_impl.cpp index 2f5679ada..d977d0388 100644 --- a/src/liboslexec/wide/wide_opnoise_generic_impl.cpp +++ b/src/liboslexec/wide/wide_opnoise_generic_impl.cpp @@ -14,7 +14,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -248,6 +248,6 @@ __OSL_GENERIC_DISPATCH2(Wdv, Wdv, Wv, Wv, Dual2) } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_opnoise_impl_deriv_xmacro.h b/src/liboslexec/wide/wide_opnoise_impl_deriv_xmacro.h index b3beb5990..b2e168be7 100644 --- a/src/liboslexec/wide/wide_opnoise_impl_deriv_xmacro.h +++ b/src/liboslexec/wide/wide_opnoise_impl_deriv_xmacro.h @@ -19,7 +19,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -364,7 +364,7 @@ __OSL_NOISE_OP3(Wdv, Wdv, Wdf)(char* r_ptr, char* p_ptr, char* t_ptr, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #undef __OSL_NOISE_OP2 #undef __OSL_NOISE_OP3 diff --git a/src/liboslexec/wide/wide_opnoise_impl_xmacro.h b/src/liboslexec/wide/wide_opnoise_impl_xmacro.h index b7c99ebe2..333fd784c 100644 --- a/src/liboslexec/wide/wide_opnoise_impl_xmacro.h +++ b/src/liboslexec/wide/wide_opnoise_impl_xmacro.h @@ -18,7 +18,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -368,7 +368,7 @@ __OSL_NOISE_OP3(Wv, Wf, Wf)(char* r_ptr, char* x_ptr, char* y_ptr, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #undef __OSL_NOISE_OP2 diff --git a/src/liboslexec/wide/wide_opnoise_periodic_gabor_impl.cpp b/src/liboslexec/wide/wide_opnoise_periodic_gabor_impl.cpp index 2e14370e6..f961e3ecc 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_gabor_impl.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_gabor_impl.cpp @@ -17,7 +17,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { /*********************************************************************** @@ -215,7 +215,7 @@ __OSL_PNOISE_OP5(Wdv, Wdv, Wdf, Wv, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #undef __OSL_PNOISE_OP3 #undef __OSL_PNOISE_OP5 diff --git a/src/liboslexec/wide/wide_opnoise_periodic_generic_impl.cpp b/src/liboslexec/wide/wide_opnoise_periodic_generic_impl.cpp index 8d0357640..5a9cc039f 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_generic_impl.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_generic_impl.cpp @@ -11,7 +11,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -182,6 +182,6 @@ __OSL_GENERIC_DISPATCH3(Wdv, Wdv, Wv, Wv, Wv, Dual2) __OSL_GENERIC_DISPATCH5(Wdv, Wdv, Wdf, Wv, Wf, Wv, Wv, Wf, Dual2) } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_opnoise_periodic_impl_deriv_xmacro.h b/src/liboslexec/wide/wide_opnoise_periodic_impl_deriv_xmacro.h index 389ce4bb9..fdfa5189e 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_impl_deriv_xmacro.h +++ b/src/liboslexec/wide/wide_opnoise_periodic_impl_deriv_xmacro.h @@ -19,7 +19,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -414,7 +414,7 @@ __OSL_PNOISE_OP5(Wdv, Wdv, Wdf, Wv, Wf)(char* r_ptr, char* p_ptr, char* t_ptr, #endif } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #undef __OSL_PNOISE_OP3 diff --git a/src/liboslexec/wide/wide_opnoise_periodic_impl_xmacro.h b/src/liboslexec/wide/wide_opnoise_periodic_impl_xmacro.h index b3feef116..ec3371201 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_impl_xmacro.h +++ b/src/liboslexec/wide/wide_opnoise_periodic_impl_xmacro.h @@ -19,7 +19,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -417,7 +417,7 @@ __OSL_PNOISE_OP5(Wv, Wv, Wf, Wv, Wf)(char* r_ptr, char* p_ptr, char* t_ptr, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #undef __OSL_PNOISE_OP3 #undef __OSL_PNOISE_OP5 diff --git a/src/liboslexec/wide/wide_opnoise_periodic_perlin_Vec3.cpp b/src/liboslexec/wide/wide_opnoise_periodic_perlin_Vec3.cpp index f101edd63..dee9f23ec 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_perlin_Vec3.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_perlin_Vec3.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -29,7 +29,7 @@ struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_periodic_perlin_deriv_Vec3.cpp b/src/liboslexec/wide/wide_opnoise_periodic_perlin_deriv_Vec3.cpp index 6285dddf0..f4e74de1d 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_perlin_deriv_Vec3.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_perlin_deriv_Vec3.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -39,7 +39,7 @@ struct BatchedCGPolicy } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_periodic_perlin_deriv_float.cpp b/src/liboslexec/wide/wide_opnoise_periodic_perlin_deriv_float.cpp index 67c48da43..47d97acee 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_perlin_deriv_float.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_perlin_deriv_float.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -29,7 +29,7 @@ struct BatchedCGPolicy } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_periodic_perlin_float.cpp b/src/liboslexec/wide/wide_opnoise_periodic_perlin_float.cpp index 79b252bcd..d93623495 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_perlin_float.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_perlin_float.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -29,7 +29,7 @@ struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_periodic_uperlin_Vec3.cpp b/src/liboslexec/wide/wide_opnoise_periodic_uperlin_Vec3.cpp index de241ec5a..f05769add 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_uperlin_Vec3.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_uperlin_Vec3.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -29,7 +29,7 @@ struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and diff --git a/src/liboslexec/wide/wide_opnoise_periodic_uperlin_deriv_Vec3.cpp b/src/liboslexec/wide/wide_opnoise_periodic_uperlin_deriv_Vec3.cpp index b487e6e1c..1c9890544 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_uperlin_deriv_Vec3.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_uperlin_deriv_Vec3.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -39,7 +39,7 @@ struct BatchedCGPolicy } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_periodic_uperlin_deriv_float.cpp b/src/liboslexec/wide/wide_opnoise_periodic_uperlin_deriv_float.cpp index fe9c23ee1..5cfc3bfb2 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_uperlin_deriv_float.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_uperlin_deriv_float.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -29,7 +29,7 @@ struct BatchedCGPolicy } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and diff --git a/src/liboslexec/wide/wide_opnoise_periodic_uperlin_float.cpp b/src/liboslexec/wide/wide_opnoise_periodic_uperlin_float.cpp index d2bf6bd9f..2abc451b6 100644 --- a/src/liboslexec/wide/wide_opnoise_periodic_uperlin_float.cpp +++ b/src/liboslexec/wide/wide_opnoise_periodic_uperlin_float.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -29,7 +29,7 @@ struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and diff --git a/src/liboslexec/wide/wide_opnoise_perlin_Vec3.cpp b/src/liboslexec/wide/wide_opnoise_perlin_Vec3.cpp index c176e5ff0..6ab10134c 100644 --- a/src/liboslexec/wide/wide_opnoise_perlin_Vec3.cpp +++ b/src/liboslexec/wide/wide_opnoise_perlin_Vec3.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -27,7 +27,7 @@ template<> struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_perlin_deriv_Vec3.cpp b/src/liboslexec/wide/wide_opnoise_perlin_deriv_Vec3.cpp index b2c3ed62e..063ff31ff 100644 --- a/src/liboslexec/wide/wide_opnoise_perlin_deriv_Vec3.cpp +++ b/src/liboslexec/wide/wide_opnoise_perlin_deriv_Vec3.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -37,7 +37,7 @@ template<> struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and diff --git a/src/liboslexec/wide/wide_opnoise_perlin_deriv_float.cpp b/src/liboslexec/wide/wide_opnoise_perlin_deriv_float.cpp index 9bde837e5..d1f9cc38b 100644 --- a/src/liboslexec/wide/wide_opnoise_perlin_deriv_float.cpp +++ b/src/liboslexec/wide/wide_opnoise_perlin_deriv_float.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -27,7 +27,7 @@ template<> struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_perlin_float.cpp b/src/liboslexec/wide/wide_opnoise_perlin_float.cpp index f2de314b8..8663cc586 100644 --- a/src/liboslexec/wide/wide_opnoise_perlin_float.cpp +++ b/src/liboslexec/wide/wide_opnoise_perlin_float.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -27,7 +27,7 @@ template<> struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_uperlin_Vec3.cpp b/src/liboslexec/wide/wide_opnoise_uperlin_Vec3.cpp index 586fecc7b..a9933a668 100644 --- a/src/liboslexec/wide/wide_opnoise_uperlin_Vec3.cpp +++ b/src/liboslexec/wide/wide_opnoise_uperlin_Vec3.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -27,7 +27,7 @@ template<> struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and diff --git a/src/liboslexec/wide/wide_opnoise_uperlin_deriv_Vec3.cpp b/src/liboslexec/wide/wide_opnoise_uperlin_deriv_Vec3.cpp index 56597c0f1..04d9c8f72 100644 --- a/src/liboslexec/wide/wide_opnoise_uperlin_deriv_Vec3.cpp +++ b/src/liboslexec/wide/wide_opnoise_uperlin_deriv_Vec3.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -37,7 +37,7 @@ template<> struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_opnoise_uperlin_deriv_float.cpp b/src/liboslexec/wide/wide_opnoise_uperlin_deriv_float.cpp index 2f8f00c61..ee45adf32 100644 --- a/src/liboslexec/wide/wide_opnoise_uperlin_deriv_float.cpp +++ b/src/liboslexec/wide/wide_opnoise_uperlin_deriv_float.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -27,7 +27,7 @@ template<> struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and diff --git a/src/liboslexec/wide/wide_opnoise_uperlin_float.cpp b/src/liboslexec/wide/wide_opnoise_uperlin_float.cpp index 0c4838fdc..0e0cba5fb 100644 --- a/src/liboslexec/wide/wide_opnoise_uperlin_float.cpp +++ b/src/liboslexec/wide/wide_opnoise_uperlin_float.cpp @@ -11,7 +11,7 @@ #endif #include "batched_cg_policy.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { namespace { @@ -27,7 +27,7 @@ template<> struct BatchedCGPolicy { } // namespace } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // To improve parallel compile times, split noise with float results and // Vec3 results into different cpp files diff --git a/src/liboslexec/wide/wide_oppointcloud.cpp b/src/liboslexec/wide/wide_oppointcloud.cpp index 1ed34138b..86d817ed3 100644 --- a/src/liboslexec/wide/wide_oppointcloud.cpp +++ b/src/liboslexec/wide/wide_oppointcloud.cpp @@ -21,7 +21,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -597,4 +597,4 @@ __OSL_MASKED_OP(pointcloud_write)(BatchedShaderGlobals* bsg, } } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslexec/wide/wide_opspline.cpp b/src/liboslexec/wide/wide_opspline.cpp index 0b77b9cb2..c9580974f 100644 --- a/src/liboslexec/wide/wide_opspline.cpp +++ b/src/liboslexec/wide/wide_opspline.cpp @@ -22,7 +22,7 @@ #include "splineimpl.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -987,6 +987,6 @@ __OSL_MASKED_OP3(splineinverse, Wdf, f, Wdf)(void* wout_, const char* spline_, } } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_opstring.cpp b/src/liboslexec/wide/wide_opstring.cpp index b08474e5e..12d2725d8 100644 --- a/src/liboslexec/wide/wide_opstring.cpp +++ b/src/liboslexec/wide/wide_opstring.cpp @@ -22,7 +22,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -531,6 +531,6 @@ __OSL_MASKED_OP(split)(void* wresults, } // end namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_optest_float.cpp b/src/liboslexec/wide/wide_optest_float.cpp index d36b07386..85b09adc0 100644 --- a/src/liboslexec/wide/wide_optest_float.cpp +++ b/src/liboslexec/wide/wide_optest_float.cpp @@ -18,7 +18,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -37,6 +37,6 @@ OSL_USING_DATA_WIDTH(__OSL_WIDTH) } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_optexture.cpp b/src/liboslexec/wide/wide_optexture.cpp index 58fde2c20..8278f0295 100644 --- a/src/liboslexec/wide/wide_optexture.cpp +++ b/src/liboslexec/wide/wide_optexture.cpp @@ -18,7 +18,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { @@ -930,6 +930,6 @@ __OSL_OP(get_textureinfo_uniform)(void* bsg_, ustring_pod name_, void* handle, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_optranscendental.cpp b/src/liboslexec/wide/wide_optranscendental.cpp index 93cacb0b6..65bad3760 100644 --- a/src/liboslexec/wide/wide_optranscendental.cpp +++ b/src/liboslexec/wide/wide_optranscendental.cpp @@ -24,7 +24,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -105,6 +105,6 @@ OSL_USING_DATA_WIDTH(__OSL_WIDTH) #include "wide_opunary_per_component_float_or_vector_xmacro.h" } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_optrigonometric.cpp b/src/liboslexec/wide/wide_optrigonometric.cpp index f1c041e7a..14dbb5798 100644 --- a/src/liboslexec/wide/wide_optrigonometric.cpp +++ b/src/liboslexec/wide/wide_optrigonometric.cpp @@ -25,7 +25,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -538,6 +538,6 @@ __OSL_MASKED_OP3(sincos, Wdv, Wdv, Wdv)(void* theta_, void* rsine_, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslexec/wide/wide_shadingsys.cpp b/src/liboslexec/wide/wide_shadingsys.cpp index 027bdcd4d..847705fb2 100644 --- a/src/liboslexec/wide/wide_shadingsys.cpp +++ b/src/liboslexec/wide/wide_shadingsys.cpp @@ -12,7 +12,7 @@ #include "oslexec_pvt.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { OSL_USING_DATA_WIDTH(__OSL_WIDTH) @@ -623,6 +623,6 @@ __OSL_MASKED_OP(raytype_name)(void* bsg_, void* r_, ustring* name_, } } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "undef_opname_macros.h" diff --git a/src/liboslnoise/gabornoise.cpp b/src/liboslnoise/gabornoise.cpp index d589e6c48..77c753de2 100644 --- a/src/liboslnoise/gabornoise.cpp +++ b/src/liboslnoise/gabornoise.cpp @@ -6,7 +6,7 @@ #include "gabornoise.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -415,4 +415,4 @@ pgabor3(const Dual2& P, const Vec3& Pperiod, const NoiseParams* opt) }; // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslnoise/gabornoise.h b/src/liboslnoise/gabornoise.h index ce1bc1b03..f078dfb41 100644 --- a/src/liboslnoise/gabornoise.h +++ b/src/liboslnoise/gabornoise.h @@ -12,7 +12,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -232,4 +232,4 @@ floor(const Dual2& vd) } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslnoise/sfm_gabornoise.h b/src/liboslnoise/sfm_gabornoise.h index ac44708dc..3d3cc17ce 100644 --- a/src/liboslnoise/sfm_gabornoise.h +++ b/src/liboslnoise/sfm_gabornoise.h @@ -7,7 +7,7 @@ #include "gabornoise.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { @@ -672,4 +672,4 @@ scalar_pgabor3(const Dual2& P, const Vec3& Pperiod, } // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslnoise/simplexnoise.cpp b/src/liboslnoise/simplexnoise.cpp index 51a820bb4..d00e64169 100644 --- a/src/liboslnoise/simplexnoise.cpp +++ b/src/liboslnoise/simplexnoise.cpp @@ -50,7 +50,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -745,4 +745,4 @@ simplexnoise4(float x, float y, float z, float w, int seed, float* dnoise_dx, } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslnoise/wide/wide_gabor3_xmacro.h b/src/liboslnoise/wide/wide_gabor3_xmacro.h index 70aa38851..585e5c768 100644 --- a/src/liboslnoise/wide/wide_gabor3_xmacro.h +++ b/src/liboslnoise/wide/wide_gabor3_xmacro.h @@ -26,7 +26,7 @@ #include "wide_gabornoise.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { @@ -68,4 +68,4 @@ wide_pgabor3<__OSL_XMACRO_ANISOTROPIC, __OSL_XMACRO_FILTER_POLICY>( }; // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslnoise/wide/wide_gabor_xmacro.h b/src/liboslnoise/wide/wide_gabor_xmacro.h index 8746ce247..9f23f8cdd 100644 --- a/src/liboslnoise/wide/wide_gabor_xmacro.h +++ b/src/liboslnoise/wide/wide_gabor_xmacro.h @@ -26,7 +26,7 @@ #include "wide_gabornoise.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { @@ -67,4 +67,4 @@ wide_pgabor<__OSL_XMACRO_ANISOTROPIC, __OSL_XMACRO_FILTER_POLICY>( Block* opt_varying_direction); }; // namespace __OSL_WIDE_PVT -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslnoise/wide/wide_gabornoise.h b/src/liboslnoise/wide/wide_gabornoise.h index 199235e61..64946449b 100644 --- a/src/liboslnoise/wide/wide_gabornoise.h +++ b/src/liboslnoise/wide/wide_gabornoise.h @@ -25,7 +25,7 @@ } \ Wide wDirection(*opt_varying_direction); -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace __OSL_WIDE_PVT { @@ -382,4 +382,4 @@ wide_pgabor3(Masked> wResult, Wide> wP, #undef __OSL_SETUP_WIDE_DIRECTION -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/liboslquery/oslquery.cpp b/src/liboslquery/oslquery.cpp index 4cff26fc3..1ea3effae 100644 --- a/src/liboslquery/oslquery.cpp +++ b/src/liboslquery/oslquery.cpp @@ -19,7 +19,7 @@ namespace Strutil = OIIO::Strutil; using OIIO::string_view; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { @@ -392,4 +392,4 @@ OSLQuery::open_bytecode(string_view buffer) return ok; } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/osl.imageio/oslinput.cpp b/src/osl.imageio/oslinput.cpp index 1a0d65120..0f5a3f106 100644 --- a/src/osl.imageio/oslinput.cpp +++ b/src/osl.imageio/oslinput.cpp @@ -22,7 +22,7 @@ using namespace OIIO; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN /// OSLInput is an ImageInput that behaves as if it's reading an image, @@ -701,4 +701,4 @@ OSLInput::read_native_tile(int subimage, int miplevel, int x, int y, int z, -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/osltoy/osltoyapp.cpp b/src/osltoy/osltoyapp.cpp index c628d67fa..cc4f913d3 100644 --- a/src/osltoy/osltoyapp.cpp +++ b/src/osltoy/osltoyapp.cpp @@ -55,7 +55,7 @@ #include "qtutils.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN using namespace QtUtils; class ValueSlider final : public QSlider { @@ -1563,4 +1563,4 @@ OSLToyMainWindow::mousePressEvent(QMouseEvent* event) -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/osltoy/osltoyapp.h b/src/osltoy/osltoyapp.h index 14a0d3f40..b8848c48d 100644 --- a/src/osltoy/osltoyapp.h +++ b/src/osltoy/osltoyapp.h @@ -35,7 +35,7 @@ class QSplitter; class QTextEdit; class CodeEditor; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN class ShadingSystem; class RendererServices; @@ -232,4 +232,4 @@ private slots: -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/osltoy/osltoyrenderer.cpp b/src/osltoy/osltoyrenderer.cpp index 968021d48..48d55855c 100644 --- a/src/osltoy/osltoyrenderer.cpp +++ b/src/osltoy/osltoyrenderer.cpp @@ -37,7 +37,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN static constexpr TypeDesc TypeFloatArray2(TypeDesc::FLOAT, 2); static constexpr TypeDesc TypeFloatArray4(TypeDesc::FLOAT, 4); @@ -554,4 +554,4 @@ OSLToyRenderer::get_camera_screen_window(ShaderGlobals* /*sg*/, bool derivs, } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/osltoy/osltoyrenderer.h b/src/osltoy/osltoyrenderer.h index 963703891..5a6e52790 100644 --- a/src/osltoy/osltoyrenderer.h +++ b/src/osltoy/osltoyrenderer.h @@ -15,7 +15,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN @@ -154,4 +154,4 @@ class OSLToyRenderer final : public RendererServices { ustringhash name, void* val); }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/osltoy/qtutils.h b/src/osltoy/qtutils.h index 709a7754c..28161a611 100644 --- a/src/osltoy/qtutils.h +++ b/src/osltoy/qtutils.h @@ -33,7 +33,7 @@ OIIO_NAMESPACE_END -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace QtUtils { @@ -193,4 +193,4 @@ class DoubleSpinBox final : public QDoubleSpinBox { } // end namespace QtUtils -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/background.h b/src/testrender/background.h index e6daa28af..53e0a99d8 100644 --- a/src/testrender/background.h +++ b/src/testrender/background.h @@ -8,7 +8,7 @@ #include #include // upper_bound -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // std::upper_bound is not supported in device code, so define a version of it here. @@ -273,4 +273,4 @@ struct Background { float invjacobian = 0.0f; }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/bvh.cpp b/src/testrender/bvh.cpp index 01f599ac4..9b6420f48 100644 --- a/src/testrender/bvh.cpp +++ b/src/testrender/bvh.cpp @@ -8,7 +8,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN using Box3 = Imath::Box3f; @@ -370,4 +370,4 @@ Scene::prepare(OIIO::ErrorHandler& errhandler) bvh = build_bvh(verts, triangles, errhandler); } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/bvh.h b/src/testrender/bvh.h index 0df14b41e..3d8071447 100644 --- a/src/testrender/bvh.h +++ b/src/testrender/bvh.h @@ -7,7 +7,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN struct BVHNode { float bounds[6]; @@ -41,4 +41,4 @@ struct BVH { std::unique_ptr indices; }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/cuda/optix_raytracer.cu b/src/testrender/cuda/optix_raytracer.cu index 513dca223..a2880c730 100644 --- a/src/testrender/cuda/optix_raytracer.cu +++ b/src/testrender/cuda/optix_raytracer.cu @@ -28,7 +28,7 @@ #define C3_TO_F3(c3) (*reinterpret_cast(&c3)) -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { __device__ CUdeviceptr s_color_system = 0; __device__ CUdeviceptr osl_printf_buffer_start = 0; @@ -39,7 +39,7 @@ __device__ uint64_t num_named_xforms = 0; __device__ CUdeviceptr xform_name_buffer = 0; __device__ CUdeviceptr xform_buffer = 0; } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END extern "C" { diff --git a/src/testrender/cuda/optix_raytracer.h b/src/testrender/cuda/optix_raytracer.h index 34a8eef90..9f2788645 100644 --- a/src/testrender/cuda/optix_raytracer.h +++ b/src/testrender/cuda/optix_raytracer.h @@ -35,7 +35,7 @@ struct Payload { } }; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN struct SimpleRaytracer { using ShadingContext = ShadingContextCUDA; @@ -69,6 +69,6 @@ struct SimpleRaytracer { ShadingContext* ctx = nullptr); }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #endif // #ifdef __CUDACC__ diff --git a/src/testrender/cuda/rend_lib.cu b/src/testrender/cuda/rend_lib.cu index fb51605e9..4b36ab6be 100644 --- a/src/testrender/cuda/rend_lib.cu +++ b/src/testrender/cuda/rend_lib.cu @@ -17,7 +17,7 @@ memcpy(__builtin_assume_aligned(dst, alignment), \ __builtin_assume_aligned(src, alignment), size); -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { extern __device__ CUdeviceptr s_color_system; extern __device__ CUdeviceptr osl_printf_buffer_start; @@ -28,7 +28,7 @@ extern __device__ uint64_t num_named_xforms; extern __device__ CUdeviceptr xform_name_buffer; extern __device__ CUdeviceptr xform_buffer; } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // Taken from the SimplePool class diff --git a/src/testrender/cuda/rend_lib.h b/src/testrender/cuda/rend_lib.h index d6aea2750..40c848799 100644 --- a/src/testrender/cuda/rend_lib.h +++ b/src/testrender/cuda/rend_lib.h @@ -12,7 +12,7 @@ #include "../raytracer.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // TODO: update types from char * to ustringhash or ustringhash_pod @@ -30,7 +30,7 @@ extern __device__ CUdeviceptr xform_name_buffer; extern __device__ CUdeviceptr xform_buffer; } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END namespace { // anonymous namespace diff --git a/src/testrender/optics.h b/src/testrender/optics.h index a266eef2e..d413a1824 100644 --- a/src/testrender/optics.h +++ b/src/testrender/optics.h @@ -7,7 +7,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN static inline OSL_HOSTDEVICE float fresnel_dielectric(float cosi, float eta) @@ -108,4 +108,4 @@ fresnel_generalized_schlick(float cos_theta, Color3 F0, Color3 F90, return OIIO::lerp(F0, F90, m); } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/optixraytracer.cpp b/src/testrender/optixraytracer.cpp index ab5aff9d1..b35ef3a65 100644 --- a/src/testrender/optixraytracer.cpp +++ b/src/testrender/optixraytracer.cpp @@ -34,7 +34,7 @@ const auto optixModuleCreateFn = optixModuleCreate; #endif -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #define CUDA_CHECK(call) \ @@ -1266,4 +1266,4 @@ OptixRaytracer::clear() } } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/optixraytracer.h b/src/testrender/optixraytracer.h index b15a3147d..420c8de03 100644 --- a/src/testrender/optixraytracer.h +++ b/src/testrender/optixraytracer.h @@ -14,7 +14,7 @@ #include "render_params.h" #include "simpleraytracer.h" -OSL_NAMESPACE_ENTER; +OSL_NAMESPACE_BEGIN; class OptixRaytracer final : public SimpleRaytracer { @@ -147,4 +147,4 @@ class OptixRaytracer final : public SimpleRaytracer { }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/raytracer.h b/src/testrender/raytracer.h index ebf6c94c4..e700dbcf3 100644 --- a/src/testrender/raytracer.h +++ b/src/testrender/raytracer.h @@ -31,7 +31,7 @@ // See the source files in the cuda subdirectory for the implementations. -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN class OptixRenderer; // FIXME -- should not be here @@ -333,4 +333,4 @@ struct Scene { #endif }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/sampling.h b/src/testrender/sampling.h index a8484617f..69ec6909a 100644 --- a/src/testrender/sampling.h +++ b/src/testrender/sampling.h @@ -10,7 +10,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN struct TangentFrame { // build frame from unit normal @@ -292,4 +292,4 @@ struct Sampler { }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/scene.cpp b/src/testrender/scene.cpp index 4bbbecfa0..7eb6c9c29 100644 --- a/src/testrender/scene.cpp +++ b/src/testrender/scene.cpp @@ -9,7 +9,7 @@ #include #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN void Scene::add_model(const std::string& filename, const ShaderMap& shadermap, @@ -267,4 +267,4 @@ Scene::add_quad(const Vec3& p, const Vec3& ex, const Vec3& ey, int shaderID, } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/shading.cpp b/src/testrender/shading.cpp index 641e5abea..36a779c1e 100644 --- a/src/testrender/shading.cpp +++ b/src/testrender/shading.cpp @@ -39,7 +39,7 @@ is_black(const Color3& c) } // anonymous namespace -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #ifndef __CUDACC__ @@ -231,7 +231,7 @@ register_closures(OSL::ShadingSystem* shadingsys) } #endif // ifndef __CUDACC__ -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END namespace { // anonymous namespace @@ -1846,7 +1846,7 @@ process_bsdf_closure(const ShaderGlobalsType& sg, ShadingResult& result, } // anonymous namespace -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN OSL_HOSTDEVICE void process_closure(const ShaderGlobalsType& sg, ShadingResult& result, @@ -2211,4 +2211,4 @@ CompositeBSDF::eval(const BSDF* bsdf, const Vec3& wo, const Vec3& wi) const } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/shading.h b/src/testrender/shading.h index 729cd47eb..ba3092152 100644 --- a/src/testrender/shading.h +++ b/src/testrender/shading.h @@ -14,7 +14,7 @@ #include "sampling.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN enum ClosureIDs { @@ -432,4 +432,4 @@ process_closure(const OSL::ShaderGlobals& sg, ShadingResult& result, OSL_HOSTDEVICE Vec3 process_background_closure(const ClosureColor* Ci); -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/simpleraytracer.cpp b/src/testrender/simpleraytracer.cpp index 7ad197547..a09ca55a7 100644 --- a/src/testrender/simpleraytracer.cpp +++ b/src/testrender/simpleraytracer.cpp @@ -44,7 +44,7 @@ namespace Hashes { using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #ifndef __CUDACC__ @@ -1298,4 +1298,4 @@ SimpleRaytracer::clear() #endif // #ifndef __CUDACC__ -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testrender/simpleraytracer.h b/src/testrender/simpleraytracer.h index 09b31380c..c4c1ffe2b 100644 --- a/src/testrender/simpleraytracer.h +++ b/src/testrender/simpleraytracer.h @@ -17,7 +17,7 @@ #include "sampling.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN class SimpleRaytracer : public RendererServices { @@ -194,4 +194,4 @@ class SimpleRaytracer : public RendererServices { friend class ErrorHandler; }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testshade/batched_simplerend.cpp b/src/testshade/batched_simplerend.cpp index 9995234a5..403c80894 100644 --- a/src/testshade/batched_simplerend.cpp +++ b/src/testshade/batched_simplerend.cpp @@ -7,7 +7,7 @@ using namespace OSL; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN struct UniqueStringCache { UniqueStringCache() @@ -1004,4 +1004,4 @@ template class BatchedSimpleRenderer<8>; template class BatchedSimpleRenderer<4>; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testshade/batched_simplerend.h b/src/testshade/batched_simplerend.h index e740dfbe0..e6be311dd 100644 --- a/src/testshade/batched_simplerend.h +++ b/src/testshade/batched_simplerend.h @@ -15,7 +15,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN class SimpleRenderer; @@ -163,4 +163,4 @@ class BatchedSimpleRenderer : public BatchedRendererServices { RefOrMaskedT data); }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testshade/cuda/optix_grid_renderer.cu b/src/testshade/cuda/optix_grid_renderer.cu index 8d569627a..f3657efcd 100644 --- a/src/testshade/cuda/optix_grid_renderer.cu +++ b/src/testshade/cuda/optix_grid_renderer.cu @@ -14,7 +14,7 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { __device__ CUdeviceptr s_color_system = 0; __device__ CUdeviceptr osl_printf_buffer_start = 0; @@ -25,7 +25,7 @@ __device__ uint64_t num_named_xforms = 0; __device__ CUdeviceptr xform_name_buffer = 0; __device__ CUdeviceptr xform_buffer = 0; } // namespace pvt -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END extern "C" { diff --git a/src/testshade/optixgridrender.cpp b/src/testshade/optixgridrender.cpp index 877a5691f..196b79443 100644 --- a/src/testshade/optixgridrender.cpp +++ b/src/testshade/optixgridrender.cpp @@ -36,7 +36,7 @@ const auto optixModuleCreateFn = optixModuleCreate; using namespace testshade; -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN #define CUDA_CHECK(call) \ @@ -1257,4 +1257,4 @@ OptixGridRenderer::register_inline_functions() // clang-format on } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testshade/optixgridrender.h b/src/testshade/optixgridrender.h index 9cb2719fd..4aa29a7b6 100644 --- a/src/testshade/optixgridrender.h +++ b/src/testshade/optixgridrender.h @@ -14,7 +14,7 @@ #include "simplerend.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN class OptixGridRenderer final : public SimpleRenderer { @@ -110,4 +110,4 @@ class OptixGridRenderer final : public SimpleRenderer { -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testshade/simplerend.cpp b/src/testshade/simplerend.cpp index 3582c9cc4..7e67ab063 100644 --- a/src/testshade/simplerend.cpp +++ b/src/testshade/simplerend.cpp @@ -109,7 +109,7 @@ struct ParameterTestParams { } // anonymous namespace -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN static TypeDesc TypeFloatArray2(TypeDesc::FLOAT, 2); static TypeDesc TypeFloatArray4(TypeDesc::FLOAT, 4); @@ -1123,4 +1123,4 @@ SimpleRenderer::filefmt(OSL::ShaderGlobals* sg, OSL::ustringhash filename_hash, } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/src/testshade/simplerend.h b/src/testshade/simplerend.h index 8ebe1c1fc..bb6a0e426 100644 --- a/src/testshade/simplerend.h +++ b/src/testshade/simplerend.h @@ -20,7 +20,7 @@ #include "render_state.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN void @@ -253,4 +253,4 @@ class SimpleRenderer : public RendererServices { ustringhash name, void* val); }; -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END diff --git a/testsuite/example-cuda/rend_lib.cu b/testsuite/example-cuda/rend_lib.cu index 8ac745971..01e75bb37 100644 --- a/testsuite/example-cuda/rend_lib.cu +++ b/testsuite/example-cuda/rend_lib.cu @@ -8,11 +8,11 @@ #include "rend_lib.h" -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN namespace pvt { extern __device__ char* s_color_system; } -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END // Taken from the SimplePool class __device__ static inline size_t diff --git a/testsuite/example-cuda/rend_lib.h b/testsuite/example-cuda/rend_lib.h index 0b5e43b7a..50378e707 100644 --- a/testsuite/example-cuda/rend_lib.h +++ b/testsuite/example-cuda/rend_lib.h @@ -6,17 +6,16 @@ #include -OSL_NAMESPACE_ENTER +OSL_NAMESPACE_BEGIN // Create an OptiX variable for each of the 'standard' strings declared in // . namespace DeviceStrings { -#define STRDECL(str, var_name) \ - extern __device__ OSL_NAMESPACE::DeviceString var_name; +#define STRDECL(str, var_name) extern __device__ OSL::DeviceString var_name; #include #undef STRDECL } // namespace DeviceStrings -OSL_NAMESPACE_EXIT +OSL_NAMESPACE_END #include "closures.h"