Dalai Felinto
a57063a432
Merge remote-tracking branch 'origin/master' into blender2.8
2018-02-01 13:13:44 -02:00
Ray Molenkamp
7e928c3bbc
Fix: msvc build error with bli_fileops.h
...
bli_fileops.h was using uint64_t without including the proper header.
issue triggered by rBb0af44fa4d7a2e134b315c49a4fbdf573f781004
2018-02-01 07:59:52 -07:00
Campbell Barton
e4c9cf7088
Merge branch 'master' into blender2.8
2018-02-01 14:02:33 +11:00
Campbell Barton
078e012cd9
Cleanup: rename BLI_*_empty() -> clear()
...
Consistent with other BLI API's
2018-02-01 13:40:53 +11:00
Campbell Barton
fc1fd2704a
Merge branch 'master' into blender2.8
2018-01-23 11:45:39 +11:00
Dalai Felinto
0f69026b1c
Fix windows building (log10)
...
Error: math_base_inline.c(402): error C2668: 'log10' : ambiguous call to
overloaded function
2018-01-22 11:37:19 -02:00
Germano
790025c01e
Merge branch 'master' into blender2.8
...
# Conflicts:
# intern/cycles/blender/blender_mesh.cpp
# source/blender/editors/screen/screen_ops.c
# source/blender/editors/space_view3d/drawobject.c
2018-01-21 18:45:47 -02:00
Campbell Barton
e767d21b74
Cleanup: BLI_kdopbvh avoid negative array access
...
It's harder to reason about array access with negative indices.
2018-01-21 20:17:29 +11:00
Campbell Barton
a7dc5e12ac
Cleanup: style
2018-01-21 11:41:52 +11:00
Dalai Felinto
244fb3ebe0
Merge remote-tracking branch 'origin/master' into blender2.8
2018-01-19 17:06:32 -02:00
Dalai Felinto
431d5772bb
Fixup for integer digits commit
2018-01-19 17:04:19 -02:00
Dalai Felinto
4d0bb7de64
Merge remote-tracking branch 'origin/master' into blender2.8
2018-01-19 17:01:48 -02:00
Dalai Felinto
075def8fbd
Util function to determine number of digits from an integer
2018-01-19 16:54:07 -02:00
Campbell Barton
08fe885d06
Merge branch 'master' into blender2.8
2018-01-19 21:47:57 +11:00
Campbell Barton
889321e22b
Cleanup: reaname LINKLIST_FOREACH -> LISTBASE
...
LinkList's are a different API, no need to confuse things.
2018-01-19 21:39:18 +11:00
Campbell Barton
c850320b35
Merge branch 'master' into blender2.8
2018-01-19 17:21:15 +11:00
Campbell Barton
7a24e0d175
Cleanup: typos
2018-01-19 15:34:54 +11:00
Campbell Barton
58be6d282d
Merge branch 'master' into blender2.8
2018-01-14 17:29:38 +11:00
Campbell Barton
02a01b3505
Cleanup: BLI_ghash
...
Improve hashsizes comment too.
2018-01-14 17:28:15 +11:00
Bastien Montagne
8bff6f319a
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/blenkernel/intern/multires.c
2018-01-11 20:19:18 +01:00
Bastien Montagne
c253fe5e87
Cleanup typo in comment.
2018-01-11 17:55:58 +01:00
Sergey Sharybin
5d38c14116
Merge branch 'master' into blender2.8
2018-01-10 13:22:03 +01:00
Sergey Sharybin
5614193745
Task scheduler: Use restrict pointer qualifier
...
Those pointers are never to be aliased, so let's be explicit about this and hope
compiler does save some CPU ticks.
2018-01-10 12:49:51 +01:00
Sergey Sharybin
518c65460e
Task scheduler: Use more const qualifiers
2018-01-10 12:27:43 +01:00
Sergey Sharybin
f0610563ee
math utils: Add size_t version of min and max functions
2018-01-10 11:06:44 +01:00
Campbell Barton
2b56faebe5
Merge branch 'master' into blender2.8
2018-01-10 19:58:05 +11:00
Campbell Barton
18f53d8822
Cleanup: comment block alignment
2018-01-10 19:57:02 +11:00
Campbell Barton
5ff33ecdf0
Merge branch 'master' into blender2.8
2018-01-10 14:01:09 +11:00
Sergey Sharybin
5fe87a0a8c
Task scheduler: Use single thread branch when range fits into single chunk
2018-01-09 18:10:47 +01:00
Sergey Sharybin
4a3b303bb0
Task scheduler: Fix wrong tasks calculation when chunk size is too big
2018-01-09 18:07:34 +01:00
Sergey Sharybin
6deb908a5c
Merge branch 'master' into blender2.8
2018-01-09 16:15:33 +01:00
Sergey Sharybin
932d448ae0
Task scheduler: Use const qualifiers in parallel range
2018-01-09 16:09:33 +01:00
Sergey Sharybin
8cffb0a141
Task scheduler: Avoid over-allocation of tasks for parallel ranges
...
This seems to only cause extra rthreading overhead on systems with 10s of
threads, without actually solving anything.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
c4e42d70a4
Task scheduler: Add minimum number of iterations per thread in parallel range
...
The idea is to support following: allow doing parallel for on a small range,
each iteration of which takes lots of compute power, but limit such range to
a subset of threads.
For example, on a machine with 44 threads we can occupy 4 threads to handle
range of 64 elements, 16 elements per thread, where each block of 16 elements
is very complex to compute.
The idea should be to use this setting instead of global use_threading flag,
which is only based on size of array. Proper use of the new flag will improve
threadability.
This commit only contains internal task scheduler changes, this setting is not
used yet by any areas.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
3144f0573a
Task scheduler: Simplify parallel range function
...
Basically, split it up and avoid extra abstraction level.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
4c4a7e84c6
Task scheduler: Use single parallel range function with more flexible function
...
Now all the fine-tuning is happening using parallel range settings structure,
which avoid passing long lists of arguments, allows extend fine-tuning further,
avoid having lots of various functions which basically does the same thing.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
d2708b0f73
Task scheduler: Get rid of extended version of parallel range callback
...
Wrap all arguments into TLS type of argument. Avoids some branching and also
makes it easier to extend things in the future.
2018-01-09 16:09:33 +01:00
Campbell Barton
be40389165
Merge branch 'master' into blender2.8
2018-01-03 23:44:47 +11:00
Sergey Sharybin
6efd58dd3e
Task scheduler: Clarify why do we need an atomic add of 0
2017-12-22 16:37:25 +01:00
Sergey Sharybin
50f1c9a8af
Task scheduler: Start with suspended pool to avoid threading overhead on push
...
The idea is to avoid any threading overhead when we start pushing tasks in a
loop. Similarly to how we do it from the new dependency graph. Gives couple of
percent of speedup here, but also improves scalability.
2017-12-22 12:25:11 +01:00
Sergey Sharybin
a52452c043
Merge branch 'master' into blender2.8
2017-12-20 16:40:49 +01:00
Antonio Vazquez
94a3ee56c7
Fix MSVSC2017 error
...
The last compiler version needs this include
2017-12-20 10:23:12 +01:00
Campbell Barton
cfd1b48492
Merge branch 'master' into blender2.8
2017-12-19 14:15:19 +11:00
Campbell Barton
7a58ff928c
Math Lib: signed versions of quaternion angle
...
There was no simple way to get the shortest quaternion angle.
2017-12-19 14:03:29 +11:00
Sergey Sharybin
114013de0d
Merge branch 'master' into blender2.8
2017-12-15 17:24:28 +01:00
Sergey Sharybin
5e28b71457
math utils: Add utilities to scan bit and clear it
2017-12-15 16:54:28 +01:00
Sergey Sharybin
de9e5a0926
Math utils: Go away form naive code for highest_order_bit_uint
2017-12-15 16:54:28 +01:00
Sergey Sharybin
412de222f8
Math utils: Add bit scan operations
2017-12-15 16:54:28 +01:00
Sergey Sharybin
02ec0b53df
Math utils: Make it more clear what the functions are returning
2017-12-15 16:54:28 +01:00
Sergey Sharybin
2aa0f8a41b
Math utils: Cleanup, use _uint suffix for function which operates on uint
2017-12-15 16:54:28 +01:00