Age | Commit message (Collapse) | Author |
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
|
|
If the user only needs insertion and removal from top, there is
no need to allocate and manage separate HeapNode objects: the
data can be stored directly in the main tree array.
This measured a 24% FPS increase on a ~50% heap-heavy workload.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3898
|
|
The index field of nodes is supposed to be its actual index, so
there is no need to read it in swap. On a 64-bit processor i and
j are already in registers, so this removes two memory reads.
In addition, cache the tree pointer, use branch hints, and
put the most frequently accessed 'value' field at 0 offset.
Produced a 20% FPS improvement for a 50% heap-heavy workload.
|
|
It is very commonly needed in loop conditions to check if
the items in the heap are good enough to continue.
|
|
Partially revert 41216d5ad4c722e2ad9f15c968af454fc7566d5e
Some of this code had comments to be left as is for readability,
or comment the code should be kept.
Other functions were only for debugging.
|
|
Continuation of https://developer.blender.org/D3802
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3808
|
|
|
|
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
(hint this isn't a simple getter).
See P611 to apply instead of manually resolving conflicts.
|
|
Also minor readability changes, avoid running both heap_up/down
gives minor speedup too.
|
|
|
|
|
|
Recent addition of 'reinsert' didn't match logic for ghash API.
Rename to BLI_heap_node_value_update,
also add BLI_heap_insert_or_update since it's a common operation.
|
|
Allows avoiding remove/insert calls.
|
|
|
|
|
|
|
|
- Since element size its known it's less work to do inline.
- In test with high-poly model, gave ~9% overall speedup for decimate modifier.
|
|
|
|
|
|
|
|
Edgehash was missing removal functions (remove, popkey, clear),
since it wasn't needed so far, but is based on same code as ghash which has them.
also add heap clear() method so we can reuse heaps.
(needed for upcoming fix).
|
|
|
|
|
|
|
|
|
|
place (pragmas were copied around).
also enable more strict warnings for BLF (which had some incorrect casts).
|
|
added an assert for incorrect use of BLI_heap_remove
|
|
paste errors), also remove BKE_script.h
|
|
|
|
enabling the new pragmas only when gcc >= 4.6
gcc 4.2.1 here (OSX)
|
|
|
|
common operation).
correct own recently added assert.
|
|
popmin incorrectly.
|
|
|
|
|
|
script.
|
|
|
|
|
|
|
|
- use unsigned ints only (where mixing signed/unsigned)
- turn heap_swap into an inline function, add SWAP_TVAL macro to swap values using a temp value as storage.
- added type checking SHIFT3/4 macros
also style cleanup for CTR_Map
|
|
- update face normals when triangulating.
- avoid divide by zero when interpolating customdata on a zero length edge.
- replace zero float comparisons with fabsf() < FLT_EPSILON to avoid numeric error.
also renamed BLI_heap_empty() --> BLI_heap_is_empty() so its obviously readonly function.
|
|
may be known in advance - it avoids re-allocing too much.
|
|
or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc
|