Linear (i.e. non-blocked) generic 2D array data type.
More...
#include <mitsuba/core/barray.h>
|
| LinearArray () |
| Create an unitialized linear array. More...
|
|
| LinearArray (const Vector2i &size) |
| Allocate memory for a new linear array of the specified width and height. More...
|
|
void | alloc (const Vector2i &size) |
| Allocate memory for a linear array of the specified width and height. More...
|
|
void | map (void *ptr, const Vector2i &size) |
|
template<typename AltValue > |
void | init (const AltValue *data) |
| Initialize the contents of the linear 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 linear 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 linear 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...
|
|
| ~LinearArray () |
| 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...
|
|
|
static size_t | bufferSize (const Vector2i &size) |
| Return the hypothetical heap memory requirements of a blocked array for the given size. More...
|
|
template<typename Value>
class mitsuba::LinearArray< Value >
Linear (i.e. non-blocked) generic 2D array data type.
This class implements a linearly stored 2D array. It is mainly meant as a drop-in replacement for BlockedArray so that the performance tradeoffs can be benchmarked.
template<typename Value >
Create an unitialized linear array.
template<typename Value >
Allocate memory for a new linear array of the specified width and height.
template<typename Value >
template<typename Value >
Allocate memory for a linear array of the specified width and height.
template<typename Value >
Return the hypothetical heap memory requirements of a blocked array for the given size.
template<typename Value >
Zero out unused memory portions.
Since this is a non-blocked array, this function does nothing
template<typename Value >
template<typename AltValue >
Copy the contents of the linear array to a non-blocked destination buffer in row-major order.
This is effectively the opposite of init().
template<typename Value >
Return the size of the allocated buffer.
template<typename Value >
Return a pointer to the internal representation.
template<typename Value >
Return a pointer to the internal representation (const version)
template<typename Value >
Return the height of the array.
template<typename Value >
Return the size of the array.
template<typename Value >
Return the width of the array.
template<typename Value >
template<typename AltValue >
Initialize the contents of the linear array with values from a non-blocked source in row-major order.
template<typename Value >
template<typename AltValue >
void mitsuba::LinearArray< Value >::init |
( |
const AltValue * |
data, |
|
|
AltValue & |
min_, |
|
|
AltValue & |
max_, |
|
|
AltValue & |
avg_ |
|
) |
| |
|
inline |
Initialize the contents of the linear 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.
template<typename Value >
template<typename Value >
Access the specified entry.
template<typename Value >
Access the specified entry (const version)
The documentation for this class was generated from the following file: