#include <tbci_traits.h>
Public Types | |
| typedef T & | refval_type |
| typedef const T & | const_refval_type |
| typedef T & | loop_refval_type |
| typedef const T & | loop_const_refval_type |
The answer to these questions is encapsulated in the class tbci_traits.
refval_type and const_refval_type are for passing variables. loop_refval_type and loop_const_refval_type are for access in loops.
The answer may be dependent on the exact machine that's being used. In general, small POD types that fit into a CPU(FPU) register should best be passed as value always.
Small entities that fit into a small number of registers (such as complex numbers) may best be passed to function by reference, but if accessed multiple times, the one copy is cheaper than the indirection by pointer.
For unknown types, that can be arbitrarily complex, and large, we default to using references.
Definition at line 44 of file tbci_traits.h.
| typedef T& TBCI::tbci_traits< T >::refval_type |
Definition at line 47 of file tbci_traits.h.
| typedef const T& TBCI::tbci_traits< T >::const_refval_type |
Definition at line 48 of file tbci_traits.h.
| typedef T& TBCI::tbci_traits< T >::loop_refval_type |
Definition at line 49 of file tbci_traits.h.
| typedef const T& TBCI::tbci_traits< T >::loop_const_refval_type |
Definition at line 50 of file tbci_traits.h.
1.5.6