Skip to content

Commit

Permalink
clang-format: the very last piece of the puzzle (#1555)
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz authored Aug 23, 2022
1 parent 9f8e92c commit 5be7c6b
Show file tree
Hide file tree
Showing 6 changed files with 2,384 additions and 2,143 deletions.
2 changes: 1 addition & 1 deletion src/cmake/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ endif ()
# is being built as a subproject.
if (PROJECT_IS_TOP_LEVEL)
set (CLANG_FORMAT_EXE_HINT "" CACHE PATH "clang-format executable's directory (will search if not specified")
set (CLANG_FORMAT_INCLUDES # "src/*.cpp"
set (CLANG_FORMAT_INCLUDES "src/*.cpp"
"src/*.h"
"src/*.cu"
"src/include/*.h"
Expand Down
3 changes: 1 addition & 2 deletions src/liboslexec/backendllvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,7 @@ BackendLLVM::llvm_load_value(llvm::Value* ptr, const TypeSpec& type, int deriv,
// also to avoid ugliness with function signatures differing between CPU
// and GPU. Maybe some day we'll use the hash representation on both
// sides?
if (type.is_string()
&& ll.ustring_rep() != LLVM_Util::UstringRep::charptr)
if (type.is_string() && ll.ustring_rep() != LLVM_Util::UstringRep::charptr)
result = ll.int_to_ptr_cast(result);

return result;
Expand Down
5 changes: 3 additions & 2 deletions src/liboslexec/closure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

#include <OpenImageIO/sysutil.h>

#include <OSL/oslconfig.h>
#include <OSL/oslclosure.h>
#include <OSL/genclosure.h>
#include <OSL/oslclosure.h>
#include <OSL/oslconfig.h>

#include "oslexec_pvt.h"


Expand Down
3 changes: 3 additions & 0 deletions src/liboslexec/llvm_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ osl_sincos_dvdvdv(void* x_, void* s_, void* c_)
#endif
}

// clang-format off
#if OSL_FAST_MATH
MAKE_UNARY_PERCOMPONENT_OP (log , OIIO::fast_log , fast_log)
MAKE_UNARY_PERCOMPONENT_OP (log2 , OIIO::fast_log2 , fast_log2)
Expand Down Expand Up @@ -529,6 +530,8 @@ MAKE_UNARY_PERCOMPONENT_OP (cbrt , cbrtf , cbrt)

MAKE_UNARY_PERCOMPONENT_OP (sqrt , OIIO::safe_sqrt , sqrt)
MAKE_UNARY_PERCOMPONENT_OP (inversesqrt, OIIO::safe_inversesqrt, inversesqrt)
// clang-format on


OSL_SHADEOP float
osl_logb_ff(float x)
Expand Down
Loading

0 comments on commit 5be7c6b

Please sign in to comment.