File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,26 @@ template <typename... Ts>
176176inline constexpr const bool is_tensor_of_tensor_v =
177177 is_tensor_of_tensor<Ts...>::value;
178178
179+ // //////////////////////////////////////////////////////////////////////////////
180+ // / It is sometimes desirable to distinguish between DistArrays with
181+ // / tensor-of-scalars tiles vs tensor-of-tensors tiles.
182+
183+ // /
184+ // / True if the @tparam Array is a DistArray with tensor-of-scalars tile type.
185+ // / e.g. DistArray<Tensor<double>>;
186+ // /
187+ template <typename Array>
188+ concept array_tos =
189+ is_array_v<Array> && is_tensor_v<typename Array::value_type>;
190+
191+ // /
192+ // / True if the @tparam Array is a DistArray with tensor-of-tensors tile type.
193+ // / e.g. DistArray<Tensor<Tensor<double>>>;
194+ // /
195+ template <typename Array>
196+ concept array_tot =
197+ is_array_v<Array> && is_tensor_of_tensor_v<typename Array::value_type>;
198+
179199// //////////////////////////////////////////////////////////////////////////////
180200
181201template <typename T1, typename T2, typename Enabler = void >
You can’t perform that action at this time.
0 commit comments