|
| | BlockedArray () |
| | Create an unitialized blocked array. More...
|
| |
| | BlockedArray (const Vector2i &size) |
| | Allocate memory for a new blocked array of the specified width and height. More...
|
| |
| void | alloc (const Vector2i &size) |
| | Allocate memory for a blocked array of the specified width and height. More...
|
| |
| void | map (void *ptr, const Vector2i &size) |
| | Initialize the blocked array with a given pointer and array size. More...
|
| |
| template<typename AltValue > |
| void | init (const AltValue *data) |
| | Initialize the contents of the blocked array with values from a non-blocked source in row-major order. More...
|
| |
| template<typename AltValue > |
| void | init (const AltValue *data, AltValue &min_, AltValue &max_, AltValue &avg_) |
| | Initialize the contents of the blocked array with values from a non-blocked source in row-major order and collect component-wise minimum, maximum, and average information. More...
|
| |
| template<typename AltValue > |
| void | copyTo (AltValue *data) const |
| | Copy the contents of the blocked array to a non-blocked destination buffer in row-major order. More...
|
| |
| void | cleanup () |
| | Zero out unused memory portions. More...
|
| |
| const Vector2i & | getSize () const |
| | Return the size of the array. More...
|
| |
| size_t | getBufferSize () const |
| | Return the size of the allocated buffer. More...
|
| |
| int | getWidth () const |
| | Return the width of the array. More...
|
| |
| int | getHeight () const |
| | Return the height of the array. More...
|
| |
| | ~BlockedArray () |
| | Release all memory. More...
|
| |
| Value & | operator() (int x, int y) |
| | Access the specified entry. More...
|
| |
| const Value & | operator() (int x, int y) const |
| | Access the specified entry (const version) More...
|
| |
| Value * | getData () |
| | Return a pointer to the internal representation. More...
|
| |
| const Value * | getData () const |
| | Return a pointer to the internal representation (const version) More...
|
| |
template<typename Value, size_t logblockSize = 2>
class mitsuba::BlockedArray< Value, logblockSize >
Blocked generic 2D array data type.
This class implements a blocked 2D array for cache-efficient access to two-dimensional data.
template<typename Value , size_t logblockSize = 2>
template<typename AltValue >
| void mitsuba::BlockedArray< Value, logblockSize >::init |
( |
const AltValue * |
data, |
|
|
AltValue & |
min_, |
|
|
AltValue & |
max_, |
|
|
AltValue & |
avg_ |
|
) |
| |
|
inline |
Initialize the contents of the blocked array with values from a non-blocked source in row-major order and collect component-wise minimum, maximum, and average information.
Assumes that AltValue is some kind of TVector or TSpectrum instance.