Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-25Cleanup: follow C++ type cast style guide in some filesJacques Lucke
https://wiki.blender.org/wiki/Style_Guide/C_Cpp#C.2B.2B_Type_Cast This was discussed in https://devtalk.blender.org/t/rfc-style-guide-for-type-casts-in-c-code/25907.
2022-07-27Fix: add missing returnJacques Lucke
It was correct but less efficient without this early return.
2022-07-07BLI: make some spans default constructibleJacques Lucke
`GSpan` and spans based on virtual arrays were not default constructible before, which made them hard to use sometimes. It's generally fine for spans to be empty. The main thing the keep in mind is that the type pointer in `GSpan` may be null now. Generally, code receiving spans as input can assume that the type is not-null, but sometimes that may be valid. The old #type() method that returned a reference to the type still exists. It asserts when the type is null.
2022-07-02BLI: improve span access to virtual arraysJacques Lucke
* Make the class names more consistent. * Implement missing move-constructors and assignment-operators.
2022-06-25BLI: improve support for trivial virtual arraysJacques Lucke
This commits reduces the number of function calls through function pointers in `blender::Any` when the stored type is trivial. Furthermore, this implements marks some classes as trivial, which we know are trivial but the compiler does not (the standard currently says that any class with a virtual destructor is non-trivial). Under some circumstances we know that final child classes are trivial though. This allows for some optimizations. Also see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1077r0.html.
2022-06-25BLI: improve check for common virtual array implementationsJacques Lucke
This reduces the amount of code, and improves performance a bit by doing more with less virtual method calls. Differential Revision: https://developer.blender.org/D15293
2022-06-19BLI: avoid unnecessary allocation when converting virtual arrayJacques Lucke
2022-05-31Functions: speedup preparing multi-function parametersJacques Lucke
My benchmark which spend most time preparing function parameters takes `250 ms` now, from `510 ms` before. This is mainly achieved by doing less unnecessary work and by giving the compiler more inlined code to optimize. * Reserve correct vector sizes and use unchecked `append` function. * Construct `GVArray` parameters directly in the vector, instead of moving/copying them in the vector afterwards. * Inline some constructors, because that allows the compiler understand what is happening, resulting in less code. This probably has negilible impact on the user experience currently, because there are other bottlenecks. Differential Revision: https://developer.blender.org/D15009
2022-04-25BLI: optimize constructing new virtual arrayJacques Lucke
Differential Revision: https://developer.blender.org/D14745
2022-04-24BLI: prioritize detecting single values higher than detecting spansJacques Lucke
In some contexts, single values can be handled more efficiently than spans.
2022-04-07BLI: add missing materialize methods for virtual arraysJacques Lucke
This does two things: * Introduce new `materialize_compressed` methods. Those are used when the dst array should not have any gaps. * Add materialize methods in various classes where they were missing (and therefore caused overhead, because slower fallbacks had to be used).
2022-03-19BLI: move generic data structures to blenlibJacques Lucke
This is a follow up to rB2252bc6a5527cd7360d1ccfe7a2d1bc640a8dfa6.