Expression Templates Library (ETL)
traits.hpp
1 //=======================================================================
2 // Copyright (c) 2014-2023 Baptiste Wicht
3 // Distributed under the terms of the MIT License.
4 // (See accompanying file LICENSE or copy at
5 // http://opensource.org/licenses/MIT)
6 //=======================================================================
7 
8 #pragma once
9 
10 namespace etl {
11 
12 namespace traits_detail {
13 
18 template <typename T>
19 struct is_fast_matrix_impl : std::false_type {};
20 
24 template <typename V1, typename V2, order V3, size_t... R>
25 struct is_fast_matrix_impl<fast_matrix_impl<V1, V2, V3, R...>> : std::true_type {};
26 
31 template <typename T>
32 struct is_custom_fast_matrix_impl : std::false_type {};
33 
37 template <typename V1, typename V2, order V3, size_t... R>
38 struct is_custom_fast_matrix_impl<custom_fast_matrix_impl<V1, V2, V3, R...>> : std::true_type {};
39 
44 template <typename T>
45 struct is_dyn_matrix_impl : std::false_type {};
46 
50 template <typename V1, order V2, size_t V3>
51 struct is_dyn_matrix_impl<dyn_matrix_impl<V1, V2, V3>> : std::true_type {};
52 
57 template <typename T>
58 struct is_gpu_dyn_matrix_impl : std::false_type {};
59 
63 template <typename V1, order V2, size_t V3>
64 struct is_gpu_dyn_matrix_impl<gpu_dyn_matrix_impl<V1, V2, V3>> : std::true_type {};
65 
70 template <typename T>
71 struct is_custom_dyn_matrix_impl : std::false_type {};
72 
76 template <typename V1, order V2, size_t V3>
77 struct is_custom_dyn_matrix_impl<custom_dyn_matrix_impl<V1, V2, V3>> : std::true_type {};
78 
83 template <typename T>
84 struct is_sparse_matrix_impl : std::false_type {};
85 
89 template <typename V1, sparse_storage V2, size_t V3>
90 struct is_sparse_matrix_impl<sparse_matrix_impl<V1, V2, V3>> : std::true_type {};
91 
96 template <typename T>
97 struct is_dyn_matrix_view : std::false_type {};
98 
102 template <typename E, size_t D>
103 struct is_dyn_matrix_view<dyn_matrix_view<E, D>> : std::true_type {};
104 
109 template <typename T>
110 struct is_sub_view : std::false_type {};
111 
115 template <typename E, bool Aligned>
116 struct is_sub_view<sub_view<E, Aligned>> : std::true_type {};
117 
122 template <typename T>
123 struct is_selected_expr_impl : std::false_type {};
124 
128 template <typename Selector, Selector V, typename Expr>
129 struct is_selected_expr_impl<selected_expr<Selector, V, Expr>> : std::true_type {};
130 
134 template <template <typename, bool> typename BTE, typename T, bool B>
135 std::true_type is_base_of_template_tb_impl(const BTE<T, B>*);
136 
140 template <template <typename, bool> typename BTE>
141 std::false_type is_base_of_template_tb_impl(...);
142 
146 template <typename T, template <typename, bool> typename C>
147 constexpr bool is_base_of_template_tb = decltype(is_base_of_template_tb_impl<C>(std::declval<T*>()))::value;
148 
149 template <typename E>
150 constexpr bool is_nongpu_temporary_impl() {
151  if constexpr (is_base_of_template_tb<std::decay_t<E>, etl::base_temporary_expr>) {
152  return !std::decay_t<E>::gpu_computable;
153  } else {
154  return false;
155  }
156 }
157 
158 template <typename E>
159 constexpr bool is_gpu_temporary_impl() {
160  if constexpr (is_base_of_template_tb<std::decay_t<E>, etl::base_temporary_expr>) {
161  return std::decay_t<E>::gpu_computable;
162  } else {
163  return false;
164  }
165 }
166 
167 } // end of namespace traits_detail
168 
173 template <typename T>
175 
180 template <typename T>
182 
187 template <typename T>
189 
194 template <typename T>
196 
201 template <typename T>
203 
208 template <typename T>
210 
215 template <typename T>
216 constexpr bool is_unary_expr = cpp::specialization_of<etl::unary_expr, T>;
217 
222 template <typename T>
223 constexpr bool is_binary_expr = cpp::specialization_of<etl::binary_expr, T>;
224 
229 template <typename T>
230 constexpr bool is_generator_expr = cpp::specialization_of<etl::generator_expr, T>;
231 
236 template <typename T>
237 constexpr bool is_optimized_expr = cpp::specialization_of<etl::optimized_expr, T>;
238 
243 template <typename T>
244 constexpr bool is_serial_expr = cpp::specialization_of<etl::serial_expr, T>;
245 
250 template <typename T>
252 
257 template <typename T>
258 constexpr bool is_parallel_expr = cpp::specialization_of<etl::parallel_expr, T>;
259 
264 template <typename T>
265 constexpr bool is_timed_expr = cpp::specialization_of<etl::timed_expr, T>;
266 
271 template <typename T>
272 constexpr bool is_wrapper_expr = is_optimized_expr<T> || is_selected_expr<T> || is_serial_expr<T> || is_parallel_expr<T> || is_timed_expr<T>;
273 
277 template <typename T>
279 
283 template <typename T>
284 constexpr bool is_slice_view = cpp::specialization_of<etl::slice_view, T>;
285 
289 template <typename T>
291 
296 template <typename T>
298 
303 template <typename T>
305 
310 template <typename T>
312 
317 template <typename T>
319 
324 template <typename T>
325 constexpr bool is_transpose_expr = cpp::specialization_of<etl::transpose_expr, T>;
326 
331 template <typename T>
332 constexpr bool is_temporary_expr = traits_detail::is_base_of_template_tb<std::decay_t<T>, etl::base_temporary_expr>;
333 
338 template <typename T>
340 
345 template <typename T>
346 constexpr bool is_etl_value_class =
347  is_fast_matrix<T> || is_custom_fast_matrix<T> || is_dyn_matrix<T> || is_custom_dyn_matrix<T> || is_sparse_matrix<T> || is_gpu_dyn_matrix<T>;
348 
353 template <typename T>
354 constexpr bool is_lhs = is_etl_value<T> || is_unary_expr<T>;
355 
361 template <typename T>
362 constexpr bool is_simple_lhs = is_etl_value_class<T> || is_unary_expr<T> || is_sub_view<T> || is_slice_view<T> || is_dyn_matrix_view<T>;
363 
368 template <typename T>
369 constexpr bool is_scalar = cpp::specialization_of<etl::scalar, T>;
370 
375 template <typename T>
376 constexpr bool is_single_precision_t = std::is_same_v<T, float>;
377 
382 template <typename T>
383 constexpr bool is_single_precision = is_single_precision_t<value_t<T>>;
384 
389 template <typename... E>
390 constexpr bool all_single_precision = (is_single_precision<E> && ...);
391 
396 template <typename T>
397 constexpr bool is_double_precision_t = std::is_same_v<T, double>;
398 
403 template <typename T>
404 constexpr bool is_bool_t = std::is_same_v<T, bool>;
405 
410 template <typename T>
411 constexpr bool is_double_precision = is_double_precision_t<value_t<T>>;
412 
417 template <typename... E>
418 constexpr bool all_double_precision = (is_double_precision<E> && ...);
419 
424 template <typename T>
425 constexpr bool is_floating = is_single_precision<T> || is_double_precision<T>;
426 
431 template <typename T>
432 constexpr bool is_floating_t = is_single_precision_t<T> || is_double_precision_t<T>;
433 
438 template <typename... E>
439 constexpr bool all_floating = (is_floating<E> && ...);
440 
445 template <typename... E>
446 constexpr bool all_floating_t = (is_floating_t<E> && ...);
447 
452 template <typename T>
453 constexpr bool is_complex_t = cpp::specialization_of<std::complex, T> || cpp::specialization_of<etl::complex, T>;
454 
459 template <typename T>
460 constexpr bool is_complex_single_t = std::is_same_v<T, std::complex<float>> || std::is_same_v<T, etl::complex<float>>;
461 
466 template <typename T>
467 constexpr bool is_complex_double_t = std::is_same_v<T, std::complex<double>> || std::is_same_v<T, etl::complex<double>>;
468 
473 template <typename T>
474 constexpr bool is_complex_single_precision = is_complex_single_t<value_t<T>>;
475 
480 template <typename T>
481 constexpr bool is_complex_double_precision = is_complex_double_t<value_t<T>>;
482 
487 template <typename... E>
488 constexpr bool all_complex_single_precision = (is_complex_single_precision<E> && ...);
489 
494 template <typename... E>
495 constexpr bool all_complex_double_precision = (is_complex_double_precision<E> && ...);
496 
501 template <typename T>
502 constexpr bool is_complex = is_complex_single_precision<T> || is_complex_double_precision<T>;
503 
508 template <typename... E>
509 constexpr bool all_complex = (is_complex<E> && ...);
510 
517 template <typename T>
518 constexpr bool is_deep_single_precision = is_complex_single_precision<T> || is_single_precision<T>;
519 
526 template <typename T>
527 constexpr bool is_deep_double_precision = is_complex_double_precision<T> || is_double_precision<T>;
528 
538 template <typename T>
539 constexpr bool is_gpu_t = is_floating_t<T> || is_complex_t<T> || is_bool_t<T>;
540 
545 template <typename T>
547 
552 template <typename... E>
553 constexpr bool all_dma = (is_dma<E> && ...);
554 
559 template <typename E>
561 
566 template <typename... E>
567 constexpr bool all_row_major = (is_row_major<E> & ...);
568 
573 template <typename E>
575 
580 template <typename... E>
581 constexpr bool all_column_major = (is_column_major<E> && ...);
582 
587 template <typename E>
589 
594 template <typename... E>
595 constexpr bool all_fast = (decay_traits<E>::is_fast && ...);
596 
601 template <typename... E>
602 constexpr bool all_etl_expr = (is_etl_expr<E> && ...);
603 
608 template <typename T>
609 constexpr bool is_1d = decay_traits<T>::dimensions() == 1;
610 
615 template <typename... T>
616 constexpr bool all_1d = (is_1d<T> && ...);
617 
622 template <typename T>
623 constexpr bool is_2d = decay_traits<T>::dimensions() == 2;
624 
629 template <typename... T>
630 constexpr bool all_2d = (is_2d<T> && ...);
631 
636 template <typename T>
637 constexpr bool is_3d = decay_traits<T>::dimensions() == 3;
638 
643 template <typename... T>
644 constexpr bool all_3d = (is_3d<T> && ...);
645 
650 template <typename T>
651 constexpr bool is_4d = decay_traits<T>::dimensions() == 4;
652 
657 template <typename... T>
658 constexpr bool all_4d = (is_4d<T> && ...);
659 
664 template <vector_mode_t V, typename... E>
665 constexpr bool all_vectorizable = (decay_traits<E>::template vectorizable<V> && ...);
666 
671 template <vector_mode_t V, typename E>
672 static constexpr bool vectorizable_t = get_intrinsic_traits<V>::template type<value_t<E>>::vectorizable;
673 
678 template <vector_mode_t V, typename... E>
679 constexpr bool all_vectorizable_t = (vectorizable_t<V, E> & ...);
680 
686 template <typename E>
688 
694 template <typename... E>
696 
701 template <typename T>
702 constexpr bool is_padded_value = is_dyn_matrix<T> || is_fast_matrix<T>;
703 
708 template <typename T>
709 constexpr bool is_aligned_value = is_dyn_matrix<T> || is_fast_matrix<T>;
710 
715 template <typename... E>
716 constexpr bool all_padded = (decay_traits<E>::is_padded && ...);
717 
724 template <typename T>
726 
733 template <typename... E>
735 
740 template <typename... E>
741 constexpr bool all_homogeneous = cpp::is_homogeneous_v<value_t<E>...>;
742 
747 template <typename T>
749 
754 template <typename T>
755 constexpr bool fast_sub_matrix_able = is_dma<T>;
756 
761 template <typename T>
762 constexpr bool fast_slice_view_able = fast_sub_view_able<T>;
763 
764 namespace traits_detail {
765 
773 template <typename T>
774 constexpr bool inplace_sub_transpose_able_impl() {
775  if constexpr (is_fast<T> && is_3d<T>) {
776  return decay_traits<T>::template dim<1>() == decay_traits<T>::template dim<2>();
777  } else if constexpr (!is_fast<T> && is_3d<T>) {
778  return true;
779  } else {
780  return false;
781  }
782 }
783 
788 template <typename T>
789 constexpr bool inplace_transpose_able_impl() {
790  if constexpr (is_fast<T> && is_2d<T>) {
791  return decay_traits<T>::template dim<0>() == decay_traits<T>::template dim<1>();
792  } else if constexpr (!is_fast<T> && is_2d<T>) {
793  return true;
794  } else {
795  return false;
796  }
797 }
798 
802 template <typename Matrix>
803 constexpr bool is_square_matrix_impl() {
804  if constexpr (is_fast<Matrix> && is_2d<Matrix>) {
806  } else if constexpr (!is_fast<Matrix> && is_2d<Matrix>) {
807  return true;
808  } else {
809  return false;
810  }
811 }
812 
813 } //end of namespace traits_detail
814 
819 template <typename T>
820 constexpr bool inplace_transpose_able = traits_detail::inplace_transpose_able_impl<T>();
821 
829 template <typename T>
830 constexpr bool inplace_sub_transpose_able = traits_detail::inplace_sub_transpose_able_impl<T>();
831 
835 template <typename Matrix>
836 constexpr bool is_square_matrix = traits_detail::is_square_matrix_impl<Matrix>();
837 
842 template <typename E>
843 constexpr bool is_nongpu_temporary = traits_detail::is_nongpu_temporary_impl<E>();
844 
849 template <typename E>
850 constexpr bool is_gpu_temporary = traits_detail::is_gpu_temporary_impl<E>();
851 
856 template <typename E>
857 constexpr bool should_gpu_compute_direct = is_etl_value<E> || is_nongpu_temporary<E> || (is_dma<E> && !is_gpu_temporary<E>);
858 
862 template <typename T, typename S>
863 using return_helper = std::conditional_t<
864  std::is_const_v<std::remove_reference_t<S>>,
865  const value_t<T>&,
866  std::conditional_t<std::is_lvalue_reference_v<S> && !std::is_const_v<T>, value_t<T>&, value_t<T>>>;
867 
871 template <typename T, typename S>
872 using const_return_helper = std::conditional_t<std::is_lvalue_reference_v<S>, const value_t<T>&, value_t<T>>;
873 
877 template <typename T>
878 requires(is_etl_value_class<T>)
879 struct etl_traits<T> {
880  using value_type = typename T::value_type;
881 
882  static constexpr bool is_etl = true;
883  static constexpr bool is_transformer = false;
884  static constexpr bool is_view = false;
885  static constexpr bool is_magic_view = false;
886  static constexpr bool is_fast = is_fast_matrix<T> || is_custom_fast_matrix<T>;
887  static constexpr bool is_value = true;
888  static constexpr bool is_direct = !is_sparse_matrix<T>;
889  static constexpr bool is_thread_safe = true;
890  static constexpr bool is_linear = true;
891  static constexpr bool is_generator = false;
892  static constexpr bool is_temporary = false;
893  static constexpr bool is_padded = is_padded_value<T>;
894  static constexpr bool is_aligned = is_aligned_value<T>;
895  static constexpr order storage_order = T::storage_order;
896  static constexpr bool gpu_computable = is_gpu_t<value_type> && cuda_enabled;
897 
903  template <vector_mode_t V>
904  static constexpr bool vectorizable = get_intrinsic_traits<V>::template type<value_type>::vectorizable && !is_sparse_matrix<T> && !is_gpu_dyn_matrix<T>;
905 
911  static size_t size(const T& v) {
912  return v.size();
913  }
914 
921  static size_t dim(const T& v, size_t d) {
922  return v.dim(d);
923  }
924 
929  static constexpr size_t size() requires(is_fast) {
930  return T::size();
931  }
932 
938  template <size_t D>
939  static constexpr size_t dim() requires(is_fast) {
940  return T::template dim<D>();
941  }
942 
947  static constexpr size_t dimensions() {
948  return T::n_dimensions;
949  }
950 
955  static constexpr int complexity() noexcept {
956  return -1;
957  }
958 };
959 
960 } //end of namespace etl
constexpr bool is_transpose_expr
Traits indicating if the given type is a transpose expr.
Definition: traits.hpp:325
constexpr bool all_double_precision
Traits to test if all the given ETL expresion types contains double precision numbers.
Definition: traits.hpp:418
Traits to get the intrinsic traits for a vector mode.
Definition: vectorization.hpp:88
Definition: expr_fwd.hpp:44
constexpr bool is_complex_single_precision
Traits to test if the given ETL expresion type contains single precision complex numbers.
Definition: traits.hpp:474
constexpr bool fast_sub_matrix_able
Simple utility traits indicating if a light sub_matrix can be created out of this type...
Definition: traits.hpp:755
constexpr bool all_homogeneous
Traits to test if all the given ETL expresion types are padded.
Definition: traits.hpp:741
constexpr bool all_column_major
Traits to test if all the given ETL expresion types are column-major.
Definition: traits.hpp:581
Special traits helper to detect if type is a dyn_matrix_view.
Definition: traits.hpp:97
constexpr int complexity([[maybe_unused]] const E &expr) noexcept
Return the complexity of the expression.
Definition: helpers.hpp:38
constexpr bool all_vectorizable_t
Traits to test if all the given types are vectorizable types.
Definition: traits.hpp:679
constexpr bool is_sparse_matrix
Traits indicating if the given ETL type is a sparse matrix.
Definition: traits.hpp:209
constexpr bool all_etl_expr
Traits to test if all the given types are ETL types.
Definition: traits.hpp:602
constexpr bool is_etl_expr
Traits indicating if the given type is an ETL type.
Definition: traits.hpp:318
constexpr bool all_dma
Traits to test if all the given ETL expresion types have direct memory access (DMA).
Definition: traits.hpp:553
constexpr bool is_gpu_temporary
Traits to test if an expression is a temporary expression with GPU capabilities.
Definition: traits.hpp:850
Special traits helper to detect if type is a dyn_matrix.
Definition: traits.hpp:45
constexpr bool is_complex_double_t
Traits to test if a type is a double precision complex number type.
Definition: traits.hpp:467
constexpr bool is_scalar
Traits to test if a type is a scalar type.
Definition: traits.hpp:369
A temporary expression base.
Definition: base_temporary_expr.hpp:66
Special traits helper to detect if type is a sparse_matrix.
Definition: traits.hpp:84
constexpr bool is_temporary_expr
Traits indicating if the given type is a temporary expression.
Definition: traits.hpp:332
vector_mode_t
Vectorization mode.
Definition: config.hpp:184
value_t< sub_type > value_type
The value contained in the expression.
Definition: dyn_matrix_view.hpp:31
constexpr bool is_magic_view
Traits indicating if the given ETL type is a magic view expression.
Definition: traits.hpp:311
constexpr bool is_deep_double_precision
Traits to test if the given ETL expresion type contains double precision floating point or double pre...
Definition: traits.hpp:527
constexpr bool inplace_transpose_able
Traits to test if an expression is inplace transpose-able.
Definition: traits.hpp:820
D D
The number of dimensions.
Definition: dyn_matrix_view.hpp:24
constexpr bool is_generator_expr
Traits indicating if the given ETL type is a generator expression.
Definition: traits.hpp:230
constexpr bool is_selected_expr
Traits indicating if the given ETL type is a selector expression.
Definition: traits.hpp:251
constexpr bool is_dma
Traits indicating if the given ETL type has direct memory access.
Definition: traits.hpp:546
constexpr bool all_complex_double_precision
Traits to test if all the given ETL expresion types contains double precision complex numbers...
Definition: traits.hpp:495
constexpr bool is_single_precision
Traits to test if the given ETL expresion contains single precision numbers.
Definition: traits.hpp:383
order
Storage order of a matrix.
Definition: order.hpp:15
constexpr bool is_unary_expr
Traits indicating if the given ETL type is a unary expression.
Definition: traits.hpp:216
constexpr bool cuda_enabled
Indicates if CUDA is available.
Definition: config.hpp:94
constexpr bool all_complex
Traits to test if all the given ETL expresion types contains complex numbers.
Definition: traits.hpp:509
constexpr bool is_complex
Traits to test if the given ETL expresion type contains complex numbers.
Definition: traits.hpp:502
std::conditional_t< std::is_lvalue_reference_v< S >, const value_t< T > &, value_t< T > > const_return_helper
Definition: traits.hpp:872
constexpr bool is_gpu_computable
Traits indicating if the given ETL expression&#39;s type is computable on GPU.
Definition: traits.hpp:725
Special traits helper to detect if type is a sub_view.
Definition: traits.hpp:110
constexpr bool is_dyn_matrix_view
Traits to test if the given expression is a dyn_matrix_view.
Definition: traits.hpp:290
Definition: expr_fwd.hpp:80
constexpr bool is_aligned_value
Traits to test if the givn ETL expression is an aligned value class.
Definition: traits.hpp:709
constexpr bool is_slice_view
Traits to test if the given expression is a slice_view.
Definition: traits.hpp:284
constexpr bool is_nongpu_temporary
Traits to test if an expression is a temporary expression with non-GPU capabilities.
Definition: traits.hpp:843
constexpr bool is_fast
Traits to test if the given ETL expresion type is fast (sizes known at compile-time) ...
Definition: traits.hpp:588
constexpr bool is_dyn_matrix
Traits indicating if the given ETL type is a dyn matrix.
Definition: traits.hpp:188
constexpr bool is_row_major
Traits to test if all the given ETL expresion types are row-major.
Definition: traits.hpp:560
constexpr bool all_single_precision
Traits to test if all the given ETL expresion types contains single precision numbers.
Definition: traits.hpp:390
Traits to get information about ETL types.
Definition: tmp.hpp:68
Root namespace for the ETL library.
Definition: adapter.hpp:15
constexpr bool all_4d
Traits to test if all the given expression types are 4D.
Definition: traits.hpp:658
std::conditional_t< std::is_const_v< std::remove_reference_t< S > >, const value_t< T > &, std::conditional_t< std::is_lvalue_reference_v< S > &&!std::is_const_v< T >, value_t< T > &, value_t< T > >> return_helper
Definition: traits.hpp:866
Special traits helper to detect if type is a fast_matrix.
Definition: traits.hpp:19
constexpr bool is_single_precision_t
Traits to test if the given type is single precision type.
Definition: traits.hpp:376
static constexpr size_t dimensions()
Return the number of dimensions of the expression.
Definition: traits_base.hpp:31
constexpr bool is_column_major
Traits to test if all the given ETL expresion types are column-major.
Definition: traits.hpp:574
auto dim(E &&value, size_t i) -> detail::identity_helper< E, dim_view< detail::build_identity_type< E >, D >>
Return a view representing the ith Dth dimension.
Definition: view_expression_builder.hpp:25
constexpr bool all_1d
Traits to test if all the given expression types are 1D.
Definition: traits.hpp:616
constexpr bool is_square_matrix
Traits to test if a matrix is a square matrix, if this can be defined.
Definition: traits.hpp:836
constexpr bool all_fast
Traits to test if all the given ETL expresion types are fast (sizes known at compile-time) ...
Definition: traits.hpp:595
constexpr bool is_complex_single_t
Traits to test if a type is a single precision complex number type.
Definition: traits.hpp:460
Special traits helper to detect if type is a custom_dyn_matrix.
Definition: traits.hpp:71
constexpr bool is_2d
Traits to test if the given expression type is 2D.
Definition: traits.hpp:623
constexpr bool is_fast_matrix
Traits indicating if the given ETL type is a fast matrix.
Definition: traits.hpp:174
constexpr bool is_sub_view
Traits to test if the given expression is a sub_view.
Definition: traits.hpp:278
constexpr bool is_complex_t
Traits to test if a type is a complex number type.
Definition: traits.hpp:453
constexpr bool all_complex_single_precision
Traits to test if all the given ETL expresion types contains single precision complex numbers...
Definition: traits.hpp:488
constexpr bool is_lhs
Traits indicating if the given ETL type can be left hand side type.
Definition: traits.hpp:354
constexpr bool is_etl_value_class
Traits indicating if the given ETL type is from a value class.
Definition: traits.hpp:346
Special traits helper to detect if type is a gpu_dyn_matrix.
Definition: traits.hpp:58
constexpr bool is_gpu_t
Traits to test if the given type contains a type that can be computed on a GPU.
Definition: traits.hpp:539
constexpr bool is_timed_expr
Traits indicating if the given ETL type is a timed expression.
Definition: traits.hpp:265
constexpr bool is_wrapper_expr
Traits indicating if the given ETL type is a wrapper expression (optimized, serial, ...).
Definition: traits.hpp:272
constexpr bool is_deep_single_precision
Traits to test if the given ETL expresion type contains single precision floating point or single pre...
Definition: traits.hpp:518
Matrix with run-time fixed dimensions.
Definition: dyn.hpp:26
constexpr bool is_floating
Traits to test if the given ETL expresion contains floating point numbers.
Definition: traits.hpp:425
constexpr bool should_gpu_compute_direct
Traits indicating if it&#39;s more efficient to use smart_gpu_compute(x) instead of smart_gpu_compute(x, y) for an expression of type E.
Definition: traits.hpp:857
constexpr bool all_floating_t
Traits to test if all the given types are floating point numbers.
Definition: traits.hpp:446
Matrix with compile-time fixed dimensions.
Definition: fast.hpp:26
constexpr bool is_double_precision
Traits to test if the given ETL expresion contains double precision numbers.
Definition: traits.hpp:411
constexpr bool is_transformer
Traits indicating if the given ETL type is a transformer expression.
Definition: traits.hpp:297
constexpr bool is_complex_double_precision
Traits to test if the given ETL expresion type contains double precision complex numbers.
Definition: traits.hpp:481
constexpr bool is_simple_lhs
Traits indicating if the given ETL type is a simple left hand side type. Adapter types are not taken ...
Definition: traits.hpp:362
constexpr bool fast_slice_view_able
Simple utility traits indicating if a light slice view can be created out of this type...
Definition: traits.hpp:762
constexpr bool is_gpu_dyn_matrix
Traits indicating if the given ETL type is a GPU dyn matrix.
Definition: traits.hpp:195
constexpr bool all_gpu_computable
Traits indicating if all the given ETL expresion types are computable on GPU.
Definition: traits.hpp:734
Column-Major storage.
constexpr bool is_serial_expr
Traits indicating if the given ETL type is a serial expression.
Definition: traits.hpp:244
constexpr bool all_3d
Traits to test if all the given expression types are 3D.
Definition: traits.hpp:644
requires(D > 0) struct dyn_base
Matrix with run-time fixed dimensions.
Definition: dyn_base.hpp:113
constexpr bool is_view
Traits indicating if the given ETL type is a view expression.
Definition: traits.hpp:304
constexpr bool is_custom_dyn_matrix
Traits indicating if the given ETL type is a custom dyn matrix.
Definition: traits.hpp:202
constexpr bool all_2d
Traits to test if all the given expression types are 2D.
Definition: traits.hpp:630
constexpr bool is_padded_value
Traits to test if the givn ETL expression is a padded value class.
Definition: traits.hpp:702
Definition: expr_fwd.hpp:59
Matrix with run-time fixed dimensions.
Definition: custom_dyn.hpp:27
constexpr bool all_padded
Traits to test if all the given ETL expresion types are padded.
Definition: traits.hpp:716
constexpr bool is_etl_value
Traits indicating if the given ETL type is a value type.
Definition: traits.hpp:339
constexpr bool is_binary_expr
Traits indicating if the given ETL type is a binary expression.
Definition: traits.hpp:223
constexpr bool inplace_sub_transpose_able
Traits to test if an expression is inplace sub transpose-able.
Definition: traits.hpp:830
constexpr bool all_row_major
Traits to test if all the given ETL expresion types are row-major.
Definition: traits.hpp:567
constexpr bool all_vectorizable
Traits to test if all the given ETL expresion types are vectorizable.
Definition: traits.hpp:665
constexpr bool all_thread_safe
Traits to test if all the given ETL expresion types are thread safe.
Definition: traits.hpp:695
Matrix with compile-time fixed dimensions.
Definition: custom_fast.hpp:27
constexpr bool is_thread_safe
Traits to test if the given ETL expresion type is thread safe.
Definition: traits.hpp:687
constexpr bool is_custom_fast_matrix
Traits indicating if the given ETL type is a fast matrix.
Definition: traits.hpp:181
constexpr bool is_bool_t
Traits to test if the type is boolean.
Definition: traits.hpp:404
Special traits helper to detect if type is a custom_fast_matrix.
Definition: traits.hpp:32
constexpr bool all_floating
Traits to test if all the given ETL expresion types contains floating point numbers.
Definition: traits.hpp:439
constexpr bool is_3d
Traits to test if the given expression type is 3D.
Definition: traits.hpp:637
Sparse matrix implementation.
Definition: sparse.hpp:211
constexpr bool fast_sub_view_able
Simple utility traits indicating if a light subview can be created out of this type.
Definition: traits.hpp:748
constexpr bool is_floating_t
Traits to test if the type is floating point numbers.
Definition: traits.hpp:432
constexpr bool is_optimized_expr
Traits indicating if the given ETL type is an optimized expression.
Definition: traits.hpp:237
constexpr bool is_1d
Traits to test if the given expression type is 1D.
Definition: traits.hpp:609
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
GPU special Matrix with run-time fixed dimensions.
Definition: gpu_dyn.hpp:25
Row-Major storage.
Special traits helper to detect if type is a selected_expr.
Definition: traits.hpp:123
constexpr bool is_parallel_expr
Traits indicating if the given ETL type is a parallel expression.
Definition: traits.hpp:258
constexpr bool is_4d
Traits to test if the given expression type is 4D.
Definition: traits.hpp:651
constexpr bool is_double_precision_t
Traits to test if the given type is double precision type.
Definition: traits.hpp:397