downsample#
downsample a signal by dropping samples
-
template<typename T>
__MATX_INLINE__ auto matx::downsample(const T &op, int32_t dim, index_t n)# Operator to downsample an operator by dropping samples.
- Template Parameters:
T – Input operator/tensor type
- Parameters:
op – Input operator
dim – the factor to downsample
n – Downsample rate
- Returns:
Downsample operator
Examples#
int n = 5;
auto t1 = make_tensor<TestType>({100});
(t1 = static_cast<TestType>(1)).run(exec);
auto ds_op = downsample(t1, 0, n);