concat#
Concatenate operators along a dimension. The returned operator will index into each of the concatenated operators, depending on where it’s indexed
-
template<typename ...Ts>
__MATX_INLINE__ __MATX_HOST__ auto matx::concat(int axis, const Ts&... ts)# ConcatOp multiple operators along a dimension.
- Template Parameters:
Dim – dimension to concatenate
Ts – operator types
- Parameters:
axis – axis to operate along
ts – operators
- Returns:
concatenated operator
Examples#
auto t11 = make_tensor<TestType>({10});
auto t12 = make_tensor<TestType>({5});
auto t1o = make_tensor<TestType>({15});
t11.SetVals({0,1,2,3,4,5,6,7,8,9});
t12.SetVals({0,1,2,3,4});
// Concatenate "t11" and "t12" into a new 1D tensor
(t1o = concat(0, t11, t12)).run(exec);