Campbell Barton
3e3efae7e9
Viewport Text Drawing: replace single allocs with a memarena
...
- pass label strlen since in many cases its already known.
- use single linked list for cached text drawing.
- add BLI_link_utils.h for single linked list macros.
own tests give approx 22% overall speedup.
2014-04-17 16:04:28 +10:00
Campbell Barton
1b9db9911d
Code cleanup: use bools
...
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
2014-04-17 16:04:28 +10:00
Campbell Barton
b3972aeea0
Math Lib: optimize axis_dominant_v3_to_m3, approx 6x speedup
...
build the matrix directly rather then calculating with axis/angle
also remove unused function calc_poly_plane
2014-04-16 21:07:28 +10:00
Campbell Barton
233dac1494
Math Lib: increase epsilon for ortho_basis_v3v3_v3
...
passing in a unit length vector wouldn't always compute unit length vectors because the epsilon tested was too small.
2014-04-16 21:07:28 +10:00
Campbell Barton
28a829893c
Math Lib: avoid having to pass a pre-calculated normal tot area_poly_v3
...
add normal_poly_v3
2014-04-16 00:29:57 +10:00
Bastien Montagne
d9211b1e7b
Fix compilation (size_t not defined) by including stddef.h in BLI_sys_types.h
2014-04-15 09:11:45 +02:00
Campbell Barton
aa10cf7f5c
GHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once
2014-04-15 14:40:33 +10:00
Campbell Barton
a7241d09cd
GHash: add typed hash functions (were all (void *))
...
- BLI_ghashutil_strhash_n takes string length, to avoid terminating the string before hashing.
- BLI_ghashutil_inthash/uinthash take ints, to avoid casting to (void *)
This also showed up incorrect use of inthash, which was using a pointer.
2014-04-15 14:22:36 +10:00
Campbell Barton
ad9af56a6e
LinkList stack macros to swap and pop into a separate stack.
2014-04-13 20:12:07 +10:00
Campbell Barton
2025e4cbb9
Code cleanup: quiet warnings & style
2014-04-13 11:26:31 +10:00
Campbell Barton
c04e73f386
Math Lib: use less strict epsilon with BLI_ASSERT_UNIT_QUAT
...
was causing issues with pointcache
2014-04-11 18:20:30 +10:00
Campbell Barton
a15b3c4d11
Code cleanup: use bool
2014-04-11 11:33:29 +10:00
Campbell Barton
f700a13eb5
Revert "Mempool: simplify memory chunk list building"
...
This reverts commit c82371fc06 .
Caused regression in iterator
2014-04-10 11:35:17 +10:00
Campbell Barton
82628a6b0e
Code cleanup: use struct type for mempool & style edits
2014-04-10 06:49:25 +10:00
Campbell Barton
5580afb5df
GHash/Edgehash: make simple iterator checking functions inline.
...
also remove NULL check, only a few areas made use of this.
2014-04-08 15:50:38 +10:00
Campbell Barton
c82371fc06
Mempool: simplify memory chunk list building
2014-04-08 13:41:57 +10:00
Campbell Barton
412826a504
Mempool: delay allocating an initial chunk, its not always used
2014-04-08 12:58:56 +10:00
Campbell Barton
5c5d643938
Mempool: use define for used freeword and correct define
2014-04-07 12:52:23 +10:00
Campbell Barton
13d90ab8f7
Mempool: minor optimization to building free pointer list
2014-04-07 12:38:32 +10:00
Campbell Barton
aee82b4b2c
Mempool: fix own error in recent commit
...
chunks must be added in order for iteration.
2014-04-07 12:38:32 +10:00
Campbell Barton
2a82b8ade5
Math Lib: add power of 2 min/max for unsigned ints
2014-04-05 21:54:20 +11:00
Campbell Barton
19b7bb5975
Optimize mempool: round chunk size to powers of 2, account for slop-space
...
This helps to reduce memory fragmentation.
2014-04-05 12:14:05 +11:00
Campbell Barton
af59ee340f
Mempool: remove BLI_MEMPOOL_SYSMALLOC, MEM_* allocs are more efficient now
2014-04-05 12:14:05 +11:00
Campbell Barton
70353f833a
Optimize mempool: replace double linked list with single for memory chunks
2014-04-05 09:49:13 +11:00
Campbell Barton
7cb90a611f
Optimization for mempool initial chunk allocation
...
Almost all pools allocated 2 chunks on initialization,
every element needed to be added to the free-list which
would never be used for small pools.
Now allocate only one, gives minor speedup for some bmesh operations.
2014-04-04 21:25:08 +11:00
Campbell Barton
5770d691bb
Optimize BLI_convexhull_aabb_fit_hull_2d, avoid atan2, sin, cos
...
add utility functions for using a 2d unit vector as a rotation matrix
mul_v2_v2_cw & mul_v2_v2_ccw
2014-04-03 21:47:03 +11:00
Bastien Montagne
35747ee3d5
Rename "BLI_cpu.h" to "BLI_system.h" and add to it BLI_getpid() helper.
...
There is not much sense to have a whole BLI file just to check SSE2 on CPUs...
So idea is to rename it to more generic "BLI_system", and add to it more system-related
utils, like e.g. an include helper for getpid(), which allows to hide unix/windows
internals from rest of the code...
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D439
2014-04-02 11:59:43 +02:00
Campbell Barton
1d9e0c373d
Fix for BLI_rng_shuffle_array noted by mont29
2014-04-02 10:09:48 +11:00
Campbell Barton
da4b90a331
Code cleanup: use uint64_t for BLI_rand
2014-04-02 09:58:27 +11:00
Jens Verwiebe
62dc18c717
Fix an unused function warning without openmp present, some typos
2014-04-01 11:23:28 +02:00
Campbell Barton
e95fd79258
Correction for error in own recent commit (makesrna c++ api, un-init var)
2014-04-01 16:53:15 +11:00
Campbell Barton
617557b08e
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
2014-04-01 15:22:28 +11:00
Campbell Barton
097a3756c0
Code cleanup: use bool
2014-03-31 23:39:08 +11:00
Jens Verwiebe
277fb1a31f
Sculpt/dyntopo: Make the omp threads configurable to overcome performance issues
...
- autodetect optimal default, which typically avoids HT threads
- can store setting in .blend per scene
- this does not touch general omp max threads, due i found other areas where the calculations are fitting for huge corecount
- Intel notes, some of the older generation processors with HyperThreading would not provide significant performance boost for FPU intensive applications. On those systems you might want to set OMP_NUM_THREADS = total number of cores (not total number of hardware theads).
2014-03-31 13:51:49 +02:00
Campbell Barton
0055162b75
Tweak slerp assert to be less picky
2014-03-31 14:55:12 +11:00
Campbell Barton
55f83e36cc
Py API: Vector.slerp(). also added interp_v3_v3v3_slerp(_safe) functions
2014-03-31 13:28:37 +11:00
Campbell Barton
6aa75d3b2c
Fix for error in normalize_vn_vn(), add len_squared_vn
2014-03-31 11:19:32 +11:00
Thomas Dinges
b99977ac60
And another compile fix for M_PI and msvc2008...
2014-03-30 15:36:09 +02:00
Campbell Barton
0319db1063
Correct own recent changes broke release builds
2014-03-30 20:35:59 +11:00
Campbell Barton
8d1b289b78
Code cleanup: warnings (clang)
2014-03-30 19:37:43 +11:00
Campbell Barton
c16bd951cd
Enable GCC pedantic warnings with strict flags,
...
also modify MIN/MAX macros to prevent shadowing.
2014-03-30 15:04:20 +11:00
Campbell Barton
5819421e1b
correct recent commit
2014-03-30 15:04:20 +11:00
Campbell Barton
bbfeb120fc
Code cleanup: use strict flags for BLI_rand
2014-03-30 15:04:20 +11:00
Campbell Barton
faf529d036
BLI_rand: Add BLI_rng_get_float_unit_v3, was static rayshade func
2014-03-30 15:04:20 +11:00
Campbell Barton
a6e8137983
Convenience macro for print_ funcs, saves passing id each time
2014-03-30 15:04:20 +11:00
Campbell Barton
480c5019bb
Code cleanup: reflect_v3_v3v3 made redundant copies
2014-03-30 12:28:09 +11:00
Campbell Barton
3bd15fcf15
Correction for poly_to_tri_count (used over-complicated method)
2014-03-30 12:05:42 +11:00
Campbell Barton
1f58bfb8be
Code cleanup: de-duplicate cotangent weight function & add arg sizes
2014-03-30 11:08:33 +11:00
Campbell Barton
23ef10c705
Code cleanup: kdopbvh, move minmax init into function
2014-03-30 10:33:01 +11:00
Campbell Barton
2100fb4094
Code cleanup: avoid setting du/dv twice with ray intersection
2014-03-29 22:38:01 +11:00