Go to the documentation of this file.
86 for (
int i = 0; i < _size; ++i) _data[i] += rhs1 * rhs2._data[i];
111 for (
int i = 0; i < _size; ++i) _data[i] += rhs1._data[i] * rhs2._data[i];
125 for (
int i = 0; i < _size; ++i) _data[i] += rhs1 * rhs2._data[i] * rhs3._data[i];
138 for (
int i = 0; i < _size; ++i) _data[i] -= rhs1 * rhs2._data[i];
163 for (
int i = 0; i < _size; ++i) _data[i] -= rhs1._data[i] * rhs2._data[i];
177 for (
int i = 0; i < _size; ++i) _data[i] -= rhs1 * rhs2._data[i] * rhs3._data[i];
189 for (
int i = 0; i < _size; ++i) _data[i] += rhs._data[i];
201 for (
int i = 0; i < _size; ++i) _data[i] -= rhs._data[i];
213 for (
int i = 0; i < _size; ++i) _data[i] *= rhs;
225 for (
int i = 0; i < _size; ++i) _data[i] /= rhs;
250 for (
int i = 0; i < n; ++i) bundles[i] = ValueBundle<T>(
new T[bundleSize], bundleSize);
261 for (
int i = 0; i < n; ++i) bundles[i] = ValueBundle<T>(rhs.bundles[i].data(), rhs.bundles[i].size());
271 for (
int i = 0; i < n; ++i)
delete[] bundles[i].data();
293 for (
int i = 0; i < n; ++i) memset(bundles[i].data(), 0, bundles[i].size() *
sizeof(T));
306 for (
int i = 0; i < n; ++i) bundles[i].
multAdd(rhs1, rhs2.bundles[i]);
318 for (
int i = 0; i < n; ++i) bundles[i] *= rhs;
330 for (
int i = 0; i < n; ++i) bundles[i] /= rhs;
342 for (
int i = 0; i < n; ++i) bundles[i] += rhs.bundles[i];
ValueBundle & multSub(const T &rhs1, const ValueBundle< T > &rhs2)
Fused multiply-sub, equivalent to operator-=(rhs1 * rhs2).
Definition: ValueBundle.hpp:136
ValueSuperbundle & operator/=(const T &rhs)
Division assignment.
Definition: ValueBundle.hpp:328
ValueBundle & operator-=(const ValueBundle &rhs)
Subtraction assignment.
Definition: ValueBundle.hpp:199
ValueSuperbundle & multAdd(const T &rhs1, const ValueSuperbundle< T, n > &rhs2)
Fused multiply-add on all ValueBundles.
Definition: ValueBundle.hpp:304
ValueBundle()
Construct an empty ValueBundle object.
Definition: ValueBundle.hpp:23
ValueBundle & multAdd(const ValueBundle< T > &rhs1, const ValueBundle< T > &rhs2)
Elementwise fused multiply-add. Equivalent to elementwise operator+=(rhs1 * rhs2).
Definition: ValueBundle.hpp:109
ValueSuperbundle & operator*=(const T &rhs)
Multiplication assignent.
Definition: ValueBundle.hpp:316
T & operator[](const int n)
Access the nth value stored in the value bundle.
Definition: ValueBundle.hpp:52
Value array implementation. The object does not hold ownership of its memory.
Definition: ValueBundle.hpp:17
ValueBundle(T *data, const int size)
Construct a new ValueBundle object.
Definition: ValueBundle.hpp:31
~ValueSuperbundle()
Destroy the ValueSuperbundle object.
Definition: ValueBundle.hpp:267
T * data() const
Retrieve the pointer to the first value stored in the bundle.
Definition: ValueBundle.hpp:72
ValueBundle & multAdd(const ValueBundle< T > &rhs1, const T &rhs2)
Fused multiply-add for scalar right-multiplication, equivalent to operator+=(rhs1 * rhs2).
Definition: ValueBundle.hpp:97
ValueSuperbundle & operator+=(const ValueSuperbundle< T, n > &rhs)
Addition assignment.
Definition: ValueBundle.hpp:340
ValueBundle & operator=(const ValueBundle< T > &rhs)
Assignment operator.
Definition: ValueBundle.hpp:39
ValueBundle & multSub(const ValueBundle< T > &rhs1, const ValueBundle< T > &rhs2)
Elementwise fused multiply-sub. Equivalent to elementwise operator-=(rhs1 * rhs2).
Definition: ValueBundle.hpp:161
ValueBundle & multAdd(const T &rhs1, const ValueBundle< T > &rhs2)
Fused multiply-add, equivalent to operator+=(rhs1 * rhs2).
Definition: ValueBundle.hpp:84
ValueBundle< T > & bundle(const int m)
Return reference to ValueBundle.
Definition: ValueBundle.hpp:281
ValueBundle & operator+=(const ValueBundle &rhs)
Addition assignment.
Definition: ValueBundle.hpp:187
ValueBundle & multSub(const ValueBundle< T > &rhs1, const T &rhs2)
Fused multiply-sub for scalar right-multiplication, equivalent to operator-=(rhs1 * rhs2).
Definition: ValueBundle.hpp:149
ValueBundle & operator*=(const T &rhs)
Multiplication assignment.
Definition: ValueBundle.hpp:211
ValueSuperbundle(const int bundleSize)
Construct a new ValueSuperbundle object and allocate ValueBundles.
Definition: ValueBundle.hpp:248
ValueBundle & operator/=(const T &rhs)
Division assignment.
Definition: ValueBundle.hpp:223
int size() const
Retrieve the number of elements in the value bundle.
Definition: ValueBundle.hpp:62
ValueSuperbundle & reset()
Write zeros to all ValueBundles.
Definition: ValueBundle.hpp:291
ValueBundle & multSub(const T &rhs1, const ValueBundle< T > &rhs2, const ValueBundle< T > &rhs3)
Elementwise double-multiply sub. Equivalent to elementwise operator-=(rhs1 * rhs2 * rhs3).
Definition: ValueBundle.hpp:175
Collection of ValueBundles.
Definition: ValueBundle.hpp:240
ValueSuperbundle(const ValueSuperbundle &rhs)
Copy constructor. The copy will not have ownership of the ValueBundle memory.
Definition: ValueBundle.hpp:259
ValueBundle & multAdd(const T &rhs1, const ValueBundle< T > &rhs2, const ValueBundle< T > &rhs3)
Elementwise double-multiply add. Equivalent to elementwise operator+=(rhs1 * rhs2 * rhs3).
Definition: ValueBundle.hpp:123