Age | Commit message (Collapse) | Author |
|
|
|
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
|
|
Apply Windowing on the Spherical Harmonics result. This would lead to
better results.
|
|
|
|
|
|
Usefull if you want to create char chains to contains hashes of a certain
type.
|
|
This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming
Things to note:
1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)
2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)
victor_cpu
msvc:3099.51
clang:2796.43
pavillon_barcelona_cpu
msvc:1872.05
clang:1827.72
koro_cpu
msvc:1097.58
clang:1006.51
fishy_cat_cpu
msvc:815.37
clang:722.2
classroom_cpu
msvc:1705.39
clang:1575.43
bmw27_cpu
msvc:552.38
clang:561.53
barbershop_interior_cpu
msvc:2134.93
clang:1922.33
3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.
4) X64 only currently, X86 builds but crashes on startup.
5) Tested with llvm/clang 6.0.0
6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration
7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.
8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.
9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D3304
|
|
While the warning can normally be disabled, we don't have have as much
control of warnings when macros are used.
|
|
|
|
This caused GCC 8.1 to crash at build time,
but was also not very nice use of macros.
|
|
Differential Revision: https://developer.blender.org/D3109
|
|
BLI_utildefines is quite large, defining many unrelated things.
Add BLI_assert to include in inline headers, so math defines don't
pull in too much.
|
|
Adapted from http://www.pixelbeat.org/programming/gcc/static_assert.html.
Note that this macro just discards error message, so error when building
is much less nice than with gcc's _Static_assert... But error log will
point to right place in code, so should still be OK.
|
|
This reverts commit d749320e3b10161430bc4cb7dd92edb63712bf8c.
It's possible the container struct is larger,
we could do sizeof checks that falls back to memmove
but rather avoid complicating things.
|
|
|
|
This was meant to be used for less general macros but was never used.
Rename BKE_BIT_TEST_SET to SET_FLAG_FROM_TEST
|
|
|
|
|
|
This allows to have different macro headers without them sharing
similar names to regular C modules.
|
|
So we can use in headers without pulling in many other defines.
|
|
It's becoming annoying to have public API dependent on build type
and everything. Let's just always have API defined and do stubs
in the function implementation instead.
|
|
|
|
Title actually tells it all, it is rather simple function which totally makes
sense to be inlined.
This gives up to 5% of speedup when updating scopes for a large image.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D1310
|
|
is filled of zero,
and an helper to ensure all memory of a given structure passed a given member is filled of zero.
|
|
|
|
|
|
|
|
|
|
It was unleashed with recent ghash commit and issue seems to
be the same as fixed in 69065b5b.
|
|
|
|
Handy since it keeps the type of the original.
|
|
Mighty M$VC never heard of 'strcasecmp' family of functions, it prefers its
own names, as usual...
|
|
|
|
UNUSED_VARS_NDEBUG.
This commit was proudly crafted by the Commit Rate Raising Committee!
|
|
vars as unused in non-debug builds.
Helps handling cleanly pure-debug variables.
|
|
|
|
Setting all values of a tuple is such a common operation that it deserves its own macro.
Also added Py_INCREF_RET to avoid confusing use of comma operator.
|
|
note, this is for C++ code which expects a cast, (will be added later)
also add a macro for nop-expressions (EXPR_NOP),
when we never want an expression to be evaluated, but it should still be valid.
|
|
|
|
need to use extern C for C++
|
|
Add BLI_system_backtrace()
|
|
Handy when used indirectly.
|
|
|
|
also minor cleanup
|
|
|
|
|
|
|
|
|
|
also make CHECK_TYPE_INLINE more strict
|
|
also replace __typeof -> typeof
|