[multi-array] constructor bypass patch

19 Apr
2007
19 Apr
'07
11:09 a.m.
This proposed patch allows bypassing of default constructors. This can be important for high performance computing. What this patch does: 1. Add an optional arg to 'allocate_space' to specify if element construction is wanted 2. Add 'default_do_init' static constant, which is false for POD and for std::complex<T> 3. Also bypass construction when the result is going to be immediately overwritten (copy_n) 4. Add to 'allocate_space' and optional init value, which default to T(). The purpose is to allow for a multi_array constructor that specifies an initial fill value. This is another optimization and consistent with STL containers. However, I haven't figured out how to use this yet.
6632
Age (days ago)
6632
Last active (days ago)
0 comments
1 participants
participants (1)
-
Neal Becker