FContiguousSparse2DKernelTransform 更多...
#include <FloatArrayMath.h>
Public 成员函数 | |
| FContiguousSparse2DKernelTransform (const int32 NumInElements, const int32 NumOutElements) | |
| NumInElements sets the expected number of input array elements as well as the number of elements in a row. 更多... | |
| int32 | GetNumInElements () const |
| Returns the required size of the input array | |
| int32 | GetNumOutElements () const |
| Returns the size of the output array | |
| void | SetRow (const int32 RowIndex, const int32 StartIndex, TArrayView< const float > OffsetValues) |
| Set the kernel values for an individual row. 更多... | |
| void | TransformArray (const float *InArray, float *OutArray) const |
| Transforms the input array given the kernel. 更多... | |
| void | TransformArray (TArrayView< const float > InView, AlignedFloatBuffer &OutArray) const |
| Transforms the input array given the kernel. 更多... | |
| void | TransformArray (TArrayView< const float > InView, TArray< float > &OutArray) const |
| Transforms the input array given the kernel. 更多... | |
FContiguousSparse2DKernelTransform
FContiguousSparse2DKernelTransform applies a matrix transformation to an input array. [OutArray] = [[Kernal]][InView]
It provides some optimization by exploit the contiguous and sparse qualities of the kernel rows, which allows it to skip multiplications with the number zero.
It works with non-sparse and non-contiguous kernels as well, but will be more computationally expensive than a naive implementation. Also, only takes advantage of sparse contiguous rows, not columns.
| Audio::FContiguousSparse2DKernelTransform::FContiguousSparse2DKernelTransform | ( | const int32 | NumInElements, |
| const int32 | NumOutElements | ||
| ) |
NumInElements sets the expected number of input array elements as well as the number of elements in a row.
NumOutElements sets the number of output array elements as well as the number or rows.
| void Audio::FContiguousSparse2DKernelTransform::SetRow | ( | const int32 | RowIndex, |
| const int32 | StartIndex, | ||
| TArrayView< const float > | OffsetValues | ||
| ) |
Set the kernel values for an individual row.
RowIndex determines which row is being set. StartIndex denotes the offset into the row where the OffsetValues will be inserted. OffsetValues contains the contiguous chunk of values which represent all the nonzero elements in the row.
| void Audio::FContiguousSparse2DKernelTransform::TransformArray | ( | const float * | InArray, |
| float * | OutArray | ||
| ) | const |
Transforms the input array given the kernel.
InArray is the array to be transformed. It must have NumInElements number of elements. OutArray is the transformed array. It must be allocated to hold at least NumOutElements.
| void Audio::FContiguousSparse2DKernelTransform::TransformArray | ( | TArrayView< const float > | InView, |
| AlignedFloatBuffer & | OutArray | ||
| ) | const |
Transforms the input array given the kernel.
InView is the array to be transformed. It must have NumInElements number of elements. OutArray is the transformed array. It will have NumOutElements number of elements.
| void Audio::FContiguousSparse2DKernelTransform::TransformArray | ( | TArrayView< const float > | InView, |
| TArray< float > & | OutArray | ||
| ) | const |
Transforms the input array given the kernel.
InView is the array to be transformed. It must have NumInElements number of elements. OutArray is the transformed array. It will have NumOutElements number of elements.