Expression Templates Library (ETL)
etl.hpp
Go to the documentation of this file.
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 
13 #pragma once
14 
15 //Common STL includes
16 #include "etl/std.hpp"
17 
18 //Metaprogramming utilities
19 #include "etl/tmp.hpp"
20 
21 // Utilities
22 #include "etl/impl_enums.hpp"
23 #include "etl/order.hpp"
24 #include "etl/sparse_storage.hpp"
25 #include "etl/config.hpp"
26 #include "etl/context.hpp"
27 #include "etl/parallel_session.hpp"
28 #include "etl/complex.hpp"
29 #include "etl/vectorization.hpp"
30 #include "etl/random.hpp"
31 #include "etl/duration.hpp"
32 #include "etl/threshold.hpp"
33 #include "etl/thread_engine.hpp"
34 #include "etl/memory.hpp"
35 #include "etl/allocator.hpp"
36 #include "etl/iterator.hpp"
37 #include "etl/util/counters.hpp"
38 #include "etl/util/variadic.hpp"
39 #include "etl/restrict.hpp"
40 #include "etl/eval_visitors.hpp" //Evaluation visitors
41 
42 // The base traits
43 #include "etl/traits_base.hpp"
44 #include "etl/concepts_base.hpp"
45 
46 //Forward declarations
47 #include "etl/value_fwd.hpp"
48 #include "etl/expr_fwd.hpp"
49 
50 // The traits
51 #include "etl/traits.hpp"
52 
53 // The concepts
54 #include "etl/concepts.hpp"
55 
56 // The helpers
57 #include "etl/helpers.hpp"
58 
59 // Opaque memory container
60 #include "etl/gpu_handler.hpp"
61 
62 // The operators
63 #include "etl/op/scalar.hpp"
64 #include "etl/op/transformers.hpp"
65 #include "etl/op/virtual_views.hpp"
66 #include "etl/op/unary_op.hpp"
67 #include "etl/op/binary_op.hpp"
68 #include "etl/op/generators.hpp"
69 
70 //Global test functions
71 #include "etl/globals.hpp"
72 
73 // Expressions helpers
74 #include "etl/checks.hpp"
76 
77 // The simple views
79 
80 // The parallel utilies
81 #include "etl/parallel_support.hpp"
82 
83 // The evaluator
84 #include "etl/evaluator.hpp"
85 
86 // CRTP classes
87 #include "etl/crtp/assignable.hpp"
90 #include "etl/crtp/dim_testable.hpp"
91 #include "etl/crtp/iterable.hpp"
92 
93 // The complex expressions
94 #include "etl/expr/transpose_expr.hpp"
95 #include "etl/expr/transpose_front_expr.hpp"
96 #include "etl/expr/bias_batch_mean_2d_expr.hpp"
97 #include "etl/expr/bias_batch_mean_4d_expr.hpp"
98 #include "etl/expr/bias_batch_var_2d_expr.hpp"
99 #include "etl/expr/bias_batch_var_4d_expr.hpp"
100 #include "etl/expr/bias_add_2d_expr.hpp"
101 #include "etl/expr/bias_add_4d_expr.hpp"
102 #include "etl/expr/pool_upsample_2d_expr.hpp"
103 #include "etl/expr/pool_upsample_3d_expr.hpp"
104 #include "etl/expr/dyn_pool_upsample_2d_expr.hpp"
105 #include "etl/expr/dyn_pool_upsample_3d_expr.hpp"
106 #include "etl/expr/pool_derivative_expr.hpp"
107 #include "etl/expr/dyn_pool_derivative_expr.hpp"
108 #include "etl/expr/pool_2d_expr.hpp"
109 #include "etl/expr/dyn_pool_2d_expr.hpp"
110 #include "etl/expr/pool_3d_expr.hpp"
111 #include "etl/expr/dyn_pool_3d_expr.hpp"
112 #include "etl/expr/upsample_2d_expr.hpp"
113 #include "etl/expr/dyn_upsample_2d_expr.hpp"
114 #include "etl/expr/upsample_3d_expr.hpp"
115 #include "etl/expr/dyn_upsample_3d_expr.hpp"
116 #include "etl/expr/prob_pool_2d_expr.hpp"
117 #include "etl/expr/dyn_prob_pool_2d_expr.hpp"
118 #include "etl/expr/convmtx_2d_expr.hpp"
119 #include "etl/expr/fft_expr.hpp"
120 #include "etl/expr/gemm_expr.hpp"
121 #include "etl/expr/gemv_expr.hpp"
122 #include "etl/expr/gevm_expr.hpp"
123 #include "etl/expr/outer_product_expr.hpp"
124 #include "etl/expr/batch_outer_product_expr.hpp"
125 #include "etl/expr/inv_expr.hpp"
126 #include "etl/expr/conv_1d_valid_expr.hpp"
127 #include "etl/expr/conv_1d_same_expr.hpp"
128 #include "etl/expr/conv_1d_full_expr.hpp"
129 #include "etl/expr/conv_2d_valid_expr.hpp"
130 #include "etl/expr/conv_2d_same_expr.hpp"
131 #include "etl/expr/conv_2d_full_expr.hpp"
132 #include "etl/expr/dyn_conv_2d_valid_expr.hpp"
133 #include "etl/expr/conv_2d_valid_multi_expr.hpp"
134 #include "etl/expr/conv_2d_same_multi_expr.hpp"
135 #include "etl/expr/conv_2d_full_multi_expr.hpp"
136 #include "etl/expr/dyn_conv_2d_valid_multi_expr.hpp"
137 #include "etl/expr/conv_2d_valid_multi_multi_expr.hpp"
138 #include "etl/expr/dyn_conv_2d_valid_multi_multi_expr.hpp"
139 #include "etl/expr/conv_4d_full_expr.hpp"
140 #include "etl/expr/conv_4d_valid_expr.hpp"
141 #include "etl/expr/conv_4d_valid_filter_expr.hpp"
142 #include "etl/expr/conv_4d_valid_back_expr.hpp"
143 #include "etl/expr/dyn_conv_4d_valid_expr.hpp"
144 #include "etl/expr/dyn_conv_4d_valid_filter_expr.hpp"
145 #include "etl/expr/dyn_conv_4d_valid_back_expr.hpp"
146 #include "etl/expr/conv_2d_full_deep_expr.hpp"
147 #include "etl/expr/conv_2d_same_deep_expr.hpp"
148 #include "etl/expr/conv_2d_valid_deep_expr.hpp"
149 #include "etl/expr/conv_2d_backward_expr.hpp"
150 #include "etl/expr/dyn_conv_2d_backward_expr.hpp"
151 #include "etl/expr/conv_4d_backward_expr.hpp"
152 #include "etl/expr/dyn_conv_4d_backward_expr.hpp"
153 #include "etl/expr/conv_4d_backward_filter_expr.hpp"
154 #include "etl/expr/dyn_conv_4d_backward_filter_expr.hpp"
155 #include "etl/expr/batch_softmax_expr.hpp"
156 #include "etl/expr/embedding_lookup_expr.hpp"
157 #include "etl/expr/batch_embedding_lookup_expr.hpp"
158 #include "etl/expr/embedding_gradients_expr.hpp"
159 #include "etl/expr/batch_embedding_gradients_expr.hpp"
160 
161 // The expressions building
163 
164 // The expressions
165 #include "etl/op/dim_view.hpp"
166 #include "etl/op/slice_view.hpp"
167 #include "etl/op/sub_view.hpp"
168 #include "etl/op/sub_matrix_2d.hpp"
169 #include "etl/op/sub_matrix_3d.hpp"
170 #include "etl/op/sub_matrix_4d.hpp"
173 #include "etl/expr/binary_expr.hpp"
174 #include "etl/expr/unary_expr.hpp"
177 #include "etl/expr/serial_expr.hpp"
180 #include "etl/expr/timed_expr.hpp"
181 
182 // The expressions building
187 
188 // The optimizer
189 #include "etl/optimizer.hpp"
190 
191 // The value classes implementation
193 #include "etl/fast.hpp"
194 #include "etl/dyn.hpp"
195 #include "etl/sparse.hpp"
196 #include "etl/custom_dyn.hpp"
197 #include "etl/custom_fast.hpp"
198 #include "etl/gpu_dyn.hpp"
199 
200 // The adapters
203 #include "etl/adapters/diagonal.hpp"
204 #include "etl/adapters/lower.hpp"
207 #include "etl/adapters/upper.hpp"
210 #include "etl/adapters.hpp"
211 
212 // Serialization support
213 #include "etl/serializer.hpp"
214 #include "etl/deserializer.hpp"
215 
216 // to_string support
217 #include "etl/print.hpp"
218 
219 // exit support
220 #include "etl/exit.hpp"
Use CRTP technique to inject assign operations into expressions and value classes.
Contains diagonal matrix implementation.
Contains all the operators and functions to build expressions.
Contains uni lower triangular matrix implementation.
Utility header including all enumerations headers.
Contains unary expression implementations.
Use CRTP technique to inject functions for iterators.
Contains the sub_matrix_3d implementation.
Use CRTP technique to inject functions creating new expressions.
Contains runtime matrix implementation.
Contains an expression that is forced to be executed serially.
Contains runtime matrix implementation.
Contains forward declarations and using declarations for the various value types. ...
Contains runtime-sized custom matrix implementation.
Contains upper triangular matrix implementation.
Contains the unary operators for the unary expression.
Restrict macros.
Contains uni upper triangular matrix implementation.
Implementation of dyn_matrix_view.
Contains the sub_matrix_4d implementation.
Contains thresholds to select implementations based on the expression size.
Contains generators.
Contains generator expressions.
Contains all the operators and functions to build multiplication expressions.
Contains allocation utilities.
Contains an expression that is forced to be executed in parallel.
Contains custom static matrix implementation.
Contains hermitian matrix view implementation.
Use CRTP technique to inject functions that test the values of the expressions or the value classes...
Contains static matrix implementation.
The evaluator is responsible for assigning one expression to another.
slice_view expression implementation
Contains strictly lower triangular matrix implementation.
Produces exit utility when necessary.
memory_slice_view expression implementation
Contains runtime matrix implementation.
Contains utilities for random generation.
Contains an expression whose implementation is selected.
Contains lower triangular matrix implementation.
dim_view expression implementation
Contains the fast_matrix_view implementation.
Contains the sub_view implementation.
Contains some special helpers for machine learning.
Contains utility checks.
Use CRTP technique to inject inplace operations into expressions and value classes.
Iterator implementation for ETL expressions.
Contains binary operators.
Contains upper triangular matrix implementation.
Containers the sparse_storage enum.
Contains a timed expression implementation.
Contains an optimized expression implementation.
Contains some global functions.
Contains the visitors used by the evaluator to process the expression trees.
Contains scalar expression implementation.
Contains the sub_matrix_2d implementation.
Contains all the operators and functions to build binary expressions.
Contains internal helpers to build expressions.
Contains all the operators and functions to build convolution expressions.
Standard memory utilities.
Contains vectorization utilities for the vectorized assignments (done by the evaluator).
binary-compatible std::complex faster implementation
Contains some global functions for adapters.