Expression Templates Library (ETL)
Classes | Typedefs | Enumerations | Functions | Variables
etl Namespace Reference

Root namespace for the ETL library. More...

Classes

struct  abs_unary_op
 Unary operation taking the absolute value. More...
 
struct  adapter
 A base class for adapters. More...
 
struct  aligned_allocator
 Allocated for aligned memory. More...
 
struct  aligned_ptr
 RAII wrapper for allocated aligned memory. More...
 
struct  aligned_vector_impl
 
struct  aligned_vector_impl< bool, A >
 
struct  argmax_transformer
 Transform (dynamic) that returns only the maximum elements from the right dimensions. More...
 
struct  argmin_transformer
 Transform (dynamic) that returns only the maximum elements from the right dimensions. More...
 
struct  assignable
 CRTP class to inject assign operations to matrix and vector structures. More...
 
struct  base_temporary_expr
 A temporary expression base. More...
 
struct  base_temporary_expr_bin
 Abstract base class for temporary binary expression. More...
 
struct  base_temporary_expr_tern
 Abstract base class for temporary ternary expression. More...
 
struct  base_temporary_expr_un
 Abstract base class for temporary unary expression. More...
 
struct  batch_embedding_gradients_expr
 A transposition expression. More...
 
struct  batch_embedding_lookup_expr
 A transposition expression. More...
 
struct  batch_k_minus_scale_expr
 
struct  batch_k_scale_expr
 A transposition expression. More...
 
struct  batch_k_scale_plus_expr
 
struct  batch_outer_product_expr
 A transposition expression. More...
 
struct  batch_softmax_expr
 A batch softmax function expression. More...
 
struct  bernoulli_unary_g_op
 Unary operation sampling with a Bernoulli distribution. More...
 
struct  bernoulli_unary_op
 Unary operation sampling with a Bernoulli distribution. More...
 
struct  bias_add_2d_expr
 A transposition expression. More...
 
struct  bias_add_4d_expr
 A transposition expression. More...
 
struct  bias_batch_mean_2d_expr
 A transposition expression. More...
 
struct  bias_batch_mean_4d_expr
 A transposition expression. More...
 
struct  bias_batch_var_2d_expr
 A transposition expression. More...
 
struct  bias_batch_var_4d_expr
 A transposition expression. More...
 
struct  binary_expr
 A binary expression. More...
 
struct  build_matrix_type
 TMP struct to build fast matrix type from a fast expression type. More...
 
struct  build_matrix_type< M, std::index_sequence< I... > >
 TMP struct to build fast matrix type from a fast expression type. More...
 
struct  cbrt_unary_op
 Unary operation taking the cubic root value. More...
 
struct  cbrt_unary_op< etl::complex< TT > >
 Unary operation taking the cubic root value. More...
 
struct  cbrt_unary_op< std::complex< TT > >
 Unary operation taking the cubic root value. More...
 
struct  ceil_unary_op
 Unary operation rounding up the value. More...
 
struct  clip_scalar_op
 Unary operation that clips all values between two scalars. More...
 
struct  complex
 Complex number implementation. More...
 
struct  conj_unary_op
 Unary operation computing the conjugate value of complex number. More...
 
struct  context
 The contextual configuration of ETL. More...
 
struct  conv_1d_full_expr
 A transposition expression. More...
 
struct  conv_1d_same_expr
 A transposition expression. More...
 
struct  conv_1d_valid_expr
 A transposition expression. More...
 
struct  conv_2d_backward_expr
 Expression representing the transposed 2D convolution of an image with a kernel. More...
 
struct  conv_2d_full_deep_expr
 A transposition expression. More...
 
struct  conv_2d_full_expr
 A transposition expression. More...
 
struct  conv_2d_full_multi_expr
 A transposition expression. More...
 
struct  conv_2d_same_deep_expr
 A transposition expression. More...
 
struct  conv_2d_same_expr
 A transposition expression. More...
 
struct  conv_2d_same_multi_expr
 A transposition expression. More...
 
struct  conv_2d_valid_deep_expr
 A transposition expression. More...
 
struct  conv_2d_valid_expr
 Expression representing the 2D 'valid' convolution of an image with a kernel. More...
 
struct  conv_2d_valid_multi_expr
 A transposition expression. More...
 
struct  conv_2d_valid_multi_multi_expr
 Expression for the 'valid' convolution of several kernels with several input images. More...
 
struct  conv_4d_backward_expr
 Expression representing a batch of transposed 2D convolution of an batch of image with a set of kernel. More...
 
struct  conv_4d_backward_filter_expr
 A transposition expression. More...
 
struct  conv_4d_full_expr
 A transposition expression. More...
 
struct  conv_4d_valid_back_expr
 A transposition expression. More...
 
struct  conv_4d_valid_expr
 A transposition expression. More...
 
struct  conv_4d_valid_filter_expr
 A transposition expression. More...
 
struct  convmtx_2d_expr
 A transposition expression. More...
 
struct  cos_unary_op
 Unary operation computing the cosinus. More...
 
struct  cos_unary_op< etl::complex< TT > >
 Unary operation computing the cosinus. More...
 
struct  cosh_unary_op
 Unary operation computing the hyperbolic cosinus. More...
 
struct  cosh_unary_op< etl::complex< TT > >
 Unary operation computing the hyperbolic cosinus. More...
 
struct  custom_dyn_matrix_impl
 Matrix with run-time fixed dimensions. More...
 
struct  custom_fast_matrix_impl
 Matrix with compile-time fixed dimensions. More...
 
struct  dense_dyn_base
 Dense Matrix with run-time fixed dimensions. The matrix support an arbitrary number of dimensions. More...
 
struct  dereference_op
 Functor that dereference a pointer and return its value. More...
 
struct  deserializer
 A deserializer for ETL expressions. More...
 
struct  diagonal_exception
 Exception that is thrown when an operation is made to a diagonal matrix that would render it non-diagonal. More...
 
struct  diagonal_matrix
 A diagonal matrix adapter. More...
 
struct  dim_testable
 CRTP class to inject functions testing the dimensions. More...
 
struct  dim_view
 View that shows one dimension of a matrix. More...
 
struct  div_binary_op
 Binary operator for scalar division. More...
 
struct  dropout_mask_generator_g_op
 Generator from an uniform distribution using a custom random engine. More...
 
struct  dropout_mask_generator_op
 Generator from an uniform distribution. More...
 
struct  dyn_conv_2d_backward_expr
 Expression representing the transposed 2D convolution of an image with a kernel. More...
 
struct  dyn_conv_2d_valid_expr
 A transposition expression. More...
 
struct  dyn_conv_2d_valid_multi_expr
 Expression for the 'valid' convolution of several kernels with one input image. More...
 
struct  dyn_conv_2d_valid_multi_multi_expr
 Expression for the 'valid' convolution of several kernels with one input image. More...
 
struct  dyn_conv_4d_backward_expr
 Expression representing a batch of transposed 2D convolution of an batch of image with a set of kernel. More...
 
struct  dyn_conv_4d_backward_filter_expr
 Expression representing a batch of transposed 2D convolution of an batch of image with a set of kernel. More...
 
struct  dyn_conv_4d_valid_back_expr
 A transposition expression. More...
 
struct  dyn_conv_4d_valid_expr
 A transposition expression. More...
 
struct  dyn_conv_4d_valid_filter_expr
 A transposition expression. More...
 
struct  dyn_convmtx2_transformer
 Transform that applies a convmtx2 transformation on a matrix. More...
 
struct  dyn_convmtx_transformer
 Transform that applies a convmtx transformation on a matrix. More...
 
struct  dyn_matrix_impl
 Matrix with run-time fixed dimensions. More...
 
struct  dyn_matrix_view
 
struct  dyn_pool_2d_expr
 A transposition expression. More...
 
struct  dyn_pool_3d_expr
 A transposition expression. More...
 
struct  dyn_pool_derivative_expr
 A transposition expression. More...
 
struct  dyn_pool_upsample_2d_expr
 A derivative of the 2D max pooling (combine derivative and upsampling for performance) More...
 
struct  dyn_pool_upsample_3d_expr
 A derivative of the 3D max pooling (combine derivative and upsampling for performance) More...
 
struct  dyn_prob_pool_2d_expr
 A transposition expression. More...
 
struct  dyn_rep_l_transformer
 Transform (dynamic) that repeats the expression to the left. More...
 
struct  dyn_rep_r_transformer
 Transform (dynamic) that repeats the expression to the right. More...
 
struct  dyn_upsample_2d_expr
 A transposition expression. More...
 
struct  dyn_upsample_3d_expr
 A transposition expression. More...
 
struct  embedding_gradients_expr
 A transposition expression. More...
 
struct  embedding_lookup_expr
 A transposition expression. More...
 
struct  equal_binary_op
 Binary operator for element wise equality. More...
 
struct  etl_traits
 Traits to get information about ETL types. More...
 
struct  etl_traits< diagonal_matrix< Matrix > >
 Traits specialization for diagonal_matrix. More...
 
struct  etl_traits< dyn_convmtx2_transformer< E > >
 Specialization for dyn_convmtx2_transformer. More...
 
struct  etl_traits< dyn_convmtx_transformer< E > >
 Specialization for dyn_convmtx_transformer. More...
 
struct  etl_traits< dyn_rep_l_transformer< T, D > >
 Specialization for dyn_rep_l_transformer. More...
 
struct  etl_traits< dyn_rep_r_transformer< T, D > >
 Specialization for dyn_rep_r_transformer. More...
 
struct  etl_traits< etl::batch_embedding_gradients_expr< A, B, C > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::batch_embedding_lookup_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::batch_k_minus_scale_expr< A, B, C > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::batch_k_scale_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::batch_k_scale_plus_expr< A, B, C > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::batch_outer_product_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::batch_softmax_expr< A, Stable > >
 Traits for an unary function expression. More...
 
struct  etl_traits< etl::bias_add_2d_expr< A, B > >
 Traits for a bias_add_2d expression. More...
 
struct  etl_traits< etl::bias_add_4d_expr< A, B > >
 Traits for a bias_add expression. More...
 
struct  etl_traits< etl::bias_batch_mean_2d_expr< A, Mean > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::bias_batch_mean_4d_expr< A, Mean > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::bias_batch_var_2d_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::bias_batch_var_4d_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::binary_expr< T, LE, BinaryOp, RE > >
 Specialization for binary_expr. More...
 
struct  etl_traits< etl::conv_1d_full_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_1d_same_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_1d_valid_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_backward_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a backward convolution expression. More...
 
struct  etl_traits< etl::conv_2d_full_deep_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_full_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_full_multi_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_same_deep_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_same_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_same_multi_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_valid_deep_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_valid_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_valid_multi_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_2d_valid_multi_multi_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_4d_backward_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_4d_backward_filter_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_4d_full_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_4d_valid_back_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_4d_valid_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::conv_4d_valid_filter_expr< A, B, S1, S2, P1, P2, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::convmtx_2d_expr< A, K1, K2 > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dim_view< T, D > >
 Specialization for dim_view. More...
 
struct  etl_traits< etl::dyn_conv_2d_backward_expr< A, B, Flipped > >
 Traits for a backward convolution expression. More...
 
struct  etl_traits< etl::dyn_conv_2d_valid_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_conv_2d_valid_multi_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_conv_2d_valid_multi_multi_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_conv_4d_backward_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_conv_4d_backward_filter_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_conv_4d_valid_back_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_conv_4d_valid_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_conv_4d_valid_filter_expr< A, B, Flipped > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_matrix_view< T, D > >
 Specialization for dyn_matrix_view. More...
 
struct  etl_traits< etl::dyn_pool_2d_expr< A, Impl > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_pool_3d_expr< A, Impl > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_pool_derivative_expr< A, B, Impl > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_pool_upsample_2d_expr< A, B, C, Max > >
 Traits for a pooling usample expression. More...
 
struct  etl_traits< etl::dyn_pool_upsample_3d_expr< A, B, C, Max > >
 Traits for a pooling usample expression. More...
 
struct  etl_traits< etl::dyn_prob_pool_2d_expr< A > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_upsample_2d_expr< A > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::dyn_upsample_3d_expr< A > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::embedding_gradients_expr< A, B, C > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::embedding_lookup_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::fast_magic_view< V, N > >
 traits speciflization for fast_magic_view More...
 
struct  etl_traits< etl::fast_matrix_view< T, DMA, Dims... > >
 Specialization for fast_matrix_view. More...
 
struct  etl_traits< etl::fft_expr< A, T, Impl > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::gemm_expr< A, B, Strassen > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::gemv_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::generator_expr< Generator > >
 Specialization generator_expr. More...
 
struct  etl_traits< etl::gevm_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::inv_expr< A > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::magic_view< V > >
 traits speciflization for magic_view More...
 
struct  etl_traits< etl::memory_slice_view< T, Aligned > >
 Specialization for memory_slice_view. More...
 
struct  etl_traits< etl::optimized_expr< Expr > >
 Specilization of the traits for optimized_expr Optimized expression simply use the same traits as its expression. More...
 
struct  etl_traits< etl::outer_product_expr< A, B > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::parallel_expr< Expr > >
 Specilization of the traits for parallel_expr parallel expression simply use the same traits as its expression. More...
 
struct  etl_traits< etl::pool_2d_expr< A, C1, C2, S1, S2, P1, P2, Impl > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::pool_3d_expr< A, C1, C2, C3, S1, S2, S3, P1, P2, P3, Impl > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::pool_derivative_expr< A, B, C1, C2, C3, S1, S2, S3, P1, P2, P3, Impl > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::pool_upsample_2d_expr< A, B, C, C1, C2, S1, S2, P1, P2, Max > >
 Traits for a pooling usample expression. More...
 
struct  etl_traits< etl::pool_upsample_3d_expr< A, B, C, C1, C2, C3, Max > >
 Traits for a pooling usample expression. More...
 
struct  etl_traits< etl::prob_pool_2d_expr< A, C1, C2 > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::scalar< T > >
 Specialization scalar. More...
 
struct  etl_traits< etl::serial_expr< Expr > >
 Specilization of the traits for serial_expr Serial expression simply use the same traits as its expression. More...
 
struct  etl_traits< etl::slice_view< T > >
 Specialization for slice_view. More...
 
struct  etl_traits< etl::sub_matrix_2d< T, Aligned > >
 Specialization for sub_matrix_2d. More...
 
struct  etl_traits< etl::sub_matrix_3d< T, Aligned > >
 Specialization for sub_matrix_3d. More...
 
struct  etl_traits< etl::sub_matrix_4d< T, Aligned > >
 Specialization for sub_matrix_4d. More...
 
struct  etl_traits< etl::sub_view< T, Aligned > >
 Specialization for sub_view. More...
 
struct  etl_traits< etl::timed_expr< Expr, R > >
 Specilization of the traits for timed_expr timed expression simply use the same traits as its expression. More...
 
struct  etl_traits< etl::transpose_expr< A > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::transpose_front_expr< A > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::unary_expr< T, Expr, UnaryOp > >
 Specialization unary_expr. More...
 
struct  etl_traits< etl::upsample_2d_expr< A, C1, C2, S1, S2, P1, P2 > >
 Traits for a transpose expression. More...
 
struct  etl_traits< etl::upsample_3d_expr< A, C1, C2, C3 > >
 Traits for a transpose expression. More...
 
struct  etl_traits< hermitian_matrix< Matrix > >
 Traits specialization for hermitian_matrix. More...
 
struct  etl_traits< lower_matrix< Matrix > >
 Traits specialization for lower_matrix. More...
 
struct  etl_traits< mm_mul_transformer< LE, RE > >
 Specialization for mm_mul_transformer. More...
 
struct  etl_traits< rep_l_transformer< T, D... > >
 Specialization for rep_l_transformer. More...
 
struct  etl_traits< rep_r_transformer< T, D... > >
 Specialization for rep_r_transformer. More...
 
struct  etl_traits< strictly_lower_matrix< Matrix > >
 Traits specialization for strictly_lower_matrix. More...
 
struct  etl_traits< strictly_upper_matrix< Matrix > >
 Traits specialization for strictly_upper_matrix. More...
 
struct  etl_traits< symmetric_matrix< Matrix > >
 Traits specialization for symmetric_matrix. More...
 
struct  etl_traits< uni_lower_matrix< Matrix > >
 Traits specialization for uni_lower_matrix. More...
 
struct  etl_traits< uni_upper_matrix< Matrix > >
 Traits specialization for uni_upper_matrix. More...
 
struct  etl_traits< upper_matrix< Matrix > >
 Traits specialization for upper_matrix. More...
 
struct  exp_unary_op
 Unary operation computing the exponential. More...
 
struct  expression_able
 CRTP class to inject functions creating new expressions. More...
 
struct  fast_magic_view
 A view (virtual) of a static magic matrix. More...
 
struct  fast_matrix_base
 
struct  fast_matrix_impl
 Matrix with compile-time fixed dimensions. More...
 
struct  fast_matrix_view
 
struct  fast_matrix_view< T, false, Dims... >
 View to represent a fast matrix in top of an expression. More...
 
struct  fast_matrix_view< T, true, Dims... >
 View to represent a fast matrix in top of an expression. More...
 
struct  fast_sigmoid_unary_op
 Unary operation computing a fast sigmoid approximation. More...
 
struct  fflip_transformer
 Transform (dynamic) that flips a matrix vertically and horizontally. More...
 
struct  fft_expr
 A transposition expression. More...
 
struct  floor_unary_op
 Unary operation rounding down the value. More...
 
struct  forward_op
 Functor that forwards a value. More...
 
struct  forward_op_nc
 Functor that forwards a value and removes the constness of it. More...
 
struct  gemm_expr
 A transposition expression. More...
 
struct  gemv_expr
 A transposition expression. More...
 
class  generator_expr
 A generator expression. More...
 
struct  get_intrinsic_traits
 Traits to get the intrinsic traits for a vector mode. More...
 
struct  get_vector_impl
 Traits to get the vector implementation for a vector mode. More...
 
struct  gevm_expr
 A transposition expression. More...
 
struct  gpu_dyn_matrix_impl
 GPU special Matrix with run-time fixed dimensions. More...
 
struct  gpu_memory_handler
 
struct  greater_binary_op
 Binary operator for element greater than comparison. More...
 
struct  greater_equal_binary_op
 Binary operator for element greater than or equal comparison. More...
 
struct  hermitian_exception
 Exception that is thrown when an operation is made to a hermitian matrix that would render it non-hermitian. More...
 
struct  hermitian_matrix
 A hermitian matrix adapter. More...
 
struct  hflip_transformer
 Transform (dynamic) that flips a matrix horizontally. More...
 
struct  identity_op
 Simple unary op for identity operations. More...
 
struct  imag_unary_op
 Unary operation extracting the imag part of a complex number. More...
 
struct  inplace_assignable
 CRTP class to inject inplace operations to matrix and vector structures. More...
 
struct  integer_pow_binary_op
 Binary operator for scalar power with an integer as the exponent. More...
 
struct  integer_range_impl
 Implementation for TMP utility to hold a range of integers. More...
 
struct  integer_range_impl< Int, std::integer_sequence< Int, N... >, Begin >
 Implementation for TMP utility to hold a range of integers. More...
 
struct  inv_expr
 A transposition expression. More...
 
struct  invcbrt_unary_op
 Unary operation taking the inverse cubic root value. More...
 
struct  invcbrt_unary_op< etl::complex< TT > >
 Unary operation taking the inverse cubic root value. More...
 
struct  invcbrt_unary_op< std::complex< TT > >
 Unary operation taking the inverse cubic root value. More...
 
struct  inverted_dropout_mask_generator_g_op
 Generator from an uniform distribution using a custom random engine. More...
 
struct  inverted_dropout_mask_generator_op
 Generator from an uniform distribution. More...
 
struct  invsqrt_unary_op
 Unary operation taking the inverse square root value. More...
 
struct  invsqrt_unary_op< etl::complex< TT > >
 Unary operation taking the inverse square root value. More...
 
struct  is_2
 Traits to test if T is a specialization of TT<T, size_t> More...
 
struct  is_2< TT, TT< V1, R > >
 Traits to test if T is a specialization of TT<T, size_t> More...
 
struct  is_3
 Traits to test if T is a specialization of TT<T, size_t, size_t> More...
 
struct  is_3< TT, TT< V1, R1, R2 > >
 Traits to test if T is a specialization of TT<T, size_t, size_t> More...
 
struct  is_apxdbpy_left_left_impl
 
struct  is_apxdbpy_left_left_impl< binary_expr< T0, etl::scalar< T1 >, etl::plus_binary_op< T2 >, R1 >, binary_expr< T3, etl::scalar< T4 >, etl::plus_binary_op< T5 >, R2 > >
 
struct  is_apxdbpy_left_right_impl
 
struct  is_apxdbpy_left_right_impl< binary_expr< T0, etl::scalar< T1 >, etl::plus_binary_op< T2 >, R1 >, binary_expr< T3, R2, etl::plus_binary_op< T5 >, etl::scalar< T4 > > >
 
struct  is_apxdbpy_right_left_impl
 
struct  is_apxdbpy_right_left_impl< binary_expr< T0, R1, etl::plus_binary_op< T2 >, etl::scalar< T1 > >, binary_expr< T3, etl::scalar< T4 >, etl::plus_binary_op< T5 >, R2 > >
 
struct  is_apxdbpy_right_right_impl
 
struct  is_apxdbpy_right_right_impl< binary_expr< T0, R1, etl::plus_binary_op< T2 >, etl::scalar< T1 > >, binary_expr< T3, R2, etl::plus_binary_op< T5 >, etl::scalar< T4 > > >
 
struct  is_apxdby_left_impl
 
struct  is_apxdby_left_impl< binary_expr< T3, etl::scalar< T4 >, etl::plus_binary_op< T5 >, R2 >, R1 >
 
struct  is_apxdby_left_left_impl
 
struct  is_apxdby_left_left_impl< binary_expr< T0, etl::scalar< T1 >, etl::plus_binary_op< T2 >, R1 >, binary_expr< T3, etl::scalar< T4 >, etl::mul_binary_op< T5 >, R2 > >
 
struct  is_apxdby_left_right_impl
 
struct  is_apxdby_left_right_impl< binary_expr< T0, etl::scalar< T1 >, etl::plus_binary_op< T2 >, R1 >, binary_expr< T3, R2, etl::mul_binary_op< T5 >, etl::scalar< T4 > > >
 
struct  is_apxdby_right_impl
 
struct  is_apxdby_right_impl< binary_expr< T3, R2, etl::plus_binary_op< T5 >, etl::scalar< T4 > >, R1 >
 
struct  is_apxdby_right_left_impl
 
struct  is_apxdby_right_left_impl< binary_expr< T0, R1, etl::plus_binary_op< T2 >, etl::scalar< T1 > >, binary_expr< T3, etl::scalar< T4 >, etl::mul_binary_op< T5 >, R2 > >
 
struct  is_apxdby_right_right_impl
 
struct  is_apxdby_right_right_impl< binary_expr< T0, R1, etl::plus_binary_op< T2 >, etl::scalar< T1 > >, binary_expr< T3, R2, etl::mul_binary_op< T5 >, etl::scalar< T4 > > >
 
struct  is_axdbpy_left_impl
 
struct  is_axdbpy_left_impl< L, binary_expr< T0, etl::scalar< T1 >, etl::plus_binary_op< T2 >, RightExpr > >
 
struct  is_axdbpy_left_left_impl
 
struct  is_axdbpy_left_left_impl< binary_expr< T0, etl::scalar< T1 >, etl::mul_binary_op< T2 >, R1 >, binary_expr< T3, etl::scalar< T4 >, etl::plus_binary_op< T5 >, R2 > >
 
struct  is_axdbpy_left_right_impl
 
struct  is_axdbpy_left_right_impl< binary_expr< T0, etl::scalar< T1 >, etl::mul_binary_op< T2 >, R1 >, binary_expr< T3, R2, etl::plus_binary_op< T5 >, etl::scalar< T4 > > >
 
struct  is_axdbpy_right_impl
 
struct  is_axdbpy_right_impl< L, binary_expr< T0, RightExpr, etl::plus_binary_op< T2 >, etl::scalar< T1 > > >
 
struct  is_axdbpy_right_left_impl
 
struct  is_axdbpy_right_left_impl< binary_expr< T0, R1, etl::mul_binary_op< T2 >, etl::scalar< T1 > >, binary_expr< T3, etl::scalar< T4 >, etl::plus_binary_op< T5 >, R2 > >
 
struct  is_axdbpy_right_right_impl
 
struct  is_axdbpy_right_right_impl< binary_expr< T0, R1, etl::mul_binary_op< T2 >, etl::scalar< T1 > >, binary_expr< T3, R2, etl::plus_binary_op< T5 >, etl::scalar< T4 > > >
 
struct  is_axdy_left_left_impl
 
struct  is_axdy_left_left_impl< binary_expr< T0, etl::scalar< T1 >, etl::mul_binary_op< T2 >, RightExpr >, R >
 
struct  is_axdy_left_right_impl
 
struct  is_axdy_left_right_impl< binary_expr< T0, RightExpr, etl::mul_binary_op< T2 >, etl::scalar< T1 > >, R >
 
struct  is_axdy_right_left_impl
 
struct  is_axdy_right_left_impl< L, binary_expr< T0, etl::scalar< T1 >, etl::mul_binary_op< T2 >, RightExpr > >
 
struct  is_axdy_right_right_impl
 
struct  is_axdy_right_right_impl< L, binary_expr< T0, RightExpr, etl::mul_binary_op< T2 >, etl::scalar< T1 > > >
 
struct  is_axmy_left_impl
 
struct  is_axmy_left_impl< etl::scalar< T0 >, binary_expr< T1, LeftExpr, etl::mul_binary_op< T2 >, RightExpr > >
 
struct  is_axmy_left_left_impl
 
struct  is_axmy_left_left_impl< binary_expr< T1, etl::scalar< T0 >, etl::mul_binary_op< T2 >, RightExpr >, R >
 
struct  is_axmy_left_right_impl
 
struct  is_axmy_left_right_impl< binary_expr< T1, LeftExpr, etl::mul_binary_op< T2 >, etl::scalar< T0 > >, R >
 
struct  is_axmy_right_impl
 
struct  is_axmy_right_impl< binary_expr< T1, LeftExpr, etl::mul_binary_op< T2 >, RightExpr >, etl::scalar< T0 > >
 
struct  is_axmy_right_left_impl
 
struct  is_axmy_right_left_impl< L, binary_expr< T0, etl::scalar< T1 >, etl::mul_binary_op< T2 >, RightExpr > >
 
struct  is_axmy_right_right_impl
 
struct  is_axmy_right_right_impl< L, binary_expr< T0, RightExpr, etl::mul_binary_op< T2 >, etl::scalar< T1 > > >
 
struct  is_axpby_left_left_impl
 
struct  is_axpby_left_left_impl< binary_expr< LT1, etl::scalar< LT2 >, etl::mul_binary_op< LT3 >, LRightExpr >, binary_expr< RT1, etl::scalar< RT2 >, etl::mul_binary_op< RT3 >, RRightExpr > >
 
struct  is_axpby_left_right_impl
 
struct  is_axpby_left_right_impl< binary_expr< LT1, etl::scalar< LT2 >, etl::mul_binary_op< LT3 >, LRightExpr >, binary_expr< RT1, RLeftExpr, etl::mul_binary_op< RT3 >, etl::scalar< RT2 > > >
 
struct  is_axpby_right_left_impl
 
struct  is_axpby_right_left_impl< binary_expr< LT1, LLeftExpr, etl::mul_binary_op< LT3 >, etl::scalar< LT2 > >, binary_expr< RT1, etl::scalar< RT2 >, etl::mul_binary_op< RT3 >, RRightExpr > >
 
struct  is_axpby_right_right_impl
 
struct  is_axpby_right_right_impl< binary_expr< LT1, LLeftExpr, etl::mul_binary_op< LT3 >, etl::scalar< LT2 > >, binary_expr< RT1, RLeftExpr, etl::mul_binary_op< RT3 >, etl::scalar< RT2 > > >
 
struct  is_axpy_left_left_impl
 
struct  is_axpy_left_left_impl< binary_expr< T0, etl::scalar< T1 >, etl::mul_binary_op< T2 >, RightExpr >, R >
 
struct  is_axpy_left_right_impl
 
struct  is_axpy_left_right_impl< binary_expr< T0, LeftExpr, etl::mul_binary_op< T2 >, etl::scalar< T1 > >, R >
 
struct  is_axpy_right_left_impl
 
struct  is_axpy_right_left_impl< L, binary_expr< T0, etl::scalar< T1 >, etl::mul_binary_op< T2 >, RightExpr > >
 
struct  is_axpy_right_right_impl
 
struct  is_axpy_right_right_impl< L, binary_expr< T0, LeftExpr, etl::mul_binary_op< T2 >, etl::scalar< T1 > > >
 
struct  is_var
 Traits to test if T is a specialization of TT<T, size_t...> More...
 
struct  is_var< TT, TT< V1, R... > >
 Traits to test if T is a specialization of TT<T, size_t...> More...
 
struct  is_var_2
 Traits to test if T is a specialization of TT<T1, T2, size_t...> More...
 
struct  is_var_2< TT, TT< V1, V2, R... > >
 Traits to test if T is a specialization of TT<T1, T2, size_t...> More...
 
struct  iterable
 CRTP class to inject iterators functions. More...
 
struct  iterator
 Configurable iterator for ETL expressions. More...
 
struct  less_binary_op
 Binary operator for element less than comparison. More...
 
struct  less_equal_binary_op
 Binary operator for element less than or equal comparison. More...
 
struct  log10_unary_op
 Unary operation taking the logarithmic value (base 10) More...
 
struct  log10_unary_op< etl::complex< TT > >
 Unary operation taking the logarithmic value (base 10) More...
 
struct  log2_unary_op
 Unary operation taking the logarithmic value (base 2) More...
 
struct  log2_unary_op< etl::complex< TT > >
 
struct  log2_unary_op< std::complex< TT > >
 
struct  log_unary_op
 Unary operation taking the logarithmic value. More...
 
struct  log_unary_op< etl::complex< TT > >
 Unary operation taking the logarithmic value. More...
 
struct  logical_and_binary_op
 Binary operator for elementwise logical and computation. More...
 
struct  logical_or_binary_op
 Binary operator for elementwise logical OR computation. More...
 
struct  logical_xor_binary_op
 Binary operator for elementwise logical XOR computation. More...
 
struct  logistic_noise_unary_g_op
 Unary operation applying a logistic noise. More...
 
struct  logistic_noise_unary_op
 Unary operation applying a logistic noise. More...
 
struct  lower_exception
 Exception that is thrown when an operation is made to a lower triangular matrix that would render it non-lower triangular. More...
 
struct  lower_matrix
 A lower triangular matrix adapter. More...
 
struct  magic_view
 A view (virtual) of a dynamic magic matrix. More...
 
struct  mangling_faker
 Use of this type in the parameter with the size of a vector type fakes mangling. More...
 
struct  max_binary_op
 Binary operator for scalar maximum. More...
 
struct  mean_l_transformer
 Transform (dynamic) that averages the expression from the left, effectively removing the left dimension. More...
 
struct  mean_r_transformer
 Transform (dynamic) that averages the expression from the right, effectively removing the right dimension. More...
 
struct  memory_slice_view
 View that shows a slice of an expression. More...
 
struct  min_binary_op
 Binary operator for scalar minimum. More...
 
struct  minus_binary_op
 Binary operator for scalar subtraction. More...
 
struct  minus_unary_op
 Unary operation computing the minus operation. More...
 
struct  mm_mul_transformer
 Transform that applies a lazy matrix multiplication to two matrices. More...
 
struct  mod_binary_op
 Binary operator for scalar modulo. More...
 
struct  mul_binary_op
 Binary operator for scalar multiplication. More...
 
struct  no_intrinsic_traits
 Define traits to get vectorization information for types when no vector mode is available. More...
 
struct  no_vec
 Vectorization support when no vectorization is enabled. More...
 
struct  normal_generator_g_op
 Generator from a normal distribution using a custom random engine. More...
 
struct  normal_generator_op
 Generator from a normal distribution. More...
 
struct  normal_noise_unary_g_op
 Unary operation applying a normal noise. More...
 
struct  normal_noise_unary_op
 Unary operation applying a normal noise. More...
 
struct  not_equal_binary_op
 Binary operator for element wise inequality. More...
 
struct  one_if_binary_op
 Binary operator to get 1.0 if x equals to rhs value, 0 otherwise. More...
 
struct  one_if_max_sub_transformer
 Transformer to implement one if max sub on 2D matrix. More...
 
struct  optimizable
 Simple traits to test if an expression is optimizable. More...
 
struct  optimizable< etl::binary_expr< T, etl::scalar< T >, BinaryOp, etl::scalar< T > > >
 Simple traits to test if an expression is optimizable. More...
 
struct  optimizable< etl::binary_expr< T, etl::scalar< T >, BinaryOp, RightExpr > >
 Simple traits to test if an expression is optimizable. More...
 
struct  optimizable< etl::binary_expr< T, LeftExpr, BinaryOp, etl::scalar< T > > >
 Simple traits to test if an expression is optimizable. More...
 
struct  optimizable< etl::binary_expr< T, LeftExpr, BinaryOp, RightExpr > >
 Simple traits to test if an expression is optimizable. More...
 
struct  optimizable< etl::unary_expr< T, Expr, UnaryOp > >
 Simple traits to test if an expression is optimizable. More...
 
struct  optimized_expr
 A wrapper for expressions that need to be optimized. More...
 
struct  optimizer
 An optimizer for the given expression type. More...
 
struct  optimizer< etl::binary_expr< T, LeftExpr, BinaryOp, RightExpr > >
 An optimizer for binary expr. More...
 
struct  optimizer< etl::unary_expr< T, Expr, UnaryOp > >
 An optimizer for unary expr. More...
 
struct  outer_product_expr
 A transposition expression. More...
 
struct  parallel_expr
 A wrapper for expressions that is to be executed in parallel. More...
 
struct  plus_binary_op
 Binary operator for scalar addition. More...
 
struct  plus_unary_op
 Unary operation computing the plus operation. More...
 
struct  pool_2d_expr
 A transposition expression. More...
 
struct  pool_3d_expr
 A transposition expression. More...
 
struct  pool_derivative_expr
 A transposition expression. More...
 
struct  pool_upsample_2d_expr
 A derivative of the 2D max pooling (combine derivative and upsampling for performance) More...
 
struct  pool_upsample_3d_expr
 A derivative of the max pooling (combine derivative and upsampling for performance) More...
 
struct  pow_binary_op
 Binary operator for scalar power. More...
 
struct  precise_pow_binary_op
 Binary operator for scalar power with stable precision. More...
 
struct  prob_pool_2d_expr
 A transposition expression. More...
 
struct  ranged_noise_binary_g_op
 Binary operator for ranged noise generation. More...
 
struct  ranged_noise_binary_op
 Binary operator for ranged noise generation. More...
 
struct  real_unary_op
 Unary operation extracting the real part of a complex number. More...
 
struct  relu_derivative_binary_op
 Binary operator for relu derivative. More...
 
struct  relu_derivative_op
 Unary operation computing the derivate of the RELU operation. More...
 
struct  relu_unary_op
 Unary operation computing the RELU operation. More...
 
struct  rep_l_transformer
 Transform that repeats the expression to the left. More...
 
struct  rep_r_transformer
 Transform that repeats the expression to the right. More...
 
struct  rep_transformer
 Abstract repeat Transformer that repeats the expression to the right. More...
 
struct  reverse_bernoulli_unary_g_op
 Unary operation sampling with a reverse Bernoulli distribution. More...
 
struct  reverse_bernoulli_unary_op
 Unary operation sampling with a reverse Bernoulli distribution. More...
 
struct  safe_dimensions_impl
 Utility to get the dimensions of an expressions, with support for generator. More...
 
struct  scalar
 Represents a scalar value. More...
 
struct  selected_expr
 
struct  sequence_equal
 Traits to test if two index_sequence are equal. More...
 
struct  sequence_equal< std::index_sequence< I, I1... >, std::index_sequence< I, I2... >, std::enable_if_t< sizeof...(I1)==sizeof...(I2)> >
 Traits to test if two index_sequence are equal. More...
 
struct  sequence_equal< std::index_sequence< I1... >, std::index_sequence< I2... >, std::enable_if_t< sizeof...(I1) !=sizeof...(I2)> >
 Traits to test if two index_sequence are equal. More...
 
struct  sequence_equal< std::index_sequence< I11, I1... >, std::index_sequence< I21, I2... >, cpp::disable_if_t< I11==I21 > >
 Traits to test if two index_sequence are equal. More...
 
struct  sequence_equal< std::index_sequence<>, std::index_sequence<> >
 Traits to test if two index_sequence are equal. More...
 
struct  sequence_generator_op
 Generator from a sequence. More...
 
struct  serial_expr
 A wrapper for expressions that is forced to be serial. More...
 
struct  serializer
 A serializer for ETL expressions. More...
 
struct  sigmoid_derivative_binary_op
 Binary operator for sigmoid derivative. More...
 
struct  sigmoid_unary_op
 Unary operation computing the logistic sigmoid. More...
 
struct  sign_unary_op
 Unary operation computing the sign. More...
 
struct  simd_pack
 SIMD pack of some type, using a vector implementation type. More...
 
struct  simple_vector
 A simple std::vector to work with bool. More...
 
struct  sin_unary_op
 Unary operation computing the sinus. More...
 
struct  sin_unary_op< etl::complex< TT > >
 Unary operation computing the sinus. More...
 
struct  sinh_unary_op
 Unary operation computing the hyperbolic sinus. More...
 
struct  sinh_unary_op< etl::complex< TT > >
 Unary operation computing the hyperbolic sinus. More...
 
struct  slice_view
 
struct  softplus_unary_op
 Unary operation computing the softplus. More...
 
struct  sparse_matrix_impl
 Sparse matrix implementation. More...
 
struct  sqrt_unary_op
 Unary operation taking the square root value. More...
 
struct  sqrt_unary_op< etl::complex< TT > >
 Unary operation taking the square root value. More...
 
struct  state_bernoulli_unary_g_op
 Unary operation sampling with a Bernoulli distribution. More...
 
struct  state_bernoulli_unary_op
 Unary operation sampling with a Bernoulli distribution. More...
 
struct  state_dropout_mask_generator_g_op
 Generator from an uniform distribution using a custom random engine. More...
 
struct  state_dropout_mask_generator_op
 Generator from an uniform distribution. More...
 
struct  state_inverted_dropout_mask_generator_g_op
 Generator from an uniform distribution using a custom random engine. More...
 
struct  state_inverted_dropout_mask_generator_op
 Generator from an uniform distribution. More...
 
struct  state_logistic_noise_unary_g_op
 Unary operation applying a logistic noise. More...
 
struct  state_logistic_noise_unary_op
 Unary operation applying a logistic noise. More...
 
struct  stateful_op
 Simple unary op for stateful operations. More...
 
struct  strictly_lower_exception
 Exception that is thrown when an operation is made to a strictly lower triangular matrix that would render it non-strictly lower triangular. More...
 
struct  strictly_lower_matrix
 A strictly lower triangular matrix adapter. More...
 
struct  strictly_upper_exception
 Exception that is thrown when an operation is made to a strictly upper triangular matrix that would render it non-strictly-upper triangular. More...
 
struct  strictly_upper_matrix
 A strictly upper triangular matrix adapter. More...
 
struct  sub_matrix_2d
 View that shows a 2D sub matrix of an expression. More...
 
struct  sub_matrix_3d
 View that shows a 3d sub matrix of an expression. More...
 
struct  sub_matrix_4d
 View that shows a 4d sub matrix of an expression. More...
 
struct  sub_view
 
struct  sum_l_transformer
 Transform (dynamic) that sums the expression from the left, effectively removing the left dimension. More...
 
struct  sum_r_transformer
 Transform (dynamic) that sums the expression from the right, effectively removing the right dimension. More...
 
struct  symmetric_exception
 Exception that is thrown when an operation is made to a symmetric matrix that would render it non-symmetric. More...
 
struct  symmetric_matrix
 A symmetric matrix adapter. More...
 
struct  tan_unary_op
 Unary operation computing the tangent. More...
 
struct  tan_unary_op< etl::complex< TT > >
 Unary operation computing the tangent. More...
 
struct  tanh_unary_op
 Unary operation computing the hyperbolic tangent. More...
 
struct  tanh_unary_op< etl::complex< TT > >
 Unary operation computing the hyperbolic tangent. More...
 
struct  temporary_expr_bin
 
struct  thread_engine
 The default thread engine when auto-parallelization is not enabled. More...
 
struct  timed_expr
 A wrapper for expressions that need to be timed. More...
 
struct  transform_op
 Simple unary op for transform operations. More...
 
struct  transformer
 Transformer functor for optimizable expression. More...
 
struct  transformer< etl::binary_expr< T, etl::scalar< T >, BinaryOp, etl::scalar< T > > >
 Transformer functor for optimizable expression. More...
 
struct  transformer< etl::binary_expr< T, etl::scalar< T >, BinaryOp, RightExpr > >
 Transformer functor for optimizable expression. More...
 
struct  transformer< etl::binary_expr< T, LeftExpr, BinaryOp, etl::scalar< T > > >
 Transformer functor for optimizable expression. More...
 
struct  transformer< etl::unary_expr< T, Expr, UnaryOp > >
 Transformer functor for optimizable expression. More...
 
struct  transpose_expr
 A transposition expression. More...
 
struct  transpose_front_expr
 A transposition expression for the first layers. More...
 
struct  truncated_normal_generator_g_op
 Generator from a normal distribution using a custom random engine. More...
 
struct  truncated_normal_generator_op
 Generator from a normal distribution. More...
 
struct  unary_expr
 An unary expression. More...
 
struct  unary_expr< T, Expr, identity_op >
 Specialization of unary expression for identity op. More...
 
struct  unary_expr< T, Expr, stateful_op< Op > >
 Specialization of unary expression for stateful op. More...
 
struct  unary_expr< T, Expr, transform_op >
 Specialization of unary expression for transform op. More...
 
struct  uni_lower_exception
 Exception that is thrown when an operation is made to a uni lower triangular matrix that would render it non-uni lower triangular. More...
 
struct  uni_lower_matrix
 A uni lower triangular matrix adapter. More...
 
struct  uni_upper_exception
 Exception that is thrown when an operation is made to a uni upper triangular matrix that would render it non-uni upper triangular. More...
 
struct  uni_upper_matrix
 A uni upper triangular matrix adapter. More...
 
struct  uniform_generator_g_op
 Generator from an uniform distribution using a custom random engine. More...
 
struct  uniform_generator_op
 Generator from an uniform distribution. More...
 
struct  uniform_noise_unary_g_op
 Unary operation applying an uniform noise (0.0, 1.0(. More...
 
struct  uniform_noise_unary_op
 Unary operation applying an uniform noise (0.0, 1.0(. More...
 
struct  upper_exception
 Exception that is thrown when an operation is made to a upper triangular matrix that would render it non-upper triangular. More...
 
struct  upper_matrix
 A upper triangular matrix adapter. More...
 
struct  upsample_2d_expr
 An upsample expression. More...
 
struct  upsample_3d_expr
 An upsample expression. More...
 
struct  value_testable
 CRTP class to inject functions testing values of the expressions. More...
 
struct  values_t
 Simple collection of values to initialize a dyn matrix. More...
 
struct  vflip_transformer
 Transform (dynamic) that flips a matrix vertically. More...
 
struct  wrapper_traits
 Traits for wrapper expressions. More...
 

Typedefs

using seconds = std::chrono::seconds
 The seconds resolution.
 
using milliseconds = std::chrono::milliseconds
 The milliseconds resolution.
 
using microseconds = std::chrono::microseconds
 The microseconds resolution.
 
using nanoseconds = std::chrono::nanoseconds
 The nanoseconds resolution.
 
using timer_clock = std::chrono::steady_clock
 The chrono clock used by ETL.
 
using clock_resolution = nanoseconds
 The clock resolution used by ETL.
 
using iterable_base_type = iterable< this_type, false >
 The iterable base type.
 
using assignable_base_type = assignable< this_type, value_t< T > >
 The assignable base type. More...
 
using sub_type = T
 The sub type.
 
using value_type = value_t< sub_type >
 The value contained in the expression. More...
 
using memory_type = memory_t< sub_type >
 The memory acess type. More...
 
using const_memory_type = const_memory_t< sub_type >
 The const memory access type. More...
 
using return_type = return_helper< sub_type, decltype(std::declval< sub_type >()[0])>
 The type returned by the view.
 
using const_return_type = const_return_helper< sub_type, decltype(std::declval< sub_type >()[0])>
 The const type return by the view.
 
using iterator = etl::iterator< this_type >
 The iterator type.
 
using const_iterator = etl::iterator< const this_type >
 The const iterator type.
 
template<typename V = default_vec>
using vec_type = typename V::template vec_type< value_type >
 The vectorization type for V.
 
template<typename T >
using dropout_distribution = std::conditional_t< std::is_floating_point_v< T >, std::uniform_real_distribution< T >, std::uniform_int_distribution< T > >
 Selector helper to get an dropout_distribution based on the type (real or int) More...
 
template<typename T >
using uniform_distribution = std::conditional_t< std::is_floating_point_v< T >, std::uniform_real_distribution< T >, std::uniform_int_distribution< T > >
 Selector helper to get an uniform_distribution based on the type (real or int) More...
 
using this_type = sub_view< T, Aligned >
 The type of this expression. More...
 
using random_engine = std::mt19937_64
 The random engine used by the library.
 
using base_type = dyn_base< this_type, T, D >
 The base type.
 
using reference_type = sparse_detail::sparse_reference< this_type >
 The type of reference returned by the functions.
 
using const_reference_type = sparse_detail::sparse_reference< const this_type >
 The type of const reference returned by the functions.
 
using dimension_storage_impl = std::array< size_t, n_dimensions >
 The type used to store the dimensions.
 
using index_type = size_t
 The type used to store the COO index.
 
using index_memory_type = index_type *
 The memory type to the COO index.
 
template<typename E >
using decay_traits = etl_traits< std::decay_t< E > >
 Traits helper to get information about ETL types, the type is first decayed. More...
 
template<typename E >
using value_t = typename decay_traits< E >::value_type
 Traits to extract the value type out of an ETL type.
 
template<typename S >
using memory_t = std::conditional_t< std::is_const_v< std::remove_reference_t< S > >, typename std::decay_t< S >::const_memory_type, typename std::decay_t< S >::memory_type >
 Traits to extract the direct memory type out of an ETL type.
 
template<typename S >
using const_memory_t = typename std::decay_t< S >::const_memory_type
 Traits to extract the direct const memory type out of an ETL type.
 
template<typename Int , Int Begin, Int End>
using make_integer_range = typename integer_range_impl< Int, std::make_integer_sequence< Int, End - Begin >, Begin >::type
 Helper to create an integer_range of numbers.
 
template<size_t Begin, size_t End>
using make_index_range = make_integer_range< size_t, Begin, End >
 Helper to create an integer_range of size_t numbers.
 
template<typename T >
using remove_const_deep = std::conditional_t< std::is_lvalue_reference_v< T >, std::add_lvalue_reference_t< std::remove_cvref_t< T > >, std::remove_const_t< T > >
 
template<typename T , typename S >
using return_helper = 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 > >>
 
template<typename T , typename S >
using const_return_helper = std::conditional_t< std::is_lvalue_reference_v< S >, const value_t< T > &, value_t< T > >
 
template<typename T , std::size_t A>
using aligned_vector = typename aligned_vector_impl< T, A >::type
 
template<typename T , std::size_t S, std::size_t A>
using aligned_array = cpp::aligned_array< T, S, A >
 
template<typename T , size_t... Dims>
using fast_matrix = fast_matrix_impl< T, aligned_array< T, alloc_size_mat< T, Dims... >(), default_intrinsic_traits< T >::alignment >, order::RowMajor, Dims... >
 A static matrix with fixed dimensions, in row-major order.
 
template<typename T , size_t... Dims>
using fast_matrix_cm = fast_matrix_impl< T, aligned_array< T, alloc_size_mat< T, Dims... >(), default_intrinsic_traits< T >::alignment >, order::ColumnMajor, Dims... >
 A static matrix with fixed dimensions, in column-major order.
 
template<typename T , size_t Rows>
using fast_vector = fast_matrix_impl< T, aligned_array< T, alloc_size_vec< T >(Rows), default_intrinsic_traits< T >::alignment >, order::RowMajor, Rows >
 A static vector with fixed dimensions, in row-major order.
 
template<typename T , size_t Rows>
using fast_vector_cm = fast_matrix_impl< T, aligned_array< T, alloc_size_vec< T >(Rows), default_intrinsic_traits< T >::alignment >, order::ColumnMajor, Rows >
 A static vector with fixed dimensions, in column-major order.
 
template<typename T , size_t Rows>
using fast_dyn_vector = fast_matrix_impl< T, etl::aligned_vector< T, default_intrinsic_traits< T >::alignment >, order::RowMajor, Rows >
 A hybrid vector with fixed dimensions, in row-major order.
 
template<typename T , size_t... Dims>
using fast_dyn_matrix = fast_matrix_impl< T, etl::aligned_vector< T, default_intrinsic_traits< T >::alignment >, order::RowMajor, Dims... >
 A hybrid matrix with fixed dimensions, in row-major order.
 
template<typename T , order SO, size_t... Dims>
using fast_dyn_matrix_o = fast_matrix_impl< T, etl::aligned_vector< T, default_intrinsic_traits< T >::alignment >, SO, Dims... >
 A hybrid matrix with fixed dimensions, in specified order.
 
template<typename T , size_t D = 2>
using dyn_matrix = dyn_matrix_impl< T, order::RowMajor, D >
 A dynamic matrix, in row-major order, of D dimensions.
 
template<typename T , size_t D = 2>
using dyn_matrix_cm = dyn_matrix_impl< T, order::ColumnMajor, D >
 A dynamic matrix, in column-major order, of D dimensions.
 
template<typename T , order SO, size_t D = 2>
using dyn_matrix_o = dyn_matrix_impl< T, SO, D >
 A dynamic matrix, in specific storage order, of D dimensions.
 
template<typename T >
using dyn_vector = dyn_matrix_impl< T, order::RowMajor, 1 >
 A dynamic vector, in row-major order.
 
template<typename T >
using dyn_vector_cm = dyn_matrix_impl< T, order::ColumnMajor, 1 >
 A dynamic vector, in column-major order.
 
template<typename T , size_t D = 2>
using gpu_dyn_matrix = gpu_dyn_matrix_impl< T, order::RowMajor, D >
 A GPU dynamic matrix, in row-major order, of D dimensions.
 
template<typename T , size_t D = 2>
using custom_dyn_matrix = custom_dyn_matrix_impl< T, order::RowMajor, D >
 A dynamic matrix, in row-major order, of D dimensions.
 
template<typename T , size_t D = 2>
using custom_dyn_matrix_cm = custom_dyn_matrix_impl< T, order::ColumnMajor, D >
 A dynamic matrix, in column-major order, of D dimensions.
 
template<typename T >
using custom_dyn_vector = custom_dyn_matrix_impl< T, order::RowMajor, 1 >
 A dynamic vector, in row-major order.
 
template<typename T , size_t Rows>
using custom_fast_vector = custom_fast_matrix_impl< T, std::span< T >, order::RowMajor, Rows >
 A hybrid vector with fixed dimensions, in row-major order.
 
template<typename T , size_t... Dims>
using custom_fast_matrix = custom_fast_matrix_impl< T, std::span< T >, order::RowMajor, Dims... >
 A hybrid matrix with fixed dimensions, in row-major order.
 
template<typename T , size_t D = 2>
using sparse_matrix = sparse_matrix_impl< T, sparse_storage::COO, D >
 A sparse matrix, of D dimensions.
 
using default_vec = no_vec
 The default vectorization scheme.
 
template<typename T >
using default_intrinsic_traits = no_intrinsic_traits< T >
 The default intrinsic traits.
 
template<typename T >
using default_intrinsic_type = typename default_intrinsic_traits< T >::intrinsic_type
 Helper to get the intrinsic corresponding type of a vectorizable type.
 

Enumerations

enum  batch_softmax_impl { batch_softmax_impl::STD, batch_softmax_impl::CUDNN }
 Enumeration describing the different implementations of CCE. More...
 
enum  bce_impl { bce_impl::STD, bce_impl::EGBLAS }
 Enumeration describing the different implementations of BCE. More...
 
enum  bias_add_impl { bias_add_impl::STD, bias_add_impl::VEC, bias_add_impl::EGBLAS, bias_add_impl::CUDNN }
 Enumeration describing the different implementations of bias_add. More...
 
enum  cce_impl { cce_impl::STD, cce_impl::EGBLAS }
 Enumeration describing the different implementations of CCE. More...
 
enum  vector_mode_t { vector_mode_t::NONE, vector_mode_t::SSE3, vector_mode_t::AVX, vector_mode_t::AVX512 }
 Vectorization mode. More...
 
enum  conv_impl {
  conv_impl::STD, conv_impl::VEC, conv_impl::CUDNN, conv_impl::FFT_STD,
  conv_impl::FFT_MKL, conv_impl::FFT_CUFFT, conv_impl::EGBLAS
}
 Enumeration describing the different convolution implementations. More...
 
enum  conv4_impl {
  conv4_impl::STD, conv4_impl::VEC, conv4_impl::CUDNN, conv4_impl::FFT_STD,
  conv4_impl::FFT_MKL, conv4_impl::FFT_CUFFT, conv4_impl::BLAS_VEC, conv4_impl::BLAS_MKL
}
 Enumeration describing the different convolution implementations. More...
 
enum  conv_multi_impl {
  conv_multi_impl::STD, conv_multi_impl::VEC, conv_multi_impl::VALID_FFT_MKL, conv_multi_impl::FFT_STD,
  conv_multi_impl::FFT_MKL, conv_multi_impl::FFT_CUFFT, conv_multi_impl::BLAS_VEC, conv_multi_impl::BLAS_MKL,
  conv_multi_impl::CUDNN
}
 Enumeration describing the different multiple convolution implementations. More...
 
enum  dot_impl { dot_impl::STD, dot_impl::VEC, dot_impl::BLAS, dot_impl::CUBLAS }
 Enumeration describing the different implementations of dot. More...
 
enum  init_flag_t { init_flag_t::DUMMY }
 A simple type to use as init flag to constructor. More...
 
enum  fft_impl { fft_impl::STD, fft_impl::MKL, fft_impl::CUFFT }
 The different FFT implementations. More...
 
enum  gemm_impl { gemm_impl::STD, gemm_impl::VEC, gemm_impl::BLAS, gemm_impl::CUBLAS }
 Enumeration describing the different matrix-matrix multiplication implementations. More...
 
enum  conv_type {
  conv_type::VALID, conv_type::VALID_MULTI, conv_type::SAME, conv_type::SAME_MULTI,
  conv_type::FULL, conv_type::FULL_MULTI
}
 Enumeration describing the different types of convolution. More...
 
enum  mse_impl { mse_impl::STD, mse_impl::EGBLAS }
 Enumeration describing the different implementations of MSE. More...
 
enum  order { order::RowMajor, order::ColumnMajor }
 Storage order of a matrix. More...
 
enum  outer_impl { outer_impl::STD, outer_impl::BLAS, outer_impl::CUBLAS, outer_impl::VEC }
 Enumeration describing the different implementations of outer product. More...
 
enum  pool_impl { pool_impl::STD, pool_impl::CUDNN }
 Enumeration describing the different implementations of pooling. More...
 
enum  sparse_storage { sparse_storage::COO }
 Enumeration for sparse storage formats. More...
 
enum  sum_impl { sum_impl::STD, sum_impl::VEC, sum_impl::BLAS, sum_impl::CUBLAS }
 Enumeration describing the different implementations of sum. More...
 
enum  transpose_impl { transpose_impl::STD, transpose_impl::VEC, transpose_impl::MKL, transpose_impl::CUBLAS }
 Enumeration describing the different implementations of transpose. More...
 

Functions

template<typename E >
bool is_symmetric (E &&expr)
 Indicates if the given expression is a symmetric matrix or not. More...
 
template<typename E >
bool is_lower_triangular (E &&expr)
 Indicates if the given expression is a lower triangular matrix or not. More...
 
template<typename E >
bool is_uni_lower_triangular (E &&expr)
 Indicates if the given expression is a uni lower triangular matrix or not. More...
 
template<typename E >
bool is_strictly_lower_triangular (E &&expr)
 Indicates if the given expression is a strictly lower triangular matrix or not. More...
 
template<typename E >
bool is_upper_triangular (E &&expr)
 Indicates if the given expression is a upper triangular matrix or not. More...
 
template<typename E >
bool is_uni_upper_triangular (E &&expr)
 Indicates if the given expression is a strictly upper triangular matrix or not. More...
 
template<typename E >
bool is_strictly_upper_triangular (E &&expr)
 Indicates if the given expression is a strictly upper triangular matrix or not. More...
 
template<typename E >
bool is_triangular (E &&expr)
 Indicates if the given expression is a triangular matrix or not. More...
 
template<typename E >
bool is_diagonal (E &&expr)
 Indicates if the given expression is a diagonal matrix or not. More...
 
template<typename E >
bool is_hermitian (E &&expr)
 Indicates if the given expression represents an hermitian matrix. More...
 
template<typename T , size_t S = sizeof(T)>
auto allocate (size_t size, mangling_faker< S >=mangling_faker< S >())
 Allocate an array of the given size for the given type. More...
 
template<typename T , size_t S = sizeof(T)>
T * aligned_allocate (size_t size, mangling_faker< S >=mangling_faker< S >())
 Allocate an aligned rray of the given size for the given type. More...
 
template<typename T , size_t S = sizeof(T)>
void aligned_release (T *ptr, mangling_faker< S >=mangling_faker< S >())
 Release some aligned memory. More...
 
template<typename T , size_t S = sizeof(T)>
aligned_ptr< T > aligned_allocate_auto (size_t size, mangling_faker< S >=mangling_faker< S >())
 Allocate an aligned rray of the given size for the given type. More...
 
constexpr bool is_2d4d (size_t dimensions)
 
template<typename Expr >
auto batch_hint (Expr &&expr)
 Build a special expression for batched expressions. More...
 
template<etl_expr LE, etl_expr RE>
auto operator- (LE &&lhs, RE &&rhs)
 Builds an expression representing the subtraction of lhs and rhs. More...
 
template<etl_expr LE, etl_expr RE>
auto operator+ (LE &&lhs, RE &&rhs)
 Builds an expression representing the addition of lhs and rhs. More...
 
template<etl_expr LE, etl_expr RE>
auto operator>> (LE &&lhs, RE &&rhs)
 Builds an expression representing the scalar multipliation of lhs and rhs. More...
 
template<typename LE , typename RE >
auto scale (LE &&lhs, RE &&rhs)
 Builds an expression representing the scalar multiplication of lhs and rhs. More...
 
template<etl_expr LE, etl_expr RE>
auto operator/ (LE &&lhs, RE &&rhs)
 Builds an expression representing the division of lhs and rhs. More...
 
template<etl_expr LE, etl_expr RE>
auto operator% (LE &&lhs, RE &&rhs)
 Builds an expression representing the modulo of lhs and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto operator- (LE &&lhs, RE rhs)
 Builds an expression representing the subtraction of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto operator- (LE lhs, RE &&rhs)
 Builds an expression representing the subtraction of lhs (scalar) and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto operator+ (LE &&lhs, RE rhs)
 Builds an expression representing the addition of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto operator+ (LE lhs, RE &&rhs)
 Builds an expression representing the addition of lhs (scalar) and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto operator* (LE &&lhs, RE rhs)
 Builds an expression representing the multiplication of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto operator* (LE lhs, RE &&rhs)
 Builds an expression representing the multiplication of lhs (scalar) and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto operator>> (LE &&lhs, RE rhs)
 Builds an expression representing the multiplication of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto operator>> (LE lhs, RE &&rhs)
 Builds an expression representing the multiplication of lhs (scalar) and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto operator/ (LE &&lhs, RE rhs)
 Builds an expression representing the division of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto operator/ (LE lhs, RE &&rhs)
 Builds an expression representing the division of lhs (scalar) and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto operator% (LE &&lhs, RE rhs)
 Builds an expression representing the modulo of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto operator% (LE lhs, RE &&rhs)
 Builds an expression representing the modulo of lhs (scalar) and rhs. More...
 
template<simple_lhs LE, arithmetic RE>
decltype(auto) operator+= (LE &&lhs, RE rhs)
 Compound addition of the right hand side to the left hand side. More...
 
template<simple_lhs LE, etl_expr RE>
decltype(auto) operator+= (LE &&lhs, const RE &rhs)
 Compound addition of the right hand side to the left hand side. More...
 
template<simple_lhs LE, arithmetic RE>
decltype(auto) operator-= (LE &&lhs, RE rhs)
 Compound subtraction of the right hand side to the left hand side. More...
 
template<simple_lhs LE, etl_expr RE>
decltype(auto) operator-= (LE &&lhs, const RE &rhs)
 Compound subtraction of the right hand side to the left hand side. More...
 
template<simple_lhs LE, arithmetic RE>
decltype(auto) operator*= (LE &&lhs, RE rhs)
 Compound multiplication of the right hand side to the left hand side. More...
 
template<simple_lhs LE, etl_expr RE>
decltype(auto) operator*= (LE &&lhs, const RE &rhs)
 Compound multiplication of the right hand side to the left hand side. More...
 
template<simple_lhs LE, arithmetic RE>
decltype(auto) operator>>= (LE &&lhs, RE rhs)
 Compound multiplication of the right hand side to the left hand side. More...
 
template<simple_lhs LE, etl_expr RE>
decltype(auto) operator>>= (LE &&lhs, const RE &rhs)
 Compound multiplication of the right hand side to the left hand side. More...
 
template<simple_lhs LE, arithmetic RE>
decltype(auto) operator/= (LE &&lhs, RE rhs)
 Compound division of the right hand side to the left hand side. More...
 
template<simple_lhs LE, etl_expr RE>
decltype(auto) operator/= (LE &&lhs, const RE &rhs)
 Compound division of the right hand side to the left hand side. More...
 
template<simple_lhs LE, arithmetic RE>
decltype(auto) operator%= (LE &&lhs, RE rhs)
 Compound modulo of the right hand side to the left hand side. More...
 
template<simple_lhs LE, etl_expr RE>
decltype(auto) operator%= (LE &&lhs, const RE &rhs)
 Compound modulo of the right hand side to the left hand side. More...
 
template<typename LE , typename RE >
auto equal (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise comparison of lhs and rhs. More...
 
template<typename LE , typename RE >
auto not_equal (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise comparison of lhs and rhs. More...
 
template<typename LE , typename RE >
auto less (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise less than comparison of lhs and rhs. More...
 
template<typename LE , typename RE >
auto less_equal (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise less than or equals comparison of lhs and rhs. More...
 
template<typename LE , typename RE >
auto greater (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise greater than comparison of lhs and rhs. More...
 
template<typename LE , typename RE >
auto greater_equal (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise greater than or equals comparison of lhs and rhs. More...
 
template<etl_expr LE, etl_expr RE>
auto logical_and (LE &&lhs, RE &&rhs)
 Builds an expression representing the elementwise logical and of lhs and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto logical_and (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise logical and of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto logical_and (LE lhs, RE &&rhs)
 Builds an expression representing the elementwise logical and of lhs (scalar) and rhs. More...
 
template<etl_expr LE, etl_expr RE>
auto logical_xor (LE &&lhs, RE &&rhs)
 Builds an expression representing the elementwise logical xor of lhs and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto logical_xor (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise logical xor of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto logical_xor (LE lhs, RE &&rhs)
 Builds an expression representing the elementwise logical xor of lhs (scalar) and rhs. More...
 
template<etl_expr LE, etl_expr RE>
auto logical_or (LE &&lhs, RE &&rhs)
 Builds an expression representing the elementwise logical or of lhs and rhs. More...
 
template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto logical_or (LE &&lhs, RE rhs)
 Builds an expression representing the elementwise logical or of lhs and rhs (scalar) More...
 
template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto logical_or (LE lhs, RE &&rhs)
 Builds an expression representing the elementwise logical or of lhs (scalar) and rhs. More...
 
template<etl_1d A>
auto convmtx (A &&a, size_t h) -> detail::stable_transform_helper< A, dyn_convmtx_transformer >
 Construct a matrix to compute a convolution by matrix-matrix multiplication. More...
 
template<etl_2d A>
auto convmtx2 (A &&a, size_t k1, size_t k2) -> detail::stable_transform_helper< A, dyn_convmtx2_transformer >
 Construct a matrix to compute a 2D convolution by matrix-matrix multiplication. More...
 
template<typename E >
auto operator- (E &&value)
 
template<typename E >
auto operator+ (E &&value)
 
template<etl_expr E>
auto abs (E &&value)
 Apply absolute on each value of the given expression. More...
 
template<etl_expr L, typename R >
auto max (L &&lhs, R &&rhs)
 Create an expression with the max value of lhs or rhs. More...
 
template<etl_expr L, typename R >
auto min (L &&lhs, R &&rhs)
 Create an expression with the min value of lhs or rhs. More...
 
template<etl_expr E>
auto floor (E &&value)
 Round down each values of the ETL expression. More...
 
template<etl_expr E>
auto ceil (E &&value)
 Round up each values of the ETL expression. More...
 
template<etl_expr E, arithmetic T>
auto clip (E &&value, T min, T max)
 Clip each values of the ETL expression between min and max. More...
 
template<etl_expr E, arithmetic T>
auto pow (E &&value, T v)
 Apply pow(x, v) on each element x of the ETL expression. More...
 
template<etl_expr E>
auto pow_int (E &&value, size_t v)
 Apply pow(x, v) on each element x of the ETL expression. More...
 
template<etl_expr E, arithmetic T>
auto pow_precise (E &&value, T v)
 Apply pow(x, v) on each element x of the ETL expression. More...
 
template<etl_expr E, arithmetic T>
auto one_if (E &&value, T v)
 Creates an expression with values of 1 where the ETL expression has a value of v. More...
 
template<etl_expr E>
auto one_if_max (E &&value)
 Creates an expression with a value of 1 where the max value is and all zeroes other places. More...
 
template<etl_complex_expr E>
auto real (E &&value)
 Extract the real part of each complex value of the given expression. More...
 
template<etl_complex_expr E>
auto imag (E &&value)
 Extract the imag part of each complex value of the given expression. More...
 
template<etl_complex_expr E>
auto conj (E &&value)
 Apply the conjugate operation on each complex value of the given expression. More...
 
template<etl_expr E>
auto uniform_noise (E &&value)
 Add some uniform noise (0, 1.0) to the given expression. More...
 
template<etl_expr E, typename G >
auto uniform_noise (G &g, E &&value)
 Add some uniform noise (0, 1.0) to the given expression. More...
 
template<etl_expr E>
auto normal_noise (E &&value)
 Add some normal noise (0, 1.0) to the given expression. More...
 
template<etl_expr E, typename G >
auto normal_noise (G &g, E &&value)
 Add some normal noise (0, 1.0) to the given expression. More...
 
template<etl_expr E>
auto logistic_noise (E &&value)
 Add some normal noise (0, sigmoid(x)) to the given expression. More...
 
template<etl_expr E, typename G >
auto logistic_noise (G &g, E &&value)
 Add some normal noise (0, sigmoid(x)) to the given expression. More...
 
template<etl_expr E>
auto state_logistic_noise (E &&value)
 Add some normal noise (0, sigmoid(x)) to the given expression. More...
 
template<etl_expr E>
auto state_logistic_noise (E &&value, const std::shared_ptr< void *> &states)
 Add some normal noise (0, sigmoid(x)) to the given expression. More...
 
template<typename G , etl_expr E>
auto state_logistic_noise (G &g, E &&value)
 Add some normal noise (0, sigmoid(x)) to the given expression. More...
 
template<etl_expr E, typename G >
auto state_logistic_noise (G &g, E &&value, const std::shared_ptr< void *> &states)
 Add some normal noise (0, sigmoid(x)) to the given expression. More...
 
template<etl_expr E, arithmetic T>
auto ranged_noise (E &&value, T v)
 Add some normal noise N(0,1) to x. No noise is added to values equal to zero or to given the value. More...
 
template<size_t D1, size_t... D, etl_expr E>
auto rep (E &&value)
 Repeats the expression to the right (adds dimension after existing) More...
 
template<size_t D1, size_t... D, etl_expr E>
auto rep_r (E &&value)
 Repeats the expression to the right (adds dimension after existing) More...
 
template<size_t D1, size_t... D, etl_expr E>
auto rep_l (E &&value)
 Repeats the expression to the left (adds dimension before existing) More...
 
template<typename... D, etl_expr E>
auto rep (E &&value, size_t d1, D... d)
 Repeats the expression to the right (adds dimension after existing) More...
 
template<typename... D, etl_expr E>
auto rep_r (E &&value, size_t d1, D... d)
 Repeats the expression to the right (adds dimension after existing) More...
 
template<typename... D, etl_expr E>
auto rep_l (E &&value, size_t d1, D... d)
 Repeats the expression to the left (adds dimension after existing) More...
 
template<etl_expr E>
auto argmax (E &&value)
 Returns the indices of the maximum values in the first axis of the given matrix. If passed a vector, returns the index of the maximum element. More...
 
template<etl_expr E>
auto argmin (E &&value)
 Returns the indices of the minimum values in the first axis of the given matrix. If passed a vector, returns the index of the mimimum element. More...
 
template<matrix E>
auto sum_r (E &&value)
 Aggregate (sum) a dimension from the right. This effectively removes the last dimension from the expression and sums its values to the left. the last dimension from the expression and sums its values to the left. More...
 
template<matrix E>
auto sum_l (E &&value)
 Aggregate (sum) a dimension from the left. This effectively removes the first dimension from the expression and sums its values to the right. More...
 
template<matrix E>
auto mean_r (E &&value)
 Aggregate (average) a dimension from the right. This effectively removes the last dimension from the expression and averages its values to the left. More...
 
template<matrix E>
auto mean_l (E &&value)
 Aggregate (average) a dimension from the left. This effectively removes the first dimension from the expression and averages its values to the right. More...
 
template<etl_2d E>
auto one_if_max_sub (const E &value)
 Return, for each original position, 1.0 if the value is the max of the sub matrix, 0.0 otherwise. More...
 
template<mat_or_vec E>
auto hflip (const E &value)
 Returns the horizontal flipping of the given expression. More...
 
template<mat_or_vec E>
auto vflip (const E &value)
 Returns the vertical flipping of the given expression. More...
 
template<mat_or_vec E>
auto fflip (const E &value)
 Returns the horizontal and vertical flipping of the given expression. More...
 
template<mat_or_vec E>
auto transpose (const E &value)
 Returns the transpose of the given expression. More...
 
template<etl_expr E>
auto trans (const E &value)
 Returns the transpose of the given expression. More...
 
template<etl_expr E>
auto conj_transpose (const E &value)
 Returns the conjugate transpose of the given expression. More...
 
template<etl_expr E>
auto ctrans (const E &value)
 Returns the conjugate transpose of the given expression. More...
 
template<deep_mat E>
auto transpose_front (const E &value)
 Returns the transpose of the given expression. More...
 
template<typename A >
value_t< A > norm (const A &a)
 Returns euclidean norm of the given expression. More...
 
template<typename A , typename B >
value_t< A > dot (const A &a, const B &b)
 Returns the dot product of the two given expressions. More...
 
template<etl_1d A, etl_1d B>
etl::fast_vector< value_t< A >, 3 > cross (const A &a, const B &b)
 Returns the dot product of the two given expressions. More...
 
template<etl_expr E>
value_t< E > sum (E &&values)
 Returns the sum of all the values contained in the given expression. More...
 
template<etl_expr E>
value_t< E > asum (E &&values)
 Returns the sum of all the absolute values contained in the given expression. More...
 
template<etl_expr E>
value_t< E > mean (E &&values)
 Returns the mean of all the values contained in the given expression. More...
 
template<etl_expr E>
value_t< E > amean (E &&values)
 Returns the mean of all the absolute values contained in the given expression. More...
 
template<etl_expr E>
value_t< E > stddev (E &&values)
 Returns the standard deviation of all the values contained in the given expression. More...
 
template<etl_expr E>
value_t< E > stddev (E &&values, value_t< E > mean)
 Returns the standard deviation of all the values contained in the given expression. More...
 
template<etl_expr E>
size_t max_index (E &&values)
 Returns the index of the maximum element contained in the expression. More...
 
template<etl_expr E>
detail::value_return_t< E > max (E &&values)
 Returns the maximum element contained in the expression When possible, this returns a reference to the element. More...
 
template<etl_expr E>
size_t min_index (E &&values)
 Returns the index of the minimum element contained in the expression. More...
 
template<etl_expr E>
detail::value_return_t< E > min (E &&values)
 Returns the minimum element contained in the expression When possible, this returns a reference to the element. More...
 
template<typename T = double>
auto normal_generator (T mean=0.0, T stddev=1.0)
 Create an expression generating numbers from a normal distribution. More...
 
template<typename T = double, typename G >
auto normal_generator (G &g, T mean=0.0, T stddev=1.0)
 Create an expression generating numbers from a normal distribution using the given custom random engine. More...
 
template<typename T = double>
auto truncated_normal_generator (T mean=0.0, T stddev=1.0)
 Create an expression generating numbers from a truncated normal distribution. More...
 
template<typename T = double, typename G >
auto truncated_normal_generator (G &g, T mean=0.0, T stddev=1.0)
 Create an expression generating numbers from a truncated normal distribution using the given custom random engine. More...
 
template<typename T = double>
auto uniform_generator (T start, T end)
 Create an expression generating numbers from an uniform distribution. More...
 
template<typename T = double, typename G >
auto uniform_generator (G &g, T start, T end)
 Create an expression generating numbers from an uniform distribution using the given custom random engine. More...
 
template<typename T = double>
auto sequence_generator (T current=0)
 Create an expression generating numbers from a consecutive sequence. More...
 
template<typename T = float>
auto dropout_mask (T probability)
 Create an expression generating numbers for a dropout mask. More...
 
template<typename T = float, typename G >
auto dropout_mask (G &g, T probability)
 Create an expression generating numbers for a dropout mask using the given custom random engine. More...
 
template<typename T = float>
auto state_dropout_mask (T probability)
 Create an expression generating numbers for a dropout mask. More...
 
template<typename T = float, typename G >
auto state_dropout_mask (G &g, T probability)
 Create an expression generating numbers for a dropout mask using the given custom random engine. More...
 
template<typename T = float>
auto inverted_dropout_mask (T probability)
 Create an expression generating numbers for an inverted dropout mask. More...
 
template<typename T = float, typename G >
auto state_inverted_dropout_mask (G &g, T probability)
 Create an expression generating numbers for an inverted dropout mask using the given custom random engine. More...
 
template<typename T = float>
auto state_inverted_dropout_mask (T probability)
 Create an expression generating numbers for an inverted dropout mask. More...
 
template<typename T = float, typename G >
auto inverted_dropout_mask (G &g, T probability)
 Create an expression generating numbers for an inverted dropout mask using the given custom random engine. More...
 
template<etl_expr Expr>
decltype(auto) operator* (Expr &&expr)
 Force evaluation of an expression. More...
 
template<etl_expr E>
auto sqrt (E &&value) -> detail::unary_helper< E, sqrt_unary_op >
 Apply square root on each value of the given expression. More...
 
template<etl_expr E>
auto invsqrt (E &&value) -> detail::unary_helper< E, invsqrt_unary_op >
 Apply inverse square root on each value of the given expression. More...
 
template<etl_expr E>
auto cbrt (E &&value) -> detail::unary_helper< E, cbrt_unary_op >
 Apply cubic root on each value of the given expression. More...
 
template<etl_expr E>
auto invcbrt (E &&value) -> detail::unary_helper< E, invcbrt_unary_op >
 Apply inverse cubic root on each value of the given expression. More...
 
template<etl_expr E>
auto log (E &&value) -> detail::unary_helper< E, log_unary_op >
 Apply logarithm (base e) on each value of the given expression. More...
 
template<etl_expr E>
auto log2 (E &&value) -> detail::unary_helper< E, log2_unary_op >
 Apply logarithm (base 2) on each value of the given expression. More...
 
template<etl_expr E>
auto log10 (E &&value) -> detail::unary_helper< E, log10_unary_op >
 Apply logarithm (base 10) on each value of the given expression. More...
 
template<etl_expr E>
auto tan (E &&value) -> detail::unary_helper< E, tan_unary_op >
 Apply tangent on each value of the given expression. More...
 
template<etl_expr E>
auto cos (E &&value) -> detail::unary_helper< E, cos_unary_op >
 Apply cosinus on each value of the given expression. More...
 
template<etl_expr E>
auto sin (E &&value) -> detail::unary_helper< E, sin_unary_op >
 Apply sinus on each value of the given expression. More...
 
template<etl_expr E>
auto tanh (E &&value) -> detail::unary_helper< E, tanh_unary_op >
 Apply hyperbolic tangent on each value of the given expression. More...
 
template<etl_expr E>
auto cosh (E &&value) -> detail::unary_helper< E, cosh_unary_op >
 Apply hyperbolic cosinus on each value of the given expression. More...
 
template<etl_expr E>
auto sinh (E &&value) -> detail::unary_helper< E, sinh_unary_op >
 Apply hyperbolic sinus on each value of the given expression. More...
 
template<etl_expr E>
auto exp (E &&value) -> detail::unary_helper< E, exp_unary_op >
 Apply exponential on each value of the given expression. More...
 
template<etl_expr E>
auto sign (E &&value) -> detail::unary_helper< E, sign_unary_op >
 Apply sign on each value of the given expression. More...
 
template<typename E >
decltype(auto) identity (E &&value)
 Performs the identiy function on the ETL expression. More...
 
template<typename E >
auto identity_derivative ([[maybe_unused]] E &&value)
 Return the derivative of the identiy function for the given value. More...
 
template<etl_expr E>
auto sigmoid (const E &value) -> detail::unary_helper< E, sigmoid_unary_op >
 Return the logistic sigmoid of the given ETL expression. More...
 
template<etl_expr E>
auto relu (const E &value) -> detail::unary_helper< E, relu_unary_op >
 Return the relu activation of the given ETL expression. More...
 
template<etl_expr E>
auto sigmoid_derivative (E &&value) -> decltype(sigmoid(value) >>(1.0 - sigmoid(value)))
 Return the derivative of the logistic sigmoid of the given ETL expression. More...
 
template<etl_expr E>
auto fast_sigmoid (const E &value) -> detail::unary_helper< E, fast_sigmoid_unary_op >
 Return a fast approximation of the logistic sigmoid of the given ETL expression. More...
 
template<etl_expr E>
auto hard_sigmoid (E &&x) -> decltype(etl::clip(x *0.2+0.5, 0.0, 1.0))
 Return an hard approximation of the logistic sigmoid of the given ETL expression. More...
 
template<etl_expr E>
auto softmax (E &&e)
 Return the softmax function of the given ETL expression. More...
 
template<etl_expr E>
auto stable_softmax (E &&e)
 Returns the softmax function of the given ETL expression. This version is implemented so that numerical stability is preserved. More...
 
template<typename E >
auto softmax_derivative ([[maybe_unused]] E &&e)
 Return the derivative of the softmax function of the given ETL expression. More...
 
template<etl_expr E>
auto softplus (E &&value) -> detail::unary_helper< E, softplus_unary_op >
 Return the softplus of the given ETL expression. More...
 
template<etl_expr E>
auto bernoulli (const E &value) -> detail::unary_helper< E, bernoulli_unary_op >
 Apply Bernoulli sampling to the values of the expression. More...
 
template<typename E , typename G >
auto bernoulli (G &g, E &&value)
 Apply Bernoulli sampling to the values of the expression. More...
 
template<etl_expr E>
auto state_bernoulli (const E &value)
 Apply Bernoulli sampling to the values of the expression. More...
 
template<etl_expr E>
auto state_bernoulli (const E &value, const std::shared_ptr< void *> &states)
 Apply Bernoulli sampling to the values of the expression. More...
 
template<etl_expr E, typename G >
auto state_bernoulli (G &g, E &&value)
 Apply Bernoulli sampling to the values of the expression. More...
 
template<etl_expr E, typename G >
auto state_bernoulli (G &g, E &&value, const std::shared_ptr< void *> &states)
 Apply Bernoulli sampling to the values of the expression. More...
 
template<etl_expr E>
auto r_bernoulli (const E &value) -> detail::unary_helper< E, reverse_bernoulli_unary_op >
 Apply Reverse Bernoulli sampling to the values of the expression. More...
 
template<etl_expr E, typename G >
auto r_bernoulli (G &g, E &&value)
 Apply Reverse Bernoulli sampling to the values of the expression. More...
 
template<etl_expr E>
auto tanh_derivative (E &&value) -> decltype(1.0 -(tanh(value) >> tanh(value)))
 Return the derivative of the tanh function of the given ETL expression. More...
 
template<etl_expr E>
auto relu_derivative (const E &value) -> detail::unary_helper< E, relu_derivative_op >
 Return the derivative of the relu function of the given ETL expression. More...
 
template<etl_2d A, etl_2d B>
auto lazy_mul (A &&a, B &&b) -> detail::stable_transform_binary_helper< A, B, mm_mul_transformer >
 Multiply two matrices together lazily (expression templates) More...
 
template<size_t D, etl_expr E>
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. More...
 
template<etl_expr E>
auto row (E &&value, size_t i) -> detail::identity_helper< E, dim_view< detail::build_identity_type< E >, 1 >>
 Returns view representing the ith row of the given expression. More...
 
template<etl_expr E>
auto col (E &&value, size_t i) -> detail::identity_helper< E, dim_view< detail::build_identity_type< E >, 2 >>
 Returns view representing the ith column of the given expression. More...
 
template<matrix E>
auto sub (E &&value, size_t i) -> sub_view< detail::build_identity_type< E >, false >
 Returns view representing a sub dimensional view of the given expression. More...
 
template<etl_2d E>
auto sub (E &&value, size_t i, size_t j, size_t m, size_t n) -> sub_matrix_2d< detail::build_identity_type< E >, false >
 Returns view representing a sub matrix view of the given expression. More...
 
template<etl_3d E>
auto sub (E &&value, size_t i, size_t j, size_t k, size_t m, size_t n, size_t o) -> sub_matrix_3d< detail::build_identity_type< E >, false >
 Returns view representing a sub matrix view of the given expression. More...
 
template<etl_4d E>
auto sub (E &&value, size_t i, size_t j, size_t k, size_t l, size_t m, size_t n, size_t o, size_t p) -> sub_matrix_4d< detail::build_identity_type< E >, false >
 Returns view representing a sub matrix view of the given expression. More...
 
template<etl_expr E>
auto slice (E &&value, size_t first, size_t last) -> slice_view< detail::build_identity_type< E >>
 Returns view representing a slice view of the given expression. More...
 
template<size_t... Dims, etl_expr E>
auto reshape (E &&value) -> fast_matrix_view< detail::build_identity_type< E >, is_dma< E >, Dims... >
 Returns view representing the reshape of another expression. More...
 
template<etl_expr E, typename... S>
auto reshape (E &&value, S... sizes) -> dyn_matrix_view< detail::build_identity_type< E >, sizeof...(sizes)>
 Returns view representing the reshape of another expression. More...
 
template<typename D = double>
auto magic (size_t i) -> detail::virtual_helper< D, magic_view< D >>
 Returns a view representing the square magic matrix. More...
 
template<size_t N, typename D = double>
auto magic () -> detail::virtual_helper< D, fast_magic_view< D, N >>
 Returns a view representing the square magic matrix. More...
 
template<typename Expr >
auto opt (Expr &&expr) -> optimized_expr< detail::build_type< Expr >>
 Create an optimized expression wrapping the given expression. More...
 
template<typename Expr >
auto timed (Expr &&expr) -> timed_expr< detail::build_type< Expr >>
 Create a timed expression wrapping the given expression. More...
 
template<typename R , typename Expr >
auto timed_res (Expr &&expr) -> timed_expr< detail::build_type< Expr >, R >
 Create a timed expression wrapping the given expression with the given resolution. More...
 
template<typename Expr >
auto serial (Expr &&expr) -> serial_expr< detail::build_type< Expr >>
 Create a serial expression wrapping the given expression. More...
 
template<typename Expr >
auto parallel (Expr &&expr) -> parallel_expr< detail::build_type< Expr >>
 Create a parallel expression wrapping the given expression. More...
 
template<typename LE , typename RE >
void validate_expression_impl ([[maybe_unused]] const LE &lhs, [[maybe_unused]] const RE &rhs) noexcept
 Make sure the two expressions have the same size. More...
 
template<etl_expr LE, typename RE >
void validate_assign ([[maybe_unused]] const LE &lhs, [[maybe_unused]] const RE &rhs)
 
template<etl_2d E>
void assert_square ([[maybe_unused]] E &&expr)
 Make sure that the expression is square. More...
 
template<size_t C1, size_t C2, dimensions_between< 2, 4 > E>
void validate_pmax_pooling (const E &expr)
 Make sure that the pooling ratios are correct and that the expression can be pooled from. More...
 
template<dimensions_between< 2, 4 > E>
void validate_pmax_pooling (const E &expr, size_t c1, size_t c2)
 Make sure that the pooling ratios are correct and that the expression can be pooled from. More...
 
template<typename T >
bool operator== (const complex< T > &lhs, const complex< T > &rhs)
 Test two complex numbers for equality. More...
 
template<typename T >
bool operator!= (const complex< T > &lhs, const complex< T > &rhs)
 Test two complex numbers for inequality. More...
 
template<typename T >
complex< T > operator- (complex< T > rhs)
 Returns a complex number with the value of -rhs. More...
 
template<typename T >
complex< T > operator+ (const complex< T > &lhs, const complex< T > &rhs)
 Computes the addition of two complex numbers. More...
 
template<typename T >
complex< T > operator- (const complex< T > &lhs, const complex< T > &rhs)
 Computes the subtraction of two complex numbers. More...
 
template<typename T >
complex< T > operator* (const complex< T > &lhs, const complex< T > &rhs)
 Computes the multiplication of two complex numbers. More...
 
template<typename T >
complex< T > operator* (const complex< T > &lhs, T rhs)
 Computes the multiplication of a complex number and a scalar. More...
 
template<typename T >
complex< T > operator* (T lhs, const complex< T > &rhs)
 Computes the multiplication of a complex number and a scalar. More...
 
template<typename T >
complex< T > operator/ (const complex< T > &lhs, T rhs)
 Computes the division of a complex number and a scalar. More...
 
template<typename T >
complex< T > operator/ (const complex< T > &lhs, const complex< T > &rhs)
 Computes the division of two complex numbers. More...
 
template<typename T >
abs (complex< T > z)
 Computes the magnitude of the given complex number. More...
 
template<typename T >
arg (complex< T > z)
 Computes the phase angle of the given complex number. More...
 
template<typename T >
complex< T > sqrt (complex< T > z)
 Computes the complex square root of the input. More...
 
template<typename T >
complex< T > invsqrt (complex< T > z)
 Computes the inverse complex square root of the input. More...
 
template<typename T >
complex< T > cbrt (complex< T > z)
 Computes the complex cubic root of the input. More...
 
template<typename T >
complex< T > invcbrt (complex< T > z)
 Computes the inverse complex cubic root of the input. More...
 
template<typename T >
complex< T > log (complex< T > z)
 Computes the complex logarithm, in base e, of the input. More...
 
template<typename T >
complex< T > log2 (complex< T > z)
 Computes the complex logarithm, in base 2, of the input. More...
 
template<typename T >
complex< T > log10 (complex< T > z)
 Computes the complex logarithm, in base 10, of the input. More...
 
template<typename T >
complex< T > sin (complex< T > z)
 Computes the sinus of the complex input. More...
 
template<typename T >
complex< T > cos (complex< T > z)
 Computes the cosine of the complex input. More...
 
template<typename T >
complex< T > tan (complex< T > z)
 Computes the tangent of the complex input. More...
 
template<typename T >
complex< T > cosh (complex< T > z)
 Computes the hyperbolic cosine of the complex input. More...
 
template<typename T >
complex< T > sinh (complex< T > z)
 Computes the hyperbolic sinus of the complex input. More...
 
template<typename T >
complex< T > tanh (complex< T > z)
 Computes the hyperbolic tangent of the complex input. More...
 
template<typename T >
complex< T > inverse (complex< T > x)
 Returns the inverse of the complex number. More...
 
template<typename T >
complex< T > inverse_conj (complex< T > x)
 Returns the inverse of the conjugate of the complex number. More...
 
template<typename T >
complex< T > conj_inverse (complex< T > x)
 Returns the conjugate of the inverse of the complex number. More...
 
template<typename T >
complex< T > conj (const complex< T > &c)
 Returns the conjugate of the complex number. More...
 
template<typename T >
get_imag (const std::complex< T > &c)
 Returns the imaginary part of the given complex number. More...
 
template<typename T >
get_imag (const etl::complex< T > &c)
 Returns the imaginary part of the given complex number. More...
 
template<typename T >
get_real (const std::complex< T > &c)
 Returns the real part of the given complex number. More...
 
template<typename T >
get_real (const etl::complex< T > &c)
 Returns the real part of the given complex number. More...
 
template<typename T >
std::complex< T > get_conj (const std::complex< T > &c)
 Returns the conjugate of the given complex number. More...
 
template<typename T >
etl::complex< T > get_conj (const etl::complex< T > &c)
 Returns the conjugate of the given complex number. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const etl::complex< T > &c)
 Outputs a textual representation of the complex number in the given stream. More...
 
contextlocal_context ()
 Return the configuration context of the current thread. More...
 
bool is_something_forced ()
 Indicates if some implementation is forced in the context. More...
 
template<typename T , order SO, size_t D>
void swap (custom_dyn_matrix_impl< T, SO, D > &lhs, custom_dyn_matrix_impl< T, SO, D > &rhs)
 Swap two dyn matrix. More...
 
template<typename T , typename ST , order SO, size_t... Dims>
void swap (custom_fast_matrix_impl< T, ST, SO, Dims... > &lhs, custom_fast_matrix_impl< T, ST, SO, Dims... > &rhs)
 Swaps the given two matrices. More...
 
template<typename E , typename V >
void direct_fill (E &&mat, V value)
 Fill the given ETL value class with the given value. More...
 
template<typename Resolution >
std::string resolution_to_string ()
 return the string representation of the given resolution More...
 
template<typename T , typename... Sizes>
etl::dyn_matrix< T, sizeof...(Sizes)> make_dyn_matrix (Sizes... sizes)
 Helper to create a dyn matrix using the dimensions. More...
 
template<typename T , order SO, size_t D>
void swap (dyn_matrix_impl< T, SO, D > &lhs, dyn_matrix_impl< T, SO, D > &rhs)
 Swap two dyn matrix. More...
 
template<typename Stream , typename T , order SO, size_t D>
void serialize (serializer< Stream > &os, const dyn_matrix_impl< T, SO, D > &matrix)
 Serialize the given matrix using the given serializer. More...
 
template<typename Stream , typename T , order SO, size_t D>
void deserialize (deserializer< Stream > &is, dyn_matrix_impl< T, SO, D > &matrix)
 Deserialize the given matrix using the given serializer. More...
 
template<typename... V>
values_t< V... > values (V... v)
 Create a list of values for initializing a dyn_matrix.
 
template<typename Derived , typename T , size_t D>
 requires (D > 0) struct dyn_base
 Matrix with run-time fixed dimensions. More...
 
template<typename Expr , typename Result >
void std_assign_evaluate (Expr &&expr, Result &&result)
 Evaluation of the expr into result. More...
 
template<typename Expr , typename Result >
void std_add_evaluate (Expr &&expr, Result &&result)
 Compound add evaluation of the expr into result. More...
 
template<typename Expr , typename Result >
void std_sub_evaluate (Expr &&expr, Result &&result)
 Compound subtract evaluation of the expr into result. More...
 
template<typename Expr , typename Result >
void std_mul_evaluate (Expr &&expr, Result &&result)
 Compound multiply evaluation of the expr into result. More...
 
template<typename Expr , typename Result >
void std_div_evaluate (Expr &&expr, Result &&result)
 Compound divide evaluation of the expr into result. More...
 
template<typename Expr , typename Result >
void std_mod_evaluate (Expr &&expr, Result &&result)
 Compound modulo evaluation of the expr into result. More...
 
template<typename Expr >
void force (Expr &&expr)
 Force the internal evaluation of an expression. More...
 
void exit ()
 Exit from ETL, releasing any possible resource. More...
 
template<etl_2d I, etl_3d E, etl_expr W>
batch_embedding_gradients_expr< detail::build_type< I >, detail::build_type< E >, detail::build_type< W > > batch_embedding_gradients (const I &value, const E &errors, const W &vocab)
 Returns the embeddings for the given sequence. More...
 
template<etl_2d I, etl_2d V>
batch_embedding_lookup_expr< detail::build_type< I >, detail::build_type< V > > batch_embedding_lookup (const I &value, const V &vocab)
 Returns the embeddings for the given sequence. More...
 
template<etl_1d A, etl_2d_or_4d B, etl_1d C>
batch_k_minus_scale_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C > > batch_k_minus_scale (const A &a, const B &b, const C &c)
 Returns the transpose of the given expression. More...
 
template<etl_1d A, etl_2d_or_4d B>
batch_k_scale_expr< detail::build_type< A >, detail::build_type< B > > batch_k_scale (const A &a, const B &b)
 Returns the transpose of the given expression. More...
 
template<etl_1d A, etl_2d_or_4d B, etl_1d C>
batch_k_scale_plus_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C > > batch_k_scale_plus (const A &a, const B &b, const C &c)
 Returns the transpose of the given expression. More...
 
template<typename A , typename B >
batch_outer_product_expr< detail::build_type< A >, detail::build_type< B > > batch_outer (A &&a, B &&b)
 Batch Outer product multiplication of two matrices. More...
 
template<typename A , typename B , typename C >
auto batch_outer (A &&a, B &&b, C &&c)
 Batch Outer product multiplication of two matrices and store the result in c. More...
 
template<etl_2d E, etl_1d B>
bias_add_2d_expr< detail::build_type< E >, detail::build_type< B > > bias_add_2d (const E &x, const B &biases)
 Returns the result of adding the bias [K] to the 4D matrix [N1, K, N2, N3]. More...
 
template<etl_4d E, etl_1d B>
bias_add_4d_expr< detail::build_type< E >, detail::build_type< B > > bias_add_4d (const E &x, const B &biases)
 Returns the result of adding the bias [K] to the 4D matrix [N1, K, N2, N3]. More...
 
template<etl_2d E>
bias_batch_mean_2d_expr< detail::build_type< E >, true > bias_batch_mean_2d (const E &value)
 Returns the transpose of the given expression. More...
 
template<etl_2d E>
bias_batch_mean_2d_expr< detail::build_type< E >, false > bias_batch_sum_2d (const E &value)
 Returns the transpose of the given expression. More...
 
template<etl_4d E>
bias_batch_mean_4d_expr< detail::build_type< E >, true > bias_batch_mean_4d (const E &value)
 Returns the transpose of the given expression. More...
 
template<etl_4d E>
bias_batch_mean_4d_expr< detail::build_type< E >, false > bias_batch_sum_4d (const E &value)
 Returns the transpose of the given expression. More...
 
template<etl_2d A, etl_1d B>
bias_batch_var_2d_expr< detail::build_type< A >, detail::build_type< B > > bias_batch_var_2d (const A &a, const B &b)
 Returns the transpose of the given expression. More...
 
template<etl_4d A, etl_1d B>
bias_batch_var_4d_expr< detail::build_type< A >, detail::build_type< B > > bias_batch_var_4d (const A &a, const B &b)
 Returns the transpose of the given expression. More...
 
template<etl_expr A, etl_expr B>
conv_1d_full_expr< detail::build_type< A >, detail::build_type< B > > conv_1d_full (A &&a, B &&b)
 Creates an expression representing the valid 1D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_1d_full (A &&a, B &&b, C &&c)
 Creates an expression representing the valid 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
conv_1d_same_expr< detail::build_type< A >, detail::build_type< B > > conv_1d_same (A &&a, B &&b)
 Creates an expression representing the 'same' 1D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_1d_same (A &&a, B &&b, C &&c)
 Creates an expression representing the 'same' 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_1d A, etl_1d B>
conv_1d_valid_expr< detail::build_type< A >, detail::build_type< B > > conv_1d_valid (A &&a, B &&b)
 Creates an expression representing the valid 1D convolution of a and b. More...
 
template<etl_1d A, etl_1d B, etl_1d C>
auto conv_1d_valid (A &&a, B &&b, C &&c)
 Creates an expression representing the valid 1D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_2d A, etl_2d B>
conv_2d_backward_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_2d_backward (A &&a, B &&b)
 Creates an expression representing the transposed 2D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_2d A, etl_2d B, etl_2d C>
auto conv_2d_backward (A &&a, B &&b, C &&c)
 Creates an expression representing the transposed '2D' convolution of a and b and store its result in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_2d A, etl_2d B>
conv_2d_backward_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_2d_backward_flipped (A &&a, B &&b)
 Creates an expression representing the 'backward' 1D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_2d A, etl_2d B, etl_2d C>
auto conv_2d_backward_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the transposed '2D' convolution of a and flipped b and store its result in c. More...
 
template<etl_expr A, etl_expr B>
conv_2d_full_deep_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_full_deep (A &&a, B &&b)
 Creates an expression representing the 'full' 1D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_full_deep (A &&a, B &&b, C &&c)
 Creates an expression representing the 'full' 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
conv_2d_full_deep_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_full_deep_flipped (A &&a, B &&b)
 Creates an expression representing the 'full' 1D convolution of a and flipped b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_full_deep_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'full' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<etl_2d A, etl_2d B>
conv_2d_full_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_full (A &&a, B &&b)
 Creates an expression representing the 'full' 1D convolution of a and b. More...
 
template<etl_2d A, etl_2d B, etl_2d C>
auto conv_2d_full (A &&a, B &&b, C &&c)
 Creates an expression representing the 'full' 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_2d A, etl_2d B>
conv_2d_full_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_full_flipped (A &&a, B &&b)
 Creates an expression representing the 'full' 1D convolution of a and flipped b. More...
 
template<etl_2d A, etl_2d B, etl_2d C>
auto conv_2d_full_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'full' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<etl_2d A, etl_3d B>
conv_2d_full_multi_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_full_multi (A &&a, B &&b)
 Creates an expression representing the 'full' 1D convolution of a and b. More...
 
template<etl_2d A, etl_3d B, etl_3d C>
auto conv_2d_full_multi (A &&a, B &&b, C &&c)
 Creates an expression representing the 'full' 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_2d A, etl_3d B>
conv_2d_full_multi_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_full_multi_flipped (A &&a, B &&b)
 Creates an expression representing the 'full' 1D convolution of a and flipped b. More...
 
template<etl_2d A, etl_3d B, etl_3d C>
auto conv_2d_full_multi_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'full' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
conv_2d_same_deep_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_same_deep (A &&a, B &&b)
 Creates an expression representing the 'same' 1D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_same_deep (A &&a, B &&b, C &&c)
 Creates an expression representing the 'same' 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
conv_2d_same_deep_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_same_deep_flipped (A &&a, B &&b)
 Creates an expression representing the 'same' 1D convolution of a and flipped b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_same_deep_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'same' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
conv_2d_same_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_same (A &&a, B &&b)
 Creates an expression representing the 'same' 1D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_same (A &&a, B &&b, C &&c)
 Creates an expression representing the 'same' 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
conv_2d_same_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_same_flipped (A &&a, B &&b)
 Creates an expression representing the 'same' 1D convolution of a and flipped b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_same_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'same' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
conv_2d_same_multi_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_same_multi (A &&a, B &&b)
 Creates an expression representing the 'same' 1D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_same_multi (A &&a, B &&b, C &&c)
 Creates an expression representing the 'same' 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
conv_2d_same_multi_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_same_multi_flipped (A &&a, B &&b)
 Creates an expression representing the 'same' 1D convolution of a and flipped b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_same_multi_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'same' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_deep_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_2d_valid_deep (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_deep (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_deep_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_2d_valid_deep_flipped (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_deep_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_2d_valid (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_2d_valid_flipped (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_multi_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_2d_valid_multi (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_multi (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_multi_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_2d_valid_multi_flipped (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_multi_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_multi_multi_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_2d_valid_multi_multi (A &&a, B &&b)
 Creates an expression representing the 'valid' 2D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_multi_multi (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 2D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_multi_multi_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_2d_valid_multi_multi_flipped (A &&a, B &&b)
 Creates an expression representing the 'valid' 2D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_multi_multi_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 2D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_4d_backward_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_4d_backward (A &&a, B &&b)
 Creates an expression representing the transposed 2D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_4d_backward (A &&a, B &&b, C &&c)
 Creates an expression representing the transposed 2D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_4d_backward_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_4d_backward_flipped (A &&a, B &&b)
 Creates an expression representing the transposed 2D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_4d_backward_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the transposed 2D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_backward_filter_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_4d_backward_filter (A &&a, B &&b)
 Creates an expression representing the 'backward' 1D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_backward_filter (A &&a, B &&b, C &&c)
 Creates an expression representing the 'backward' 1D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_backward_filter_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_4d_backward_filter_flipped (A &&a, B &&b)
 Creates an expression representing the 'backward' 1D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_backward_filter_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'backward' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<etl_4d A, etl_4d B>
conv_4d_full_expr< detail::build_type< A >, detail::build_type< B >, false > conv_4d_full (A &&a, B &&b)
 Creates an expression representing the 'full' 1D convolution of a and b. More...
 
template<etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_full (A &&a, B &&b, C &&c)
 Creates an expression representing the 'full' 1D convolution of a and b, the result will be stored in c. More...
 
template<etl_4d A, etl_4d B>
conv_4d_full_expr< detail::build_type< A >, detail::build_type< B >, true > conv_4d_full_flipped (A &&a, B &&b)
 Creates an expression representing the 'full' 1D convolution of a and flipped b. More...
 
template<etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_full_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'full' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_valid_back_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_4d_valid_back (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_valid_back (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_valid_back_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_4d_valid_back_flipped (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_valid_back_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_4d_valid_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_4d_valid (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_4d_valid (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_4d_valid_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_4d_valid_flipped (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto conv_4d_valid_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_valid_filter_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, false > conv_4d_valid_filter (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_valid_filter (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_valid_filter_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > conv_4d_valid_filter_flipped (A &&a, B &&b)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b. More...
 
template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_valid_filter_flipped (A &&a, B &&b, C &&c)
 Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c. More...
 
template<size_t K1, size_t K2, etl_2d A>
convmtx_2d_expr< detail::build_type< A >, K1, K2 > convmtx2_direct (A &&a)
 Construct a matrix to compute a 2D convolution by matrix-matrix multiplication. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_2d_backward_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_backward (A &&a, B &&b, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_backward (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed '2D' convolution of a and b and store its result in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_2d_backward_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_backward_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the 'backward' 1D convolution of a and flipped b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_backward_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed '2D' convolution of a and flipped b and store its result in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_valid (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 2D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_valid_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 2D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_multi_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_valid_multi (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 2D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_multi (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_multi_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_valid_multi_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 2D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_multi_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_multi_multi_expr< detail::build_type< A >, detail::build_type< B >, false > conv_2d_valid_multi_multi (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 2D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_multi_multi (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_multi_multi_expr< detail::build_type< A >, detail::build_type< B >, true > conv_2d_valid_multi_multi_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 2D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_2d_valid_multi_multi_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_4d_backward_expr< detail::build_type< A >, detail::build_type< B >, false > conv_4d_backward (A &&a, B &&b, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_4d_backward (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_4d_backward_expr< detail::build_type< A >, detail::build_type< B >, true > conv_4d_backward_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and flipped b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_4d_backward_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and flipped b, the result will be stored in c. More...
 
template<etl_4d A, etl_4d B>
dyn_conv_4d_backward_filter_expr< detail::build_type< A >, detail::build_type< B >, false > conv_4d_backward_filter (A &&a, B &&b, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and b. More...
 
template<etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_backward_filter (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and b, the result will be stored in c. More...
 
template<etl_4d A, etl_4d B>
dyn_conv_4d_backward_filter_expr< detail::build_type< A >, detail::build_type< B >, true > conv_4d_backward_filter_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and flipped b. More...
 
template<etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_backward_filter_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the transposed 2D convolution of a and flipped b, the result will be stored in c. More...
 
template<etl_4d A, etl_4d B>
dyn_conv_4d_valid_back_expr< detail::build_type< A >, detail::build_type< B >, false > conv_4d_valid_back (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 4d convolution of a and b. More...
 
template<etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_valid_back (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c. More...
 
template<etl_4d A, etl_4d B>
dyn_conv_4d_valid_back_expr< detail::build_type< A >, detail::build_type< B >, true > conv_4d_valid_back_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid_back 4d convolution of a and b. More...
 
template<etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_valid_back_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c. More...
 
template<etl_4d A, etl_4d B>
dyn_conv_4d_valid_expr< detail::build_type< A >, detail::build_type< B >, false > conv_4d_valid (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 4d convolution of a and b. More...
 
template<etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_valid (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c. More...
 
template<etl_4d A, etl_4d B>
dyn_conv_4d_valid_expr< detail::build_type< A >, detail::build_type< B >, true > conv_4d_valid_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 4d convolution of a and b. More...
 
template<etl_4d A, etl_4d B, etl_4d C>
auto conv_4d_valid_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_4d_valid_filter_expr< detail::build_type< A >, detail::build_type< B >, false > conv_4d_valid_filter (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid 4d convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_4d_valid_filter (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c. More...
 
template<etl_expr A, etl_expr B>
dyn_conv_4d_valid_filter_expr< detail::build_type< A >, detail::build_type< B >, true > conv_4d_valid_filter_flipped (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Creates an expression representing the valid_filter 4d convolution of a and b. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto conv_4d_valid_filter_flipped (A &&a, B &&b, C &&c, size_t s1, size_t s2, size_t p1, size_t p2)
 Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c. More...
 
template<etl_expr E>
dyn_pool_2d_expr< detail::build_type< E >, impl::max_pool_2dmax_pool_2d (E &&value, size_t c1, size_t c2)
 2D Max Pooling of the given matrix expression More...
 
template<etl_expr E>
dyn_pool_2d_expr< detail::build_type< E >, impl::max_pool_2dmax_pool_2d (E &&value, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 2D Max Pooling of the given matrix expression More...
 
template<etl_expr E>
dyn_pool_2d_expr< detail::build_type< E >, impl::avg_pool_2davg_pool_2d (E &&value, size_t c1, size_t c2)
 2D Average Pooling of the given matrix expression More...
 
template<etl_expr E>
dyn_pool_2d_expr< detail::build_type< E >, impl::avg_pool_2davg_pool_2d (E &&value, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 2D Average Pooling of the given matrix expression More...
 
template<etl_expr E>
dyn_pool_2d_expr< detail::build_type< E >, impl::standard::dyn_pmp_p_implp_max_pool_p (E &&value, size_t c1, size_t c2)
 Probabilistic Max Pooling for pooling units. More...
 
template<etl_expr E>
dyn_pool_3d_expr< detail::build_type< E >, impl::max_pool_3dmax_pool_3d (E &&value, size_t c1, size_t c2, size_t c3)
 3D Max Pooling of the given matrix expression More...
 
template<etl_expr E>
dyn_pool_3d_expr< detail::build_type< E >, impl::max_pool_3dmax_pool_3d (E &&value, size_t c1, size_t c2, size_t c3, size_t s1, size_t s2, size_t s3, size_t p1=0, size_t p2=0, size_t p3=0)
 3D Max Pooling of the given matrix expression More...
 
template<etl_expr E>
dyn_pool_3d_expr< detail::build_type< E >, impl::avg_pool_3davg_pool_3d (E &&value, size_t c1, size_t c2, size_t c3)
 3D Average Pooling of the given matrix expression More...
 
template<etl_expr E>
dyn_pool_3d_expr< detail::build_type< E >, impl::avg_pool_3davg_pool_3d (E &&value, size_t c1, size_t c2, size_t c3, size_t s1, size_t s2, size_t s3, size_t p1=0, size_t p2=0, size_t p3=0)
 3D Average Pooling of the given matrix expression More...
 
template<typename E , typename F >
dyn_pool_derivative_expr< detail::build_type< E >, F, impl::max_pool_derivative_2dmax_pool_derivative_2d (E &&input, F &&output, size_t c1, size_t c2)
 Derivative of the 2D Max Pooling of the given matrix expression. More...
 
template<typename E , typename F >
dyn_pool_derivative_expr< detail::build_type< E >, F, impl::max_pool_derivative_2dmax_pool_derivative_2d (E &&input, F &&output, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Derivative of the 2D Max Pooling of the given matrix expression. More...
 
template<typename E , typename F >
dyn_pool_derivative_expr< detail::build_type< E >, F, impl::max_pool_derivative_3dmax_pool_derivative_3d (E &&input, F &&output, size_t c1, size_t c2, size_t c3)
 Derivative of the 3D Max Pooling of the given matrix expression. More...
 
template<typename E , typename F >
dyn_pool_derivative_expr< detail::build_type< E >, F, impl::avg_pool_derivative_2davg_pool_derivative_2d (E &&input, F &&output, size_t c1, size_t c2)
 Derivative of the 2D Avg Pooling of the given matrix expression. More...
 
template<typename E , typename F >
dyn_pool_derivative_expr< detail::build_type< E >, F, impl::avg_pool_derivative_2davg_pool_derivative_2d (E &&input, F &&output, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Derivative of the 2D Avg Pooling of the given matrix expression. More...
 
template<typename E , typename F >
dyn_pool_derivative_expr< detail::build_type< E >, F, impl::avg_pool_derivative_3davg_pool_derivative_3d (E &&input, F &&output, size_t c1, size_t c2, size_t c3)
 Derivative of the 3D Avg Pooling of the given matrix expression. More...
 
template<typename A , typename B , typename C >
dyn_pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, true > max_pool_upsample_2d (A &&input, B &&output, C &&errors, size_t c1, size_t c2)
 Derivative of the 2D Max Pooling of the given matrix expression and upsampling. More...
 
template<typename A , typename B , typename C >
dyn_pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, true > max_pool_upsample_2d (A &&input, B &&output, C &&errors, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Derivative of the 2D Max Pooling of the given matrix expression and upsampling. More...
 
template<typename A , typename B , typename C >
dyn_pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, false > avg_pool_upsample_2d (A &&input, B &&output, C &&errors, size_t c1, size_t c2)
 Derivative of the 2D Average Pooling of the given matrix expression and upsampling. More...
 
template<typename A , typename B , typename C >
dyn_pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, false > avg_pool_upsample_2d (A &&input, B &&output, C &&errors, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Derivative of the 2D Average Pooling of the given matrix expression and upsampling. More...
 
template<typename A , typename B , typename C >
dyn_pool_upsample_3d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, true > max_pool_upsample_3d (A &&input, B &&output, C &&errors, size_t c1, size_t c2, size_t c3)
 Derivative of the 3D Max Pooling of the given matrix expression and upsampling. More...
 
template<typename A , typename B , typename C >
dyn_pool_upsample_3d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, false > avg_pool_upsample_3d (A &&input, B &&output, C &&errors, size_t c1, size_t c2, size_t c3)
 Derivative of the 3D Average Pooling of the given matrix expression and upsampling. More...
 
template<etl_expr E>
dyn_prob_pool_2d_expr< detail::build_type< E > > p_max_pool_h (E &&value, size_t c1, size_t c2)
 Probabilistic Max Pooling for hidden units. More...
 
template<etl_expr E>
dyn_upsample_2d_expr< detail::build_type< E > > upsample_2d (E &&value, size_t c1, size_t c2)
 Upsample the given 2D matrix expression. More...
 
template<etl_expr E>
dyn_upsample_2d_expr< detail::build_type< E > > upsample_2d (E &&value, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0)
 Upsample the given 2D matrix expression. More...
 
template<etl_expr E>
dyn_upsample_3d_expr< detail::build_type< E > > upsample_3d (E &&value, size_t c1, size_t c2, size_t c3)
 Upsample the given 3D matrix expression. More...
 
template<etl_1d I, etl_2d E, etl_expr W>
embedding_gradients_expr< detail::build_type< I >, detail::build_type< E >, detail::build_type< W > > embedding_gradients (const I &value, const E &errors, const W &vocab)
 Returns the embeddings for the given sequence. More...
 
template<etl_1d I, etl_2d V>
embedding_lookup_expr< detail::build_type< I >, detail::build_type< V > > embedding_lookup (const I &value, const V &vocab)
 Returns the embeddings for the given sequence. More...
 
template<etl_expr A>
fft_expr< detail::build_type< A >, detail::fft_value_type< A >, detail::fft1_implfft_1d (A &&a)
 Creates an expression representing the 1D Fast-Fourrier-Transform of the given expression. More...
 
template<etl_expr A, etl_expr C>
auto fft_1d (A &&a, C &&c)
 Creates an expression representing the 1D Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<etl_expr A>
fft_expr< detail::build_type< A >, detail::ifft_value_type< A >, detail::ifft1_implifft_1d (A &&a)
 Creates an expression representing the 1D inverse Fast-Fourrier-Transform of the given expression. More...
 
template<etl_expr A, etl_expr C>
auto ifft_1d (A &&a, C &&c)
 Creates an expression representing the 1D inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<etl_expr A>
fft_expr< detail::build_type< A >, detail::ifft_real_value_type< A >, detail::ifft1_real_implifft_1d_real (A &&a)
 Creates an expression representing the real part of the 1D inverse Fast-Fourrier-Transform of the given expression. More...
 
template<etl_expr A, etl_expr C>
auto ifft_1d_real (A &&a, C &&c)
 Creates an expression representing the real part of the 1D inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<etl_expr A>
fft_expr< detail::build_type< A >, detail::fft_value_type< A >, detail::fft2_implfft_2d (A &&a)
 Creates an expression representing the 2D Fast-Fourrier-Transform of the given expression. More...
 
template<etl_expr A, etl_expr C>
auto fft_2d (A &&a, C &&c)
 Creates an expression representing the 2D Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<etl_expr A>
fft_expr< detail::build_type< A >, detail::ifft_value_type< A >, detail::ifft2_implifft_2d (A &&a)
 Creates an expression representing the 2D inverse Fast-Fourrier-Transform of the given expression. More...
 
template<etl_expr A, etl_expr C>
auto ifft_2d (A &&a, C &&c)
 Creates an expression representing the 2D inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<etl_expr A>
fft_expr< detail::build_type< A >, detail::ifft_real_value_type< A >, detail::ifft2_real_implifft_2d_real (A &&a)
 Creates an expression representing the real part of the 2D inverse Fast-Fourrier-Transform of the given expression. More...
 
template<etl_expr A, etl_expr C>
auto ifft_2d_real (A &&a, C &&c)
 Creates an expression representing the real part of the 2D inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<matrix A>
fft_expr< detail::build_type< A >, detail::fft_value_type< A >, detail::fft1_many_implfft_1d_many (A &&a)
 Creates an expression representing several 1D Fast-Fourrier-Transform of the given expression. More...
 
template<matrix A, matrix C>
auto fft_1d_many (A &&a, C &&c)
 Creates an expression representing several 1D Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<matrix A>
fft_expr< detail::build_type< A >, detail::ifft_value_type< A >, detail::ifft1_many_implifft_1d_many (A &&a)
 Creates an expression representing several 1D Inverse Fast-Fourrier-Transform of the given expression. More...
 
template<matrix A, matrix C>
auto ifft_1d_many (A &&a, C &&c)
 Creates an expression representing several 1D Inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<deep_mat A>
fft_expr< detail::build_type< A >, detail::fft_value_type< A >, detail::fft2_many_implfft_2d_many (A &&a)
 Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression. More...
 
template<deep_mat A, deep_mat C>
auto fft_2d_many (A &&a, C &&c)
 Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<deep_mat A>
fft_expr< detail::build_type< A >, detail::ifft_value_type< A >, detail::ifft2_many_implifft_2d_many (A &&a)
 Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression. More...
 
template<deep_mat A, deep_mat C>
auto ifft_2d_many (A &&a, C &&c)
 Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression, the result will be stored in c. More...
 
template<etl_2d A, etl_2d B>
auto operator* (A &&a, B &&b)
 Multiply two matrices together. More...
 
template<etl_2d A, etl_2d B>
auto mul (A &&a, B &&b)
 Multiply two matrices together. More...
 
template<etl_2d A, etl_2d B>
gemm_expr< A, B, false > operator* (value_t< A > alpha, gemm_expr< A, B, false > &&gemm)
 Create an expression for alpha * (A * B) More...
 
template<etl_2d A, etl_2d B>
gemm_expr< A, B, false > mul (value_t< A > alpha, gemm_expr< A, B, false > &&gemm)
 Create an expression for alpha * (A * B) More...
 
template<etl_2d A, etl_2d B, etl_2d C>
auto mul (A &&a, B &&b, C &&c)
 Multiply two matrices together and store the result in c. More...
 
template<etl_2d A, etl_2d B>
auto strassen_mul (A &&a, B &&b)
 Multiply two matrices together using strassen. More...
 
template<etl_2d A, etl_2d B, etl_2d C>
auto strassen_mul (A &&a, B &&b, C &&c)
 Multiply two matrices together using strassen and store the result in c. More...
 
template<etl_expr A>
inv_expr< A > inv (A &&a)
 Creates an expression representing the Inverse of the given expression. More...
 
template<etl_expr A, etl_expr B>
outer_product_expr< detail::build_type< A >, detail::build_type< B > > outer (A &&a, B &&b)
 Outer product multiplication of two matrices. More...
 
template<etl_expr A, etl_expr B, etl_expr C>
auto outer (A &&a, B &&b, C &&c)
 Outer product multiplication of two matrices and store the result in c. More...
 
template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr E>
pool_2d_expr< detail::build_type< E >, C1, C2, S1, S2, P1, P2, impl::max_pool_2dmax_pool_2d (E &&value)
 2D Max Pooling of the given matrix expression More...
 
template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr E>
pool_2d_expr< detail::build_type< E >, C1, C2, S1, S2, P1, P2, impl::avg_pool_2davg_pool_2d (E &&value)
 2D Average Pooling of the given matrix expression More...
 
template<size_t C1, size_t C2, etl_expr E>
pool_2d_expr< detail::build_type< E >, C1, C2, C1, C2, 0, 0, impl::standard::pmp_p_implp_max_pool_p (E &&value)
 Probabilistic Max Pooling for pooling units. More...
 
template<size_t C1, size_t C2, size_t C3, size_t S1 = C1, size_t S2 = C2, size_t S3 = C3, size_t P1 = 0, size_t P2 = 0, size_t P3 = 0, etl_expr E>
pool_3d_expr< detail::build_type< E >, C1, C2, C3, S1, S2, S3, P1, P2, P3, impl::max_pool_3dmax_pool_3d (E &&value)
 3D Max Pooling of the given matrix expression More...
 
template<size_t C1, size_t C2, size_t C3, size_t S1 = C1, size_t S2 = C2, size_t S3 = C3, size_t P1 = 0, size_t P2 = 0, size_t P3 = 0, etl_expr E>
pool_3d_expr< detail::build_type< E >, C1, C2, C3, S1, S2, S3, P1, P2, P3, impl::avg_pool_3davg_pool_3d (E &&value)
 3D Average Pooling of the given matrix expression More...
 
template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr E, etl_expr F>
pool_derivative_expr< detail::build_type< E >, F, C1, C2, 0, S1, S2, 0, P1, P2, 0, impl::max_pool_derivative_2dmax_pool_derivative_2d (E &&input, F &&output)
 Derivative of the 2D Max Pooling of the given matrix expression. More...
 
template<size_t C1, size_t C2, size_t C3, etl_expr E, etl_expr F>
pool_derivative_expr< detail::build_type< E >, F, C1, C2, C3, C1, C2, C3, 0, 0, 0, impl::max_pool_derivative_3dmax_pool_derivative_3d (E &&input, F &&output)
 Derivative of the 3D Max Pooling of the given matrix expression. More...
 
template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr E, etl_expr F>
pool_derivative_expr< detail::build_type< E >, F, C1, C2, 0, S1, S2, 0, P1, P2, 0, impl::avg_pool_derivative_2davg_pool_derivative_2d (E &&input, F &&output)
 Derivative of the 2D Avg Pooling of the given matrix expression. More...
 
template<size_t C1, size_t C2, size_t C3, etl_expr E, etl_expr F>
pool_derivative_expr< detail::build_type< E >, F, C1, C2, C3, C1, C2, C3, 0, 0, 0, impl::avg_pool_derivative_3davg_pool_derivative_3d (E &&input, F &&output)
 Derivative of the 3D Avg Pooling of the given matrix expression. More...
 
template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, C1, C2, S1, S2, P1, P2, true > max_pool_upsample_2d (A &&input, B &&output, C &&errors)
 Derivative of the 2D Max Pooling of the given matrix expression and upsampling. More...
 
template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, C1, C2, S1, S2, P1, P2, false > avg_pool_upsample_2d (A &&input, B &&output, C &&errors)
 Derivative of the 2D Avg Pooling of the given matrix expression and upsampling. More...
 
template<size_t C1, size_t C2, size_t C3, typename A , typename B , typename C >
pool_upsample_3d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, C1, C2, C3, true > max_pool_upsample_3d (A &&input, B &&output, C &&errors)
 Derivative of the 3D Max Pooling of the given matrix expression and upsampling. More...
 
template<size_t C1, size_t C2, size_t C3, typename A , typename B , typename C >
pool_upsample_3d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, C1, C2, C3, false > avg_pool_upsample_3d (A &&input, B &&output, C &&errors)
 Derivative of the 3D Average Pooling of the given matrix expression and upsampling. More...
 
template<size_t C1, size_t C2, typename E >
prob_pool_2d_expr< detail::build_type< E >, C1, C2 > p_max_pool_h (E &&value)
 Probabilistic Max Pooling for hidden units. More...
 
template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, typename E >
upsample_2d_expr< detail::build_type< E >, C1, C2, S1, S2, P1, P2 > upsample_2d (E &&value)
 Upsample the given 2D matrix expression. More...
 
template<size_t C1, size_t C2, size_t C3, etl_expr E>
upsample_3d_expr< detail::build_type< E >, C1, C2, C3 > upsample_3d (E &&value)
 Upsample the given 3D matrix expression. More...
 
template<size_t... Dims, typename T >
fast_matrix_impl< T, std::span< T >, order::RowMajor, Dims... > fast_matrix_over (T *memory)
 Create a fast_matrix of the given dimensions over the given memory. More...
 
template<typename T , typename ST , order SO, size_t... Dims>
void swap (fast_matrix_impl< T, ST, SO, Dims... > &lhs, fast_matrix_impl< T, ST, SO, Dims... > &rhs)
 Swaps the given two matrices. More...
 
template<typename Stream , typename T , typename ST , order SO, size_t... Dims>
void serialize (serializer< Stream > &os, const fast_matrix_impl< T, ST, SO, Dims... > &matrix)
 Serialize the given matrix using the given serializer. More...
 
template<typename Stream , typename T , typename ST , order SO, size_t... Dims>
void deserialize (deserializer< Stream > &os, fast_matrix_impl< T, ST, SO, Dims... > &matrix)
 Deserialize the given matrix using the given serializer. More...
 
template<etl_expr E>
bool is_square (E &&expr)
 Indicates if the given expression is a square matrix or not. More...
 
template<etl_expr E>
bool is_real_matrix ([[maybe_unused]] E &&expr)
 Indicates if the given expression is a real matrix or not. More...
 
template<etl_expr E>
bool is_complex_matrix ([[maybe_unused]] E &&expr)
 Indicates if the given expression is a complex matrix or not. More...
 
template<etl_expr E>
bool is_rectangular (E &&expr)
 Indicates if the given expression is a rectangular matrix or not. More...
 
template<etl_expr E>
bool is_sub_square (E &&expr)
 Indicates if the given expression contains sub matrices that are square. More...
 
template<etl_expr E>
bool is_sub_rectangular (E &&expr)
 Indicates if the given expression contains sub matrices that are rectangular. More...
 
template<typename E >
bool is_uniform (E &&expr)
 Indicates if the given expression is uniform (all elements of the same value) More...
 
template<typename E >
bool is_permutation_matrix (E &&expr)
 Indicates if the given expression represents a permutation matrix. More...
 
template<etl_expr L, etl_expr R>
bool operator== (L &&lhs, R &&rhs)
 Compare two ETL expressions for equality. More...
 
template<etl_expr L, etl_expr R>
bool operator!= (L &&lhs, R &&rhs)
 Compare the expression with another expression for inequality. More...
 
template<std::floating_point T, std::floating_point TE = T>
bool approx_equals_float (T a, T b, TE epsilon)
 Test if two floating point numbers are approximately equals. More...
 
template<etl_expr L, etl_expr E>
bool approx_equals (L &&lhs, E &&rhs, value_t< L > eps)
 Test if two ETL expression are approximately equals. More...
 
template<etl_expr E>
value_t< E > trace (E &&expr)
 Returns the trace of the given square matrix. More...
 
template<etl_expr E>
value_t< E > determinant (E &&expr)
 Returns the determinant of the given square matrix. More...
 
template<etl_expr AT, etl_expr LT, etl_expr UT, etl_expr PT>
bool lu (const AT &A, LT &L, UT &U, PT &P)
 Decomposition the matrix so that P * A = L * U. More...
 
template<etl_expr AT, etl_expr QT, etl_expr RT>
bool qr (AT &A, QT &Q, RT &R)
 Decomposition the matrix so that A = Q * R. More...
 
template<etl_expr T, typename G >
void shuffle_flat (T &vector, G &&g)
 Shuffle all the elements of an ETL vector or matrix (considered as array). More...
 
template<etl_expr T>
void shuffle_flat (T &vector)
 Shuffle all the elements of an ETL vector or matrix (considered as array) More...
 
template<etl_expr T, typename G >
void shuffle_first (T &matrix, G &&g)
 Shuffle all the elements of a matrix. More...
 
template<etl_expr T>
void shuffle_first (T &matrix)
 Shuffle all the elements of a matrix. More...
 
template<etl_expr T>
void shuffle (T &vector)
 Shuffle all the elements of an ETL vector. More...
 
template<etl_expr T, typename G >
void shuffle (T &vector, G &&g)
 Shuffle all the elements of an ETL vector. More...
 
template<etl_expr T1, same_dimensions< T1 > T2, typename G >
void parallel_shuffle_flat (T1 &v1, T2 &v2, G &&g)
 Shuffle all the elements of two vectors, using the same permutation. More...
 
template<etl_expr T1, etl_expr T2>
void parallel_shuffle_flat (T1 &v1, T2 &v2)
 Shuffle all the elements of two vectors, using the same permutation. More...
 
template<etl_expr T1, etl_expr T2, typename G >
void parallel_shuffle_first (T1 &m1, T2 &m2, G &&g)
 Shuffle all the elements of two matrices, using the same permutation. More...
 
template<etl_expr T1, etl_expr T2>
void parallel_shuffle_first (T1 &m1, T2 &m2)
 Shuffle all the elements of two matrices, using the same permutation. More...
 
template<etl_expr T1, etl_expr T2>
void parallel_shuffle (T1 &v1, T2 &v2)
 Shuffle all the elements of two vectors or matrices, using the same permutation. More...
 
template<etl_expr T>
void shuffle_swap (T &v1, size_t i, size_t new_i)
 
template<etl_expr T1, etl_expr T2, typename G >
void parallel_shuffle (T1 &v1, T2 &v2, G &&g)
 Shuffle all the elements of two vectors or matrices, using the same permutation. More...
 
template<etl_expr M, etl_expr N>
M & merge (M &merged, const N &sub, size_t index)
 Merge sub inside merged at the given position. More...
 
template<etl_expr M, etl_expr N>
M & batch_merge (M &merged, const N &sub, size_t index)
 Merge sub inside merged at the given position, for each batch. More...
 
template<etl_expr M, etl_expr N>
M & dispatch (M &dispatched, const N &merged, size_t index)
 Dispatch a part of merged to dispatched from the given position. More...
 
template<etl_expr M, etl_expr N>
M & batch_dispatch (M &dispatched, const N &merged, size_t index)
 Dispatch a part of merged to dispatched from the given position, for each batch. More...
 
template<etl_expr M, typename T >
void binarize (M &matrix, T b)
 Binarize the given ETL contrainer. More...
 
template<etl_expr M>
void normalize_flat (M &matrix)
 Normalize the given ETL contrainer to zero-mean and unit-variance. More...
 
template<etl_expr M>
void normalize_sub (M &matrix)
 Normalize each sub container of the given ETL contrainer to zero-mean and unit-variance. More...
 
template<typename E >
constexpr size_t dimensions ([[maybe_unused]] const E &expr) noexcept
 Return the number of dimensions of the given ETL expression. More...
 
template<typename E >
constexpr size_t dimensions () noexcept
 Return the number of dimensions of the given ETL type. More...
 
template<typename E >
constexpr int complexity ([[maybe_unused]] const E &expr) noexcept
 Return the complexity of the expression. More...
 
template<typename E >
constexpr int complexity () noexcept
 Return the complexity of the expression. More...
 
template<dyn_expr E>
size_t rows (const E &expr)
 Returns the number of rows of the given ETL expression. More...
 
template<fast_expr E>
constexpr size_t rows (const E &expr) noexcept
 Returns the number of rows of the given ETL expression. More...
 
template<dyn_matrix_c E>
size_t columns (const E &expr)
 Returns the number of columns of the given ETL expression. More...
 
template<fast_matrix_c E>
constexpr size_t columns (const E &expr) noexcept
 Returns the number of columns of the given ETL expression. More...
 
template<dyn_expr E>
size_t size (const E &expr)
 Returns the size of the given ETL expression. More...
 
template<fast_expr E>
constexpr size_t size (const E &expr) noexcept
 Returns the size of the given ETL expression. More...
 
template<dyn_matrix_c E>
size_t subsize (const E &expr)
 Returns the sub-size of the given ETL expression, i.e. the size not considering the first dimension. More...
 
template<fast_matrix_c E>
constexpr size_t subsize (const E &expr) noexcept
 Returns the sub-size of the given ETL expression, i.e. the size not considering the first dimension. More...
 
template<size_t D, dyn_expr E>
size_t dim (const E &e) noexcept
 Return the D dimension of e. More...
 
template<etl_expr E>
size_t dim (const E &e, size_t d) noexcept
 Return the d dimension of e. More...
 
template<size_t D, fast_expr E>
constexpr size_t dim (const E &e) noexcept
 Return the D dimension of e. More...
 
template<size_t D, fast_expr E>
constexpr size_t dim () noexcept
 Return the D dimension of E. More...
 
template<typename E >
 requires (generator< E >) struct safe_dimensions_impl< E >
 Utility to get the dimensions of an expressions, with support for generator.
 
template<typename E >
 requires (!generator< E >) struct safe_dimensions_impl< E >
 Utility to get the dimensions of an expressions, with support for generator.
 
template<typename E >
constexpr std::pair< size_t, size_t > index_to_2d (E &&sub, size_t i)
 Convert a flat index into a 2D index. More...
 
template<etl_2d E>
size_t row_stride (E &&expr)
 Returns the row stride of the given ETL matrix expression. More...
 
template<etl_2d E>
size_t col_stride (E &&expr)
 Returns the column stride of the given ETL matrix expression. More...
 
template<etl_2d E>
size_t minor_stride (E &&expr)
 Returns the minor stride of the given ETL matrix expression. More...
 
template<etl_2d E>
size_t major_stride (E &&expr)
 Returns the major stride of the given ETL matrix expression. More...
 
template<typename P1 , typename P2 >
bool memory_alias (const P1 *a_begin, const P1 *a_end, const P2 *b_begin, const P2 *b_end)
 Test if two memory ranges overlap. More...
 
template<typename E >
void safe_ensure_cpu_up_to_date (E &&expr)
 Ensure that the CPU is up to date. More...
 
template<typename E >
bool safe_is_cpu_up_to_date (E &&expr)
 Indicates if the CPU memory is up to date. If the expression does not have direct memory access, return true. More...
 
template<typename E >
bool safe_is_gpu_up_to_date (E &&expr)
 Indicates if the GPU memory is up to date. If the expression does not have direct memory access, return false. More...
 
template<typename E >
decltype(auto) smart_forward (E &expr)
 Smart forwarding for a temporary expression. More...
 
template<typename E >
decltype(auto) smart_forward_gpu (E &expr)
 Smart forwarding for a temporary expression that will be computed in GPU. More...
 
template<typename E , typename Y >
decltype(auto) smart_gpu_compute_hint (E &expr, Y &y)
 Compute the expression into a representation that is GPU up to date. More...
 
template<typename X , typename Y >
decltype(auto) smart_gpu_compute (X &x, Y &y)
 Compute the expression into a representation that is GPU up to date and store this representation in y. More...
 
template<typename X , typename Y >
decltype(auto) select_smart_gpu_compute (X &x, Y &y)
 Compute the expression into a representation that is GPU up to date and possibly store this representation in y. More...
 
template<etl_1d T>
constexpr size_t fast_index (size_t i) noexcept(assert_nothrow)
 Compute the index for a 1D fast matrix. More...
 
template<etl_2d T>
constexpr size_t fast_index (size_t i, size_t j) noexcept(assert_nothrow)
 Compute the index for a 2D fast matrix. More...
 
template<etl_3d T>
constexpr size_t fast_index (size_t i, size_t j, size_t k) noexcept(assert_nothrow)
 Compute the index for a 3D fast matrix. More...
 
template<etl_4d T>
constexpr size_t fast_index (size_t i, size_t j, size_t k, size_t l) noexcept(assert_nothrow)
 Compute the index for a 4D fast matrix. More...
 
template<typename T , typename... S>
constexpr size_t fast_index (S... sizes) noexcept(assert_nothrow) requires(sizeof...(S) > 4 &&decay_traits< T >
 Compute the index for a N-D fast matrix. More...
 
template<etl_1d T>
size_t dyn_index ([[maybe_unused]] const T &expression, size_t i) noexcept(assert_nothrow)
 Compute the index for a 1D dynamic matrix. More...
 
template<etl_2d T>
size_t dyn_index (const T &expression, size_t i, size_t j) noexcept(assert_nothrow)
 Compute the index for a 2D dynamic matrix. More...
 
template<etl_3d T>
size_t dyn_index (const T &expression, size_t i, size_t j, size_t k) noexcept(assert_nothrow)
 Compute the index for a 3D dynamic matrix. More...
 
template<etl_4d T>
size_t dyn_index (const T &expression, size_t i, size_t j, size_t k, size_t l) noexcept(assert_nothrow)
 Compute the index for a 4D dynamic matrix. More...
 
template<typename T , typename... S>
size_t dyn_index (const T &expression, S... sizes) noexcept(assert_nothrow) requires(sizeof...(S) > 4 &&decay_traits< T >
 Compute the index for a N-D dynamic matrix. More...
 
template<typename S , typename T >
void direct_copy (const S *first, const S *last, T *target)
 Performs a direct memory copy. More...
 
template<typename S , typename T >
void direct_copy_n (const S *source, T *target, size_t n)
 Performs a direct memory copy. More...
 
template<typename S , typename T >
void direct_fill (S *first, S *last, T value)
 Fills the given memory with the given value. More...
 
template<typename S , typename T >
void direct_fill_n (S *first, size_t n, T value)
 Fills the given memory with the given value. More...
 
template<etl_expr T, size_t D>
 requires (!is_dma< T >) struct dyn_matrix_view< T
 View to represent a dyn matrix in top of an expression. More...
 
template<typename... S>
 dyn_matrix_view (sub_type sub, S... dims)
 Construct a new dyn_matrix_view over the given sub expression. More...
 
const_return_type operator[] (size_t j) const
 Returns the element at the given index. More...
 
const_return_type operator() (size_t j) const
 Access to the element at the given position. More...
 
template<typename... S>
const_return_type operator() (size_t f1, size_t f2, S... sizes) const
 Access to the element at the given position. More...
 
value_type read_flat (size_t j) const noexcept
 Returns the value at the given index This function never has side effects. More...
 
template<typename... S>
return_type operator() (size_t f1, size_t f2, S... sizes)
 Access to the element at the given (i,j) position. More...
 
template<typename V = default_vec>
auto load (size_t x) const noexcept
 Load several elements of the expression at once. More...
 
template<typename V = default_vec>
auto loadu (size_t x) const noexcept
 Load several elements of the expression at once. More...
 
template<typename V = default_vec>
void stream (vec_type< V > in, size_t i) noexcept
 Store several elements in the matrix at once, using non-temporal store. More...
 
template<typename V = default_vec>
void store (vec_type< V > in, size_t i) noexcept
 Store several elements in the matrix at once. More...
 
template<typename V = default_vec>
void storeu (vec_type< V > in, size_t i) noexcept
 Store several elements in the matrix at once. More...
 
template<typename E >
bool alias (const E &rhs) const noexcept
 Test if this expression aliases with the given expression. More...
 
template<typename L >
void assign_to (L &&lhs) const
 Assign to the given left-hand-side expression. More...
 
template<typename L >
void assign_add_to (L &&lhs) const
 Add to the given left-hand-side expression. More...
 
template<typename L >
void assign_sub_to (L &&lhs) const
 Sub from the given left-hand-side expression. More...
 
template<typename L >
void assign_mul_to (L &&lhs) const
 Multiply the given left-hand-side expression. More...
 
template<typename L >
void assign_div_to (L &&lhs) const
 Divide the given left-hand-side expression. More...
 
template<typename L >
void assign_mod_to (L &&lhs) const
 Modulo the given left-hand-side expression. More...
 
void visit (detail::evaluator_visitor &visitor) const
 Apply the given visitor to this expression and its descendants. More...
 
void ensure_cpu_up_to_date () const
 Ensures that the GPU memory is allocated and that the GPU memory is up to date (to undefined value). More...
 
void ensure_gpu_up_to_date () const
 Copy back from the GPU to the expression memory if necessary. More...
 
std::ostream & operator<< (std::ostream &os, const dyn_matrix_view &v)
 Print a representation of the view on the given stream. More...
 
template<etl_expr T, size_t D>
 requires (is_dma< T >) struct dyn_matrix_view< T
 View to represent a dyn matrix in top of an expression. More...
 
template<typename T >
 requires (cpp::specialization_of< etl::hflip_transformer, T >||cpp::specialization_of< etl::vflip_transformer, T >||cpp::specialization_of< etl::fflip_transformer, T >||cpp::specialization_of< etl::one_if_max_sub_transformer, T >) struct etl_traits< T >
 Specialization for forwarding everything to the sub expression. More...
 
template<bool Aligned = false, etl_expr E>
auto memory_slice (E &&value, size_t first, size_t last) -> detail::identity_helper< E, memory_slice_view< detail::build_identity_type< E >, Aligned >>
 Returns view representing a memory slice view of the given expression. More...
 
template<typename T >
 requires (cpp::specialization_of< etl::argmax_transformer, T >||cpp::specialization_of< etl::argmin_transformer, T >||cpp::specialization_of< etl::sum_r_transformer, T >||cpp::specialization_of< etl::mean_r_transformer, T >) struct etl_traits< T >
 Specialization for (sum-mean)_r_transformer. More...
 
template<typename T >
 requires (cpp::specialization_of< etl::sum_l_transformer, T >||cpp::specialization_of< etl::mean_l_transformer, T >) struct etl_traits< T >
 Specialization for (sum-mean)_r_transformer. More...
 
template<typename T >
 requires (!fast_slice_view_able< T >) struct slice_view< T >
 Specialization of slice_view for non-DMA types. More...
 
template<typename T >
 requires (fast_slice_view_able< T >) struct slice_view< T >
 Specialization of slice_view for DMA types. More...
 
template<matrix T, bool Aligned>
 requires (!fast_sub_view_able< T >) struct sub_view< T
 View that shows a sub matrix of an expression. More...
 
 sub_view (sub_type sub_expr, size_t i)
 Construct a new sub_view over the given sub expression. More...
 
template<typename... S>
 operator() (S... args) const requires(sizeof...(S)+1
 Access to the element at the given (args...) position. More...
 
template<matrix T, bool Aligned>
 requires (fast_sub_view_able< T >) struct sub_view< T
 View that shows a sub matrix of an expression. More...
 
template<typename Y >
const auto & gpu_compute_hint ([[maybe_unused]] Y &y) const
 Return a GPU computed version of this expression. More...
 
value_typegpu_memory () const noexcept
 Return GPU memory of this expression, if any. More...
 
void gpu_evict () const noexcept
 Evict the expression from GPU.
 
void invalidate_cpu () const noexcept
 Invalidates the CPU memory.
 
void invalidate_gpu () const noexcept
 Invalidates the GPU memory.
 
void validate_cpu () const noexcept
 Validates the CPU memory.
 
void validate_gpu () const noexcept
 Validates the GPU memory.
 
void ensure_gpu_allocated () const
 Ensures that the GPU memory is allocated and that the GPU memory is up to date (to undefined value).
 
void gpu_copy_from ([[maybe_unused]] const value_type *new_gpu_memory) const
 Copy from GPU to GPU. More...
 
bool is_cpu_up_to_date () const noexcept
 Indicates if the CPU memory is up to date. More...
 
bool is_gpu_up_to_date () const noexcept
 Indicates if the GPU memory is up to date. More...
 
std::ostream & operator<< (std::ostream &os, const sub_view &v)
 Print a representation of the view on the given stream. More...
 
template<typename A , typename M >
void convmtx2_direct_t (M &m, A &&sub, size_t k1, size_t k2)
 Compute the convolution matrix of sub into m for a kernel of size (k1,k2) More...
 
template<typename A , typename M >
void im2col_direct (M &m, A &&sub, size_t k1, size_t k2)
 Convert an image to a sequence of image columns to be multiplied by kernels of size (k1,k2) More...
 
template<etl_dma A, etl_dma M>
void im2col_direct_tr (M &m, A &&sub, size_t k1, size_t k2)
 Convert an image to a sequence of image columns to be multiplied by kernels of size (k1,k2). More...
 
template<etl_dma A, etl_dma M>
void im2col_direct_tr_multi (M &m, A &&sub, size_t k1, size_t k2)
 Convert a sequence of images to a sequence of image columns to be multiplied by kernels of size (k1,k2). More...
 
template<typename Expr >
bool is_optimizable (const Expr &expr)
 Function to test if expr is optimizable. More...
 
template<typename Expr >
bool is_optimizable_deep (const Expr &expr)
 Function to test if expr or sub parts of expr are optimizable. More...
 
template<typename Builder , typename Expr >
void transform (Builder parent_builder, const Expr &expr)
 Function to transform the expression into its optimized form. More...
 
template<typename Builder , typename Expr >
void optimize (Builder parent_builder, Expr &expr)
 Optimize an expression and reconstruct the parent from the optimized expression. More...
 
template<typename Expr , typename Result >
void optimized_forward (Expr &expr, Result result)
 Optimize an expression and pass the optimized expression to the given functor. More...
 
constexpr order reverse (order o)
 Reverse the given storage order. More...
 
bool is_parallel_session ()
 Indicates if a parallel session is currently active. More...
 
bool engine_select_parallel ([[maybe_unused]] size_t n, [[maybe_unused]] size_t threshold=parallel_threshold)
 Indicates if an 1D evaluation should run in paralle. More...
 
bool engine_select_parallel ([[maybe_unused]] bool select)
 Indicates if an 1D evaluation should run in paralle. More...
 
template<typename Functor >
void engine_dispatch_1d (Functor &&functor, size_t first, size_t last, [[maybe_unused]] size_t threshold, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine. More...
 
template<typename Functor >
void engine_dispatch_1d_serial (Functor &&functor, size_t first, size_t last, size_t threshold, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine. More...
 
template<typename Functor >
void engine_dispatch_1d_serial_cpu (Functor &&functor, size_t first, size_t last, size_t threshold, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine. More...
 
template<typename Functor >
void engine_dispatch_1d_cpu (Functor &&functor, size_t first, size_t last, size_t threshold, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine. More...
 
template<typename Functor >
void engine_dispatch_1d (Functor &&functor, size_t first, size_t last, [[maybe_unused]] bool select, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine. More...
 
template<typename Functor >
void engine_dispatch_1d_serial (Functor &&functor, size_t first, size_t last, bool select, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine. More...
 
template<typename Functor >
void engine_dispatch_1d_serial_cpu (Functor &&functor, size_t first, size_t last, bool select, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine. More...
 
template<typename Functor >
void engine_dispatch_1d_cpu (Functor &&functor, size_t first, size_t last, bool select, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine. More...
 
template<typename T , typename Functor , typename AccFunctor >
void engine_dispatch_1d_acc (Functor &&functor, AccFunctor &&acc_functor, size_t first, size_t last, [[maybe_unused]] size_t threshold, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of a range to a functor in a parallel manner and use an accumulator functor to accumulate the results. More...
 
template<typename E , typename Functor , typename AccFunctor >
void engine_dispatch_1d_acc_slice (E &&expr, Functor &&functor, AccFunctor &&acc_functor, [[maybe_unused]] size_t threshold, [[maybe_unused]] size_t n_threads=etl::threads)
 Dispatch the elements of an ETL container in a parallel manner and use an accumulator functor to accumulate the results. More...
 
template<typename T >
std::string to_string (T &&m)
 Construct a textual representation of the matrix contents. More...
 
template<bool Sub = false, typename T >
std::string to_octave (T &&m)
 Construct a textual representation of the matrix contents, following the octave format. More...
 
template<typename T , size_t D>
 requires (D==2) struct sparse_matrix_impl< T
 Sparse matrix implementation with COO storage type. More...
 
template<dyn_expr T>
auto s (T &&value)
 Force the evaluation of the given expression. More...
 
template<typename E >
decltype(auto) force_temporary (E &&expr)
 Force a temporary out of the expression. More...
 
template<typename E >
decltype(auto) force_temporary_dyn (E &&expr)
 Force a dynamic temporary out of the expression. More...
 
template<typename E >
decltype(auto) force_temporary_opp (E &&expr)
 Force a temporary out of the expression, with opposite storage order. More...
 
template<typename E >
decltype(auto) force_temporary_dim_only (E &&expr)
 Force a temporary out of the expression with the same dimensions, but the content is not defined. The expression will not be evaluated. More...
 
template<typename E >
decltype(auto) make_temporary (E &&expr)
 Make a temporary out of the expression if necessary. More...
 
template<typename E >
decltype(auto) force_temporary_gpu (E &&expr)
 Force a temporary out of the expression. More...
 
template<typename E >
decltype(auto) force_temporary_gpu_dim_only (E &&expr)
 Force a temporary out of the expression, without copying its content. More...
 
template<typename T , typename E >
decltype(auto) force_temporary_gpu_dim_only_t (E &&expr)
 Force a temporary out of the expression, without copying its content and using the specified type. More...
 
template<size_t S, size_t I, size_t F, size_t... Dims>
constexpr size_t nth_size ()
 Traits to get the Sth dimension in Dims.. More...
 
template<size_t D1, size_t... D>
size_t dyn_nth_size (size_t i)
 Returns the dth (dynamic) dimension from the variadic list D. More...
 
template<typename... Dims>
std::string concat_sizes (Dims... sizes)
 Returns a string representation of the given dimensions.
 
template<bool B, typename T >
decltype(auto) constexpr optional_move (T &&t)
 Function to move or forward depending on a constant boolean flag. More...
 
template<typename T >
 requires (is_etl_value_class< T >) struct etl_traits< T >
 Specialization for value structures. More...
 
cuComplex complex_cast (const std::complex< float > &alpha)
 
cuComplex complex_cast (const etl::complex< float > &alpha)
 
cuDoubleComplex complex_cast (const std::complex< double > &alpha)
 
cuDoubleComplex complex_cast (const etl::complex< double > &alpha)
 
void dump_counters ()
 Dump all counters values to the console.
 
void inc_counter ([[maybe_unused]] const char *name)
 Increase the given counter. More...
 
constexpr ETL_STRONG_INLINE (size_t) prev_multiple(size_t N
 

Variables

template<typename T >
constexpr bool is_symmetric_matrix = cpp::specialization_of<etl::symmetric_matrix, T>
 Traits indicating if the given ETL type is a symmetric matrix. More...
 
template<typename T >
constexpr bool is_hermitian_matrix = cpp::specialization_of<etl::hermitian_matrix, T>
 Traits indicating if the given ETL type is a hermitian matrix. More...
 
template<typename T >
constexpr bool is_diagonal_matrix = cpp::specialization_of<etl::diagonal_matrix, T>
 Traits indicating if the given ETL type is a diagonal matrix. More...
 
template<typename T >
constexpr bool is_upper_matrix = cpp::specialization_of<etl::upper_matrix, T>
 Traits indicating if the given ETL type is an upper triangular matrix. More...
 
template<typename T >
constexpr bool is_lower_matrix = cpp::specialization_of<etl::lower_matrix, T>
 Traits indicating if the given ETL type is a lower triangular matrix. More...
 
template<typename T >
constexpr bool is_strictly_lower_matrix = cpp::specialization_of<etl::strictly_lower_matrix, T>
 Traits indicating if the given ETL type is a strictly lower triangular matrix. More...
 
template<typename T >
constexpr bool is_strictly_upper_matrix = cpp::specialization_of<etl::strictly_upper_matrix, T>
 Traits indicating if the given ETL type is a strictly upper triangular matrix. More...
 
template<typename T >
constexpr bool is_uni_lower_matrix = cpp::specialization_of<etl::uni_lower_matrix, T>
 Traits indicating if the given ETL type is a uni lower triangular matrix. More...
 
template<typename T >
constexpr bool is_uni_upper_matrix = cpp::specialization_of<etl::uni_upper_matrix, T>
 Traits indicating if the given ETL type is a uni upper triangular matrix. More...
 
template<typename T >
concept is_mangle_able
 Test if the given type can be mangled correctly. More...
 
template<typename T >
concept fast = decay_traits<T>::is_fast
 
template<typename T >
concept dyn = !decay_traits<T>::is_fast
 
template<typename T >
concept generator = etl_expr<T> && decay_traits<T>::is_generator
 
template<typename T >
concept not_generator = etl_expr<T> && !decay_traits<T>::is_generator
 
template<typename T >
concept dyn_expr = etl_expr<T> && dyn<T>
 
template<typename T >
concept fast_expr = etl_expr<T> && fast<T>
 
template<typename T >
concept etl_complex = cpp::specialization_of<etl::complex, T>
 
template<typename T >
concept std_complex = cpp::specialization_of<std::complex, T>
 
template<typename T >
concept complex_c = etl_complex<T> || std_complex<T>
 
template<typename T >
concept etl_complex_expr = etl_expr<T> && complex_c<value_t<T>>
 
template<typename T >
concept unary_expr_c = cpp::specialization_of<etl::unary_expr, T>
 
template<typename T >
concept sub_view_c = traits_detail::is_sub_view<std::decay_t<T>>::value
 
template<typename T >
concept slice_view_c = cpp::specialization_of<etl::slice_view, T>
 
template<typename T >
concept dyn_matrix_view_c = traits_detail::is_dyn_matrix_view<T>::value
 
template<typename T >
concept etl_value_class
 
template<typename T >
concept simple_lhs = etl_value_class<T> || unary_expr_c<T> || sub_view_c<T> || slice_view_c<T> || dyn_matrix_view_c<T>
 
template<typename T >
concept etl_1d = etl_expr<T> && decay_traits<T>::dimensions() == 1
 
template<typename T >
concept etl_2d = etl_expr<T> && decay_traits<T>::dimensions() == 2
 
template<typename T >
concept etl_3d = etl_expr<T> && decay_traits<T>::dimensions() == 3
 
template<typename T >
concept etl_4d = etl_expr<T> && decay_traits<T>::dimensions() == 4
 
template<typename T >
concept etl_2d_or_4d = etl_expr<T> && (decay_traits<T>::dimensions() == 2 || decay_traits<T>::dimensions() == 4)
 
template<typename T >
concept etl_4d_and_plus = etl_expr<T> && decay_traits<T>::dimensions() >= 4
 
template<typename T >
concept etl_5d = etl_expr<T> && decay_traits<T>::dimensions() == 5
 
template<typename T >
concept etl_5d_and_plus = etl_expr<T> && decay_traits<T>::dimensions() >= 5
 
template<typename T >
concept deep_mat = etl_expr<T> && decay_traits<T>::dimensions() >= 3
 
template<typename T >
concept mat_or_vec = etl_expr<T> && (etl_1d<T> || etl_2d<T>)
 
template<typename T >
concept matrix = etl_expr<T> && decay_traits<T>::dimensions() > 1
 
template<typename T >
concept fast_matrix_c = fast<T> && matrix<T>
 
template<typename T , typename E >
concept same_dimensions = etl_expr<T> && decay_traits<T>::dimensions() == decay_traits<E>::dimensions()
 
template<typename T , typename E >
concept same_order = etl_expr<T> && decay_traits<T>::storage_order == decay_traits<E>::storage_order
 
template<typename T , typename E >
concept same_dimensions_and_order = same_dimensions<T, E> && same_order<T, E>
 
template<typename T , size_t D>
concept exact_dimensions = etl_expr<T> && decay_traits<T>::dimensions() == D
 
template<typename T , size_t D1, size_t D2>
concept dimensions_between = etl_expr<T> && decay_traits<T>::dimensions() >= D1 && decay_traits<T>::dimensions() <= D2
 
template<typename T >
concept fast_2d = fast<T> && etl_2d<T>
 
template<typename T >
concept fast_3d = fast<T> && etl_3d<T>
 
template<typename T >
concept fast_4d = fast<T> && etl_4d<T>
 
template<typename T >
concept dyn_2d = dyn<T> && etl_2d<T>
 
template<typename T >
concept dyn_3d = dyn<T> && etl_3d<T>
 
template<typename T >
concept dyn_4d = dyn<T> && etl_4d<T>
 
template<typename T >
concept dyn_matrix_c = dyn<T> && matrix<T>
 
template<typename T >
concept square_matrix = is_square_matrix<T>
 
template<typename T >
concept value_class = etl_expr<T> && etl_traits<T>::is_value
 
template<typename T >
concept adaptable = etl_2d<T> && square_matrix<T> && value_class<T>
 
template<typename T , typename VT >
concept convertible_expr = etl_expr<T> && std::convertible_to<value_t<T>, VT>
 
template<typename T >
concept optimized_expr_c = cpp::specialization_of<etl::optimized_expr, T>
 
template<typename T >
concept serial_expr_c = cpp::specialization_of<etl::serial_expr, T>
 
template<typename T >
concept selected_expr_c = traits_detail::is_selected_expr_impl<std::decay_t<T>>::value
 
template<typename T >
concept parallel_expr_c = cpp::specialization_of<etl::parallel_expr, T>
 
template<typename T >
concept timed_expr_c = cpp::specialization_of<etl::timed_expr, T>
 
template<typename T >
concept wrapper_expr = optimized_expr_c<T> || selected_expr_c<T> || serial_expr_c<T> || parallel_expr_c<T> || timed_expr_c<T>
 
template<typename T >
concept sub_capable = matrix<T> || generator<T>
 
template<typename T >
concept single_precision = std::same_as<T, float>
 
template<typename T >
concept etl_single_precision = etl_expr<T> && single_precision<value_t<T>>
 
template<typename T >
concept double_precision = std::same_as<T, double>
 
template<typename T >
concept etl_double_precision = etl_expr<T> && double_precision<value_t<T>>
 
template<typename T >
concept etl_dma = etl_expr<T> && decay_traits<T>::is_direct
 
template<typename T >
concept etl_dma_single_precision = etl_dma<T> && etl_single_precision<T>
 
template<typename T >
concept etl_dma_double_precision = etl_dma<T> && etl_double_precision<T>
 
template<typename T >
concept gpu_computable = etl_expr<T> && decay_traits<T>::gpu_computable
 
template<typename T >
concept gpu_computable_single_precision = gpu_computable<T> && etl_single_precision<T>
 
template<typename T >
concept gpu_computable_double_precision = gpu_computable<T> && etl_double_precision<T>
 
template<typename T >
concept arithmetic = std::floating_point<T> || std::integral<T>
 
template<typename T >
concept size_c = std::convertible_to<T, size_t>
 
template<typename T >
concept std_container
 
template<typename T >
concept etl_expr = decay_traits<T>::is_etl
 
template<typename T , typename VT >
concept expr_or_scalar = etl_expr<T> || std::same_as<T, scalar<VT>>
 
constexpr bool manual_select = ETL_MANUAL_SELECT_BOOL
 Indicates if the selection can be manually set.
 
constexpr bool vectorize_expr = ETL_VECTORIZE_EXPR_BOOL
 Indicates if the expressions can be automatically vectorized by ETL. More...
 
constexpr bool vectorize_impl = ETL_VECTORIZE_IMPL_BOOL
 Indicates if the implementations can be automatically vectorized by ETL. More...
 
constexpr bool conv_valid_fft = ETL_CONV_VALID_FFT_BOOL
 Indicates if conv_valid_multi can use FFT.
 
const size_t threads = ETL_PARALLEL_THREADS
 The number of threads ETL can use in parallel mode.
 
constexpr bool parallel_support = ETL_PARALLEL_SUPPORT_BOOL
 Indicates if support for parallelization is integrated into the framework.
 
constexpr bool is_parallel = ETL_PARALLEL_BOOL
 Indicates if the expressions and implementations can be automaticallly parallelized. More...
 
constexpr bool mkl_enabled = ETL_MKL_MODE_BOOL
 Indicates if the MKL library is available for ETL.
 
constexpr bool has_fast_fft = ETL_MKL_MODE_BOOL || ETL_CUFFT_MODE_BOOL
 Indicates if there is a fast FFT routine available. More...
 
constexpr bool cblas_enabled = ETL_BLAS_MODE_BOOL
 Indicates if a BLAS library is available for ETL.
 
constexpr bool is_blas_parallel = ETL_BLAS_THREADS_BOOL
 Indicates if the BLAS library is parallel.
 
constexpr bool is_blas_parallel_config = is_blas_parallel && mkl_enabled
 Indicates if the BLAS library is parallel and we are able to disable the parallel. More...
 
constexpr bool cuda_enabled = ETL_CUDA_BOOL
 Indicates if CUDA is available.
 
constexpr bool cublas_enabled = ETL_CUBLAS_MODE_BOOL
 Indicates if the NVIDIA CUBLAS library is available for ETL.
 
constexpr bool cufft_enabled = ETL_CUFFT_MODE_BOOL
 Indicates if the NVIDIA CUFFT library is available for ETL.
 
constexpr bool curand_enabled = ETL_CURAND_MODE_BOOL
 Indicates if the NVIDIA CURAND library is available for ETL.
 
constexpr bool cudnn_enabled = ETL_CUDNN_MODE_BOOL
 Indicates if the NVIDIA CUDNN library is available for ETL.
 
constexpr bool egblas_enabled = ETL_EGBLAS_MODE_BOOL
 Indicates if the EGBLAS library is available for ETL.
 
constexpr bool is_div_strict = ETL_STRICT_DIV_BOOL
 Boolean flag indicating if division can be done by multiplication (false) or not (true)
 
constexpr bool streaming = !ETL_NO_STREAMING_BOOL
 Indicates if ETL is allowed to perform streaming (non-temporal writes).
 
constexpr bool padding = !ETL_NO_PADDING_BOOL
 Indicates if ETL is allowed to pad matrices and vectors.
 
constexpr bool advanced_padding = ETL_ADVANCED_PADDING_BOOL
 Indicates if ETL is allowed to pad matrices and vectors. More...
 
constexpr bool padding_impl = !ETL_NO_PADDING_IMPL_BOOL
 Indicates if ETL is allowed to pad matrices and vectors.
 
constexpr bool unroll_normal_loops = ETL_NO_UNROLL_NON_VECT_BOOL
 Indicates if ETL is allowed tor unroll non-vectorized loops.
 
constexpr bool relaxed = ETL_RELAXED_BOOL
 Indicates if ETL is relaxed.
 
constexpr bool cudnn_compatible = ETL_CUDNN_COMPATIBLE
 Indicates if ETL is trying to generate results similar to CUDNN (default).
 
constexpr size_t cache_size = ETL_CACHE_SIZE
 Cache size of the machine.
 
constexpr size_t max_workspace = ETL_MAX_WORKSPACE
 Maximum workspace that ETL is allowed to allocate.
 
constexpr size_t cudnn_max_workspace = ETL_CUDNN_MAX_WORKSPACE
 Maximum workspace that ETL is allowed to allocate on the GPU.
 
constexpr vector_mode_t vector_mode = ETL_VECTOR_MODE
 The default vector mode for vectorization by the evaluator engine.
 
constexpr bool avx512_enabled = ETL_AVX512_BOOL
 Indicates if AVX512 is available.
 
constexpr bool avx_enabled = ETL_AVX_BOOL
 Indicates if AVX is available.
 
constexpr bool avx2_enabled = ETL_AVX2_BOOL
 Indicates if AVX2 is available.
 
constexpr bool sse3_enabled = ETL_SSE3_BOOL
 Indicates if SSE3 is available.
 
constexpr bool vec_enabled = avx512_enabled || avx_enabled || sse3_enabled
 Indicates if vectorization is available in any format.
 
constexpr bool intel_compiler = ETL_INTEL_COMPILER_BOOL
 Indicates if the projectis compiled with intel compiler.
 
constexpr init_flag_t init_flag = init_flag_t::DUMMY
 A simple value to use as init flag to constructor.
 
template<typename Expr , typename Result >
constexpr bool direct_assign_compatible
 Traits indicating if a direct assign is possible. More...
 
template<typename E , typename Enable = void>
constexpr size_t safe_dimensions = safe_dimensions_impl<E>::value
 Utility to get the dimensions of an expressions, with support for generator.
 
template<typename T >
constexpr size_t gpu_inc = is_scalar<T> ? 0 : 1
 The space between two elements in GPU for the given type. More...
 
D final
 
D
 The number of dimensions. More...
 
D false
 
D value_testable< dyn_matrix_view< T, D > >
 
D assignable< dyn_matrix_view< T, D >, value_t< T > >
 The type of this expression. More...
 
D true
 
Aligned Aligned
 
Aligned assignable< sub_view< T, Aligned >, value_t< T > >
 
Aligned value_testable< sub_view< T, Aligned > >
 
Aligned inplace_assignable< sub_view< T, Aligned > >
 The type of this expression. More...
 
Aligned __pad0__
 
D T
 
constexpr bool assert_nothrow = true
 
constexpr bool aligned = false
 Alignment flag to aligned expressions. More...
 
constexpr bool unaligned = false
 Alignment flag to unaligned expressions. More...
 
constexpr size_t version_major = 1
 The current major version number of the library.
 
constexpr size_t version_minor = 3
 The current minor version number of the library.
 
constexpr size_t version_revision = 0
 The current revision version number of the library.
 
constexpr size_t gemm_std_max = 75 * 75
 The maximum number of elements to be handled by std algorithm.
 
constexpr size_t gemm_cublas_min = 180 * 180
 The minimum number or elements before considering cublas.
 
constexpr size_t gemm_rr_small_threshold = 100 * 100
 The number of elements of B after which we use BLAS-like kernel (for GEMM)
 
constexpr size_t gemm_rr_medium_threshold = 400 * 400
 The number of elements of B after which we use BLAS-like kernel (for GEMM)
 
constexpr size_t gemm_nt_rr_small_threshold = 500 * 500
 The number of elements of B after which we use BLAS-like kernel (for GEMM)
 
constexpr size_t gemm_cc_small_threshold = 40000
 The number of elements of B after which we use BLAS-like kernel (for GEMM)
 
constexpr size_t gevm_rm_small_threshold = 72000
 The number of elements of b after which we use BLAS-like kernel.
 
constexpr size_t gevm_cm_small_threshold = 4000000
 The number of elements of b after which we use BLAS-like kernel.
 
constexpr size_t gemv_rm_small_threshold = 4500000
 The number of elements of A after which we use BLAS-like kernel.
 
constexpr size_t gemv_cm_small_threshold = 2400000
 The number of elements of A after which we use BLAS-like kernel.
 
constexpr size_t parallel_threshold = 64 * 1024
 The minimum number of elements before considering parallel implementation.
 
constexpr size_t sum_parallel_threshold = 1024 * 32
 The minimum number of elements before considering parallel acc implementation.
 
constexpr size_t vec_sum_parallel_threshold = 1024 * 128
 The minimum number of elements before considering parallel acc implementation.
 
constexpr size_t conv1_parallel_threshold_conv = 100
 The mimum output size before considering parallel convolution.
 
constexpr size_t conv1_parallel_threshold_kernel = 16
 The mimum kernel size before considering parallel convolution.
 
constexpr size_t fft1_many_threshold_transforms = 16
 The mimum number of transforms to parallelize them.
 
constexpr size_t fft1_many_threshold_n = 768
 The mimum size of the transforms to parallelize them.
 
constexpr size_t fft2_many_threshold_transforms = 16
 The mimum number of transforms to parallelize them.
 
constexpr size_t fft2_many_threshold_n = 1024
 The mimum size of the transforms to parallelize them.
 
constexpr size_t stream_threshold = cache_size
 The threshold at which stream is used.
 
template<typename T >
constexpr bool is_fast_matrix = traits_detail::is_fast_matrix_impl<std::decay_t<T>>::value
 Traits indicating if the given ETL type is a fast matrix. More...
 
template<typename T >
constexpr bool is_custom_fast_matrix = traits_detail::is_custom_fast_matrix_impl<std::decay_t<T>>::value
 Traits indicating if the given ETL type is a fast matrix. More...
 
template<typename T >
constexpr bool is_dyn_matrix = traits_detail::is_dyn_matrix_impl<std::decay_t<T>>::value
 Traits indicating if the given ETL type is a dyn matrix. More...
 
template<typename T >
constexpr bool is_gpu_dyn_matrix = traits_detail::is_gpu_dyn_matrix_impl<std::decay_t<T>>::value
 Traits indicating if the given ETL type is a GPU dyn matrix. More...
 
template<typename T >
constexpr bool is_custom_dyn_matrix = traits_detail::is_custom_dyn_matrix_impl<std::decay_t<T>>::value
 Traits indicating if the given ETL type is a custom dyn matrix. More...
 
template<typename T >
constexpr bool is_sparse_matrix = traits_detail::is_sparse_matrix_impl<std::decay_t<T>>::value
 Traits indicating if the given ETL type is a sparse matrix. More...
 
template<typename T >
constexpr bool is_unary_expr = cpp::specialization_of<etl::unary_expr, T>
 Traits indicating if the given ETL type is a unary expression. More...
 
template<typename T >
constexpr bool is_binary_expr = cpp::specialization_of<etl::binary_expr, T>
 Traits indicating if the given ETL type is a binary expression. More...
 
template<typename T >
constexpr bool is_generator_expr = cpp::specialization_of<etl::generator_expr, T>
 Traits indicating if the given ETL type is a generator expression. More...
 
template<typename T >
constexpr bool is_optimized_expr = cpp::specialization_of<etl::optimized_expr, T>
 Traits indicating if the given ETL type is an optimized expression. More...
 
template<typename T >
constexpr bool is_serial_expr = cpp::specialization_of<etl::serial_expr, T>
 Traits indicating if the given ETL type is a serial expression. More...
 
template<typename T >
constexpr bool is_selected_expr = traits_detail::is_selected_expr_impl<std::decay_t<T>>::value
 Traits indicating if the given ETL type is a selector expression. More...
 
template<typename T >
constexpr bool is_parallel_expr = cpp::specialization_of<etl::parallel_expr, T>
 Traits indicating if the given ETL type is a parallel expression. More...
 
template<typename T >
constexpr bool is_timed_expr = cpp::specialization_of<etl::timed_expr, T>
 Traits indicating if the given ETL type is a timed expression. More...
 
template<typename T >
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>
 Traits indicating if the given ETL type is a wrapper expression (optimized, serial, ...). More...
 
template<typename T >
constexpr bool is_sub_view = traits_detail::is_sub_view<std::decay_t<T>>::value
 Traits to test if the given expression is a sub_view.
 
template<typename T >
constexpr bool is_slice_view = cpp::specialization_of<etl::slice_view, T>
 Traits to test if the given expression is a slice_view.
 
template<typename T >
constexpr bool is_dyn_matrix_view = traits_detail::is_dyn_matrix_view<T>::value
 Traits to test if the given expression is a dyn_matrix_view.
 
template<typename T >
constexpr bool is_transformer = decay_traits<T>::is_transformer
 Traits indicating if the given ETL type is a transformer expression. More...
 
template<typename T >
constexpr bool is_view = decay_traits<T>::is_view
 Traits indicating if the given ETL type is a view expression. More...
 
template<typename T >
constexpr bool is_magic_view = decay_traits<T>::is_magic_view
 Traits indicating if the given ETL type is a magic view expression. More...
 
template<typename T >
constexpr bool is_etl_expr = decay_traits<T>::is_etl
 Traits indicating if the given type is an ETL type. More...
 
template<typename T >
constexpr bool is_transpose_expr = cpp::specialization_of<etl::transpose_expr, T>
 Traits indicating if the given type is a transpose expr. More...
 
template<typename T >
constexpr bool is_temporary_expr = traits_detail::is_base_of_template_tb<std::decay_t<T>, etl::base_temporary_expr>
 Traits indicating if the given type is a temporary expression. More...
 
template<typename T >
constexpr bool is_etl_value = decay_traits<T>::is_value
 Traits indicating if the given ETL type is a value type. More...
 
template<typename T >
constexpr bool is_etl_value_class
 Traits indicating if the given ETL type is from a value class. More...
 
template<typename T >
constexpr bool is_lhs = is_etl_value<T> || is_unary_expr<T>
 Traits indicating if the given ETL type can be left hand side type. More...
 
template<typename T >
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>
 Traits indicating if the given ETL type is a simple left hand side type. Adapter types are not taken from this because they do more operations. More...
 
template<typename T >
constexpr bool is_scalar = cpp::specialization_of<etl::scalar, T>
 Traits to test if a type is a scalar type. More...
 
template<typename T >
constexpr bool is_single_precision_t = std::is_same_v<T, float>
 Traits to test if the given type is single precision type. More...
 
template<typename T >
constexpr bool is_single_precision = is_single_precision_t<value_t<T>>
 Traits to test if the given ETL expresion contains single precision numbers. More...
 
template<typename... E>
constexpr bool all_single_precision = (is_single_precision<E> && ...)
 Traits to test if all the given ETL expresion types contains single precision numbers. More...
 
template<typename T >
constexpr bool is_double_precision_t = std::is_same_v<T, double>
 Traits to test if the given type is double precision type. More...
 
template<typename T >
constexpr bool is_bool_t = std::is_same_v<T, bool>
 Traits to test if the type is boolean. More...
 
template<typename T >
constexpr bool is_double_precision = is_double_precision_t<value_t<T>>
 Traits to test if the given ETL expresion contains double precision numbers. More...
 
template<typename... E>
constexpr bool all_double_precision = (is_double_precision<E> && ...)
 Traits to test if all the given ETL expresion types contains double precision numbers. More...
 
template<typename T >
constexpr bool is_floating = is_single_precision<T> || is_double_precision<T>
 Traits to test if the given ETL expresion contains floating point numbers. More...
 
template<typename T >
constexpr bool is_floating_t = is_single_precision_t<T> || is_double_precision_t<T>
 Traits to test if the type is floating point numbers. More...
 
template<typename... E>
constexpr bool all_floating = (is_floating<E> && ...)
 Traits to test if all the given ETL expresion types contains floating point numbers. More...
 
template<typename... E>
constexpr bool all_floating_t = (is_floating_t<E> && ...)
 Traits to test if all the given types are floating point numbers. More...
 
template<typename T >
constexpr bool is_complex_t = cpp::specialization_of<std::complex, T> || cpp::specialization_of<etl::complex, T>
 Traits to test if a type is a complex number type. More...
 
template<typename T >
constexpr bool is_complex_single_t = std::is_same_v<T, std::complex<float>> || std::is_same_v<T, etl::complex<float>>
 Traits to test if a type is a single precision complex number type. More...
 
template<typename T >
constexpr bool is_complex_double_t = std::is_same_v<T, std::complex<double>> || std::is_same_v<T, etl::complex<double>>
 Traits to test if a type is a double precision complex number type. More...
 
template<typename T >
constexpr bool is_complex_single_precision = is_complex_single_t<value_t<T>>
 Traits to test if the given ETL expresion type contains single precision complex numbers. More...
 
template<typename T >
constexpr bool is_complex_double_precision = is_complex_double_t<value_t<T>>
 Traits to test if the given ETL expresion type contains double precision complex numbers. More...
 
template<typename... E>
constexpr bool all_complex_single_precision = (is_complex_single_precision<E> && ...)
 Traits to test if all the given ETL expresion types contains single precision complex numbers. More...
 
template<typename... E>
constexpr bool all_complex_double_precision = (is_complex_double_precision<E> && ...)
 Traits to test if all the given ETL expresion types contains double precision complex numbers. More...
 
template<typename T >
constexpr bool is_complex = is_complex_single_precision<T> || is_complex_double_precision<T>
 Traits to test if the given ETL expresion type contains complex numbers. More...
 
template<typename... E>
constexpr bool all_complex = (is_complex<E> && ...)
 Traits to test if all the given ETL expresion types contains complex numbers. More...
 
template<typename T >
constexpr bool is_deep_single_precision = is_complex_single_precision<T> || is_single_precision<T>
 Traits to test if the given ETL expresion type contains single precision floating point or single precision complex numbers. More...
 
template<typename T >
constexpr bool is_deep_double_precision = is_complex_double_precision<T> || is_double_precision<T>
 Traits to test if the given ETL expresion type contains double precision floating point or double precision complex numbers. More...
 
template<typename T >
constexpr bool is_gpu_t = is_floating_t<T> || is_complex_t<T> || is_bool_t<T>
 Traits to test if the given type contains a type that can be computed on a GPU. More...
 
template<typename T >
constexpr bool is_dma = decay_traits<T>::is_direct
 Traits indicating if the given ETL type has direct memory access. More...
 
template<typename... E>
constexpr bool all_dma = (is_dma<E> && ...)
 Traits to test if all the given ETL expresion types have direct memory access (DMA). More...
 
template<typename E >
constexpr bool is_row_major = decay_traits<E>::storage_order == order::RowMajor
 Traits to test if all the given ETL expresion types are row-major. More...
 
template<typename... E>
constexpr bool all_row_major = (is_row_major<E> & ...)
 Traits to test if all the given ETL expresion types are row-major. More...
 
template<typename E >
constexpr bool is_column_major = decay_traits<E>::storage_order == order::ColumnMajor
 Traits to test if all the given ETL expresion types are column-major. More...
 
template<typename... E>
constexpr bool all_column_major = (is_column_major<E> && ...)
 Traits to test if all the given ETL expresion types are column-major. More...
 
template<typename E >
constexpr bool is_fast = decay_traits<E>::is_fast
 Traits to test if the given ETL expresion type is fast (sizes known at compile-time) More...
 
template<typename... E>
constexpr bool all_fast = (decay_traits<E>::is_fast && ...)
 Traits to test if all the given ETL expresion types are fast (sizes known at compile-time) More...
 
template<typename... E>
constexpr bool all_etl_expr = (is_etl_expr<E> && ...)
 Traits to test if all the given types are ETL types. More...
 
template<typename T >
constexpr bool is_1d = decay_traits<T>::dimensions() == 1
 Traits to test if the given expression type is 1D. More...
 
template<typename... T>
constexpr bool all_1d = (is_1d<T> && ...)
 Traits to test if all the given expression types are 1D. More...
 
template<typename T >
constexpr bool is_2d = decay_traits<T>::dimensions() == 2
 Traits to test if the given expression type is 2D. More...
 
template<typename... T>
constexpr bool all_2d = (is_2d<T> && ...)
 Traits to test if all the given expression types are 2D. More...
 
template<typename T >
constexpr bool is_3d = decay_traits<T>::dimensions() == 3
 Traits to test if the given expression type is 3D. More...
 
template<typename... T>
constexpr bool all_3d = (is_3d<T> && ...)
 Traits to test if all the given expression types are 3D. More...
 
template<typename T >
constexpr bool is_4d = decay_traits<T>::dimensions() == 4
 Traits to test if the given expression type is 4D. More...
 
template<typename... T>
constexpr bool all_4d = (is_4d<T> && ...)
 Traits to test if all the given expression types are 4D. More...
 
template<vector_mode_t V, typename... E>
constexpr bool all_vectorizable = (decay_traits<E>::template vectorizable<V> && ...)
 Traits to test if all the given ETL expresion types are vectorizable. More...
 
template<vector_mode_t V, typename... E>
constexpr bool all_vectorizable_t = (vectorizable_t<V, E> & ...)
 Traits to test if all the given types are vectorizable types. More...
 
template<typename E >
constexpr bool is_thread_safe = decay_traits<E>::is_thread_safe
 Traits to test if the given ETL expresion type is thread safe. More...
 
template<typename... E>
constexpr bool all_thread_safe = (decay_traits<E>::is_thread_safe && ...)
 Traits to test if all the given ETL expresion types are thread safe. More...
 
template<typename T >
constexpr bool is_padded_value = is_dyn_matrix<T> || is_fast_matrix<T>
 Traits to test if the givn ETL expression is a padded value class. More...
 
template<typename T >
constexpr bool is_aligned_value = is_dyn_matrix<T> || is_fast_matrix<T>
 Traits to test if the givn ETL expression is an aligned value class. More...
 
template<typename... E>
constexpr bool all_padded = (decay_traits<E>::is_padded && ...)
 Traits to test if all the given ETL expresion types are padded. More...
 
template<typename T >
constexpr bool is_gpu_computable = decay_traits<T>::gpu_computable
 Traits indicating if the given ETL expression's type is computable on GPU. More...
 
template<typename... E>
constexpr bool all_gpu_computable = (decay_traits<E>::gpu_computable && ...)
 Traits indicating if all the given ETL expresion types are computable on GPU. More...
 
template<typename... E>
constexpr bool all_homogeneous = cpp::is_homogeneous_v<value_t<E>...>
 Traits to test if all the given ETL expresion types are padded. More...
 
template<typename T >
constexpr bool fast_sub_view_able = is_dma<T>&& decay_traits<T>::storage_order == order::RowMajor
 Simple utility traits indicating if a light subview can be created out of this type.
 
template<typename T >
constexpr bool fast_sub_matrix_able = is_dma<T>
 Simple utility traits indicating if a light sub_matrix can be created out of this type.
 
template<typename T >
constexpr bool fast_slice_view_able = fast_sub_view_able<T>
 Simple utility traits indicating if a light slice view can be created out of this type.
 
template<typename T >
constexpr bool inplace_transpose_able = traits_detail::inplace_transpose_able_impl<T>()
 Traits to test if an expression is inplace transpose-able. More...
 
template<typename T >
constexpr bool inplace_sub_transpose_able = traits_detail::inplace_sub_transpose_able_impl<T>()
 Traits to test if an expression is inplace sub transpose-able. More...
 
template<typename Matrix >
constexpr bool is_square_matrix = traits_detail::is_square_matrix_impl<Matrix>()
 Traits to test if a matrix is a square matrix, if this can be defined.
 
template<typename E >
constexpr bool is_nongpu_temporary = traits_detail::is_nongpu_temporary_impl<E>()
 Traits to test if an expression is a temporary expression with non-GPU capabilities.
 
template<typename E >
constexpr bool is_gpu_temporary = traits_detail::is_gpu_temporary_impl<E>()
 Traits to test if an expression is a temporary expression with GPU capabilities.
 
template<typename E >
constexpr bool should_gpu_compute_direct = is_etl_value<E> || is_nongpu_temporary<E> || (is_dma<E> && !is_gpu_temporary<E>)
 Traits indicating if it's more efficient to use smart_gpu_compute(x) instead of smart_gpu_compute(x, y) for an expression of type E.
 
constexpr size_t size
 

Detailed Description

Root namespace for the ETL library.

This namespace exposes all the public interface of the library, it is the only one that should be used directly in client code.

Typedef Documentation

◆ assignable_base_type

The assignable base type.

The iterable base type.

◆ const_memory_type

The const memory access type.

The const memory type.

◆ const_return_helper

template<typename T , typename S >
using etl::const_return_helper = typedef std::conditional_t<std::is_lvalue_reference_v<S>, const value_t<T>&, value_t<T> >

Builder to construct the const type returned by a view.

◆ decay_traits

template<typename E >
using etl::decay_traits = typedef etl_traits<std::decay_t<E> >

Traits helper to get information about ETL types, the type is first decayed.

Template Parameters
Ethe type to introspect

◆ dropout_distribution

template<typename T >
using etl::dropout_distribution = typedef std::conditional_t<std::is_floating_point_v<T>, std::uniform_real_distribution<T>, std::uniform_int_distribution<T> >

Selector helper to get an dropout_distribution based on the type (real or int)

Template Parameters
TThe type of return of the distribution

◆ memory_type

The memory acess type.

The memory type.

◆ return_helper

template<typename T , typename S >
using etl::return_helper = typedef 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> >>

Builder to construct the type returned by a view.

◆ this_type

The type of this expression.

this type

◆ uniform_distribution

template<typename T >
using etl::uniform_distribution = typedef std::conditional_t<std::is_floating_point_v<T>, std::uniform_real_distribution<T>, std::uniform_int_distribution<T> >

Selector helper to get an uniform_distribution based on the type (real or int)

Template Parameters
TThe type of return of the distribution

◆ value_type

typedef T etl::value_type

The value contained in the expression.

The type of value returned by the function.

Enumeration Type Documentation

◆ batch_softmax_impl

Enumeration describing the different implementations of CCE.

Enumerator
STD 

Standard implementation.

CUDNN 

GPU implementation.

◆ bce_impl

enum etl::bce_impl
strong

Enumeration describing the different implementations of BCE.

Enumerator
STD 

Standard implementation.

EGBLAS 

GPU implementation.

◆ bias_add_impl

enum etl::bias_add_impl
strong

Enumeration describing the different implementations of bias_add.

Enumerator
STD 

Standard implementation.

VEC 

VEC implementation.

EGBLAS 

ETL-GPU-BLAS (GPU) implementation.

CUDNN 

CUDNN (GPU) implementation.

◆ cce_impl

enum etl::cce_impl
strong

Enumeration describing the different implementations of CCE.

Enumerator
STD 

Standard implementation.

EGBLAS 

GPU implementation.

◆ conv4_impl

enum etl::conv4_impl
strong

Enumeration describing the different convolution implementations.

Enumerator
STD 

Standard implementation.

VEC 

VEC implementation.

CUDNN 

CUDNN implementation.

FFT_STD 

FFT reduction (with STD impl)

FFT_MKL 

FFT reduction (with MKL impl)

FFT_CUFFT 

FFT reduction (with CUFFT impl)

BLAS_VEC 

BLAS reduction.

BLAS_MKL 

BLAS reduction.

◆ conv_impl

enum etl::conv_impl
strong

Enumeration describing the different convolution implementations.

Enumerator
STD 

Standard implementation.

VEC 

Uniform Vectorized Implementation with locality.

CUDNN 

CUDNN implementation.

FFT_STD 

FFT reduction (with STD impl)

FFT_MKL 

FFT reduction (with MKL impl)

FFT_CUFFT 

FFT reduction (with CUFFT impl)

EGBLAS 

EGBLAS implementation.

◆ conv_multi_impl

enum etl::conv_multi_impl
strong

Enumeration describing the different multiple convolution implementations.

Enumerator
STD 

Standard implementation.

VEC 

VEC implementation.

VALID_FFT_MKL 

Reductiont to FFT (valid)

FFT_STD 

FFT reduction (with STD impl)

FFT_MKL 

FFT reduction (with MKL impl)

FFT_CUFFT 

FFT reduction (with CUFFT impl)

BLAS_VEC 

Reduction to BLAS (GEMM)

BLAS_MKL 

Reduction to BLAS (GEMM)

CUDNN 

GPU with CUDNN.

◆ conv_type

enum etl::conv_type
strong

Enumeration describing the different types of convolution.

Enumerator
VALID 

Valid convolution.

VALID_MULTI 

Valid convolution, with multiple kernels.

SAME 

Same convolution.

SAME_MULTI 

Same convolution, with multiple kernels.

FULL 

Full convolution.

FULL_MULTI 

Full convolution, with multiple kernels.

◆ dot_impl

enum etl::dot_impl
strong

Enumeration describing the different implementations of dot.

Enumerator
STD 

Standard implementation.

VEC 

Uniform Vectorized implementation.

BLAS 

BLAS implementation.

CUBLAS 

BLAS implementation.

◆ fft_impl

enum etl::fft_impl
strong

The different FFT implementations.

Enumerator
STD 

The standard implementation.

MKL 

The Intel MKL implementation.

CUFFT 

The NVidia CuFFT implementation.

◆ gemm_impl

enum etl::gemm_impl
strong

Enumeration describing the different matrix-matrix multiplication implementations.

Enumerator
STD 

Standard implmentation.

VEC 

Vectorized BLAS implementation.

BLAS 

BLAS implementation.

CUBLAS 

CUBLAS (GPU) implementation.

◆ init_flag_t

enum etl::init_flag_t
strong

A simple type to use as init flag to constructor.

Enumerator
DUMMY 

Dummy value for the flag.

◆ mse_impl

enum etl::mse_impl
strong

Enumeration describing the different implementations of MSE.

Enumerator
STD 

Standard implementation.

EGBLAS 

GPU implementation.

◆ order

enum etl::order
strong

Storage order of a matrix.

Enumerator
RowMajor 

Row-Major storage.

ColumnMajor 

Column-Major storage.

◆ outer_impl

enum etl::outer_impl
strong

Enumeration describing the different implementations of outer product.

Enumerator
STD 

Standard implementation.

BLAS 

BLAS implementation.

CUBLAS 

CUBLAS implementation.

VEC 

VEC implementation.

◆ pool_impl

enum etl::pool_impl
strong

Enumeration describing the different implementations of pooling.

Enumerator
STD 

Standard implementation.

CUDNN 

CUDNN (GPU) implementation.

◆ sparse_storage

enum etl::sparse_storage
strong

Enumeration for sparse storage formats.

Enumerator
COO 

Coordinate Format (COO)

◆ sum_impl

enum etl::sum_impl
strong

Enumeration describing the different implementations of sum.

Enumerator
STD 

Standard implementation.

VEC 

Vectorized implementation.

BLAS 

BLAS implementation.

CUBLAS 

BLAS implementation.

◆ transpose_impl

enum etl::transpose_impl
strong

Enumeration describing the different implementations of transpose.

Enumerator
STD 

Standard implementation.

VEC 

Vectorized implementation.

MKL 

MKL implementation.

CUBLAS 

CUBLAS implementation.

◆ vector_mode_t

enum etl::vector_mode_t
strong

Vectorization mode.

Enumerator
NONE 

No vectorization is available.

SSE3 

SSE3 is the max vectorization available.

AVX 

AVX is the max vectorization available.

AVX512 

AVX-512F is the max vectorization available.

Function Documentation

◆ abs() [1/2]

template<etl_expr E>
auto etl::abs ( E &&  value)

Apply absolute on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the absolute of each value of the given expression

◆ abs() [2/2]

template<typename T >
T etl::abs ( complex< T >  z)

Computes the magnitude of the given complex number.

Parameters
zThe input complex number
Returns
The magnitude of z

◆ alias()

template<typename E >
bool etl::alias ( const E &  rhs) const
noexcept

Test if this expression aliases with the given expression.

Parameters
rhsThe other expression to test
Returns
true if the two expressions aliases, false otherwise

◆ aligned_allocate()

template<typename T , size_t S = sizeof(T)>
T* etl::aligned_allocate ( size_t  size,
mangling_faker< S >  = mangling_faker<S>() 
)

Allocate an aligned rray of the given size for the given type.

Parameters
sizeThe number of elements
Returns
A pointer to the aligned memory

◆ aligned_allocate_auto()

template<typename T , size_t S = sizeof(T)>
aligned_ptr<T> etl::aligned_allocate_auto ( size_t  size,
mangling_faker< S >  = mangling_faker<S>() 
)

Allocate an aligned rray of the given size for the given type.

Parameters
sizeThe number of elements
Returns
A pointer to the aligned memory

◆ aligned_release()

template<typename T , size_t S = sizeof(T)>
void etl::aligned_release ( T *  ptr,
mangling_faker< S >  = mangling_faker<S>() 
)

Release some aligned memory.

Parameters
ptrThe ptr to the aligned memory

◆ allocate()

template<typename T , size_t S = sizeof(T)>
auto etl::allocate ( size_t  size,
mangling_faker< S >  = mangling_faker<S>() 
)

Allocate an array of the given size for the given type.

Parameters
sizeThe number of elements
Returns
An unique pointer to the memory

◆ amean()

template<etl_expr E>
value_t<E> etl::amean ( E &&  values)

Returns the mean of all the absolute values contained in the given expression.

Parameters
valuesThe expression to reduce
Returns
The mean of the absolute values of the expression

◆ approx_equals()

template<etl_expr L, etl_expr E>
bool etl::approx_equals ( L &&  lhs,
E &&  rhs,
value_t< L >  eps 
)

Test if two ETL expression are approximately equals.

Parameters
lhsThe left hand-side
rhsThe right hand-side
epsThe epsilon for comparison
Returns
true if the two expression are aproximately equals, false othwerise

◆ approx_equals_float()

template<std::floating_point T, std::floating_point TE = T>
bool etl::approx_equals_float ( a,
b,
TE  epsilon 
)
inline

Test if two floating point numbers are approximately equals.

Parameters
aThe first number of test
bThe second number of test
epsilonThe epsilon for comparison (0.0000001f is good default)
Returns
true if the two numbers are approximately equals, false otherwise

The logic is taken from http://floating-point-gui.de/errors/comparison/ (Michael Borgwardt)

◆ arg()

template<typename T >
T etl::arg ( complex< T >  z)

Computes the phase angle of the given complex number.

Parameters
zThe input complex number
Returns
The phase angle of z

◆ argmax()

template<etl_expr E>
auto etl::argmax ( E &&  value)

Returns the indices of the maximum values in the first axis of the given matrix. If passed a vector, returns the index of the maximum element.

Parameters
valueThe matrix or vector to aggregate
Returns
an expression representing the aggregated expression

◆ argmin()

template<etl_expr E>
auto etl::argmin ( E &&  value)

Returns the indices of the minimum values in the first axis of the given matrix. If passed a vector, returns the index of the mimimum element.

Parameters
valueThe value to aggregate
Returns
an expression representing the aggregated expression

◆ assert_square()

template<etl_2d E>
void etl::assert_square ( [[maybe_unused] ] E &&  expr)

Make sure that the expression is square.

This function uses assertion to validate the condition. If possible, the assertion is done at compile time.

Parameters
exprThe expression to assert

◆ assign_add_to()

template<typename L >
void etl::assign_add_to ( L &&  lhs) const

Add to the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_div_to()

template<typename L >
void etl::assign_div_to ( L &&  lhs) const

Divide the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_mod_to()

template<typename L >
void etl::assign_mod_to ( L &&  lhs) const

Modulo the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_mul_to()

template<typename L >
void etl::assign_mul_to ( L &&  lhs) const

Multiply the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_sub_to()

template<typename L >
void etl::assign_sub_to ( L &&  lhs) const

Sub from the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_to()

template<typename L >
void etl::assign_to ( L &&  lhs) const

Assign to the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ asum()

template<etl_expr E>
value_t<E> etl::asum ( E &&  values)

Returns the sum of all the absolute values contained in the given expression.

Parameters
valuesThe expression to reduce
Returns
The sum of the absolute values of the expression

◆ avg_pool_2d() [1/3]

template<etl_expr E>
dyn_pool_2d_expr<detail::build_type<E>, impl::avg_pool_2d> etl::avg_pool_2d ( E &&  value,
size_t  c1,
size_t  c2 
)

2D Average Pooling of the given matrix expression

Parameters
valueThe matrix expression
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the 2D Average Pooling of the input expression.

◆ avg_pool_2d() [2/3]

template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr E>
pool_2d_expr<detail::build_type<E>, C1, C2, S1, S2, P1, P2, impl::avg_pool_2d> etl::avg_pool_2d ( E &&  value)

2D Average Pooling of the given matrix expression

Parameters
valueThe matrix expression
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the 2D Average Pooling of the input expression.

◆ avg_pool_2d() [3/3]

template<etl_expr E>
dyn_pool_2d_expr<detail::build_type<E>, impl::avg_pool_2d> etl::avg_pool_2d ( E &&  value,
size_t  c1,
size_t  c2,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

2D Average Pooling of the given matrix expression

Parameters
valueThe matrix expression
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the 2D Average Pooling of the input expression.

◆ avg_pool_3d() [1/3]

template<etl_expr E>
dyn_pool_3d_expr<detail::build_type<E>, impl::avg_pool_3d> etl::avg_pool_3d ( E &&  value,
size_t  c1,
size_t  c2,
size_t  c3 
)

3D Average Pooling of the given matrix expression

Parameters
valueThe matrix expression
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the 3D Average Pooling of the input expression.

◆ avg_pool_3d() [2/3]

template<size_t C1, size_t C2, size_t C3, size_t S1 = C1, size_t S2 = C2, size_t S3 = C3, size_t P1 = 0, size_t P2 = 0, size_t P3 = 0, etl_expr E>
pool_3d_expr<detail::build_type<E>, C1, C2, C3, S1, S2, S3, P1, P2, P3, impl::avg_pool_3d> etl::avg_pool_3d ( E &&  value)

3D Average Pooling of the given matrix expression

Parameters
valueThe matrix expression
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
C3The third pooling ratio
Returns
A expression representing the 3D Max Pooling of the input expression.

◆ avg_pool_3d() [3/3]

template<etl_expr E>
dyn_pool_3d_expr<detail::build_type<E>, impl::avg_pool_3d> etl::avg_pool_3d ( E &&  value,
size_t  c1,
size_t  c2,
size_t  c3,
size_t  s1,
size_t  s2,
size_t  s3,
size_t  p1 = 0,
size_t  p2 = 0,
size_t  p3 = 0 
)

3D Average Pooling of the given matrix expression

Parameters
valueThe matrix expression
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the 3D Average Pooling of the input expression.

◆ avg_pool_derivative_2d() [1/3]

template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr E, etl_expr F>
pool_derivative_expr<detail::build_type<E>, F, C1, C2, 0, S1, S2, 0, P1, P2, 0, impl::avg_pool_derivative_2d> etl::avg_pool_derivative_2d ( E &&  input,
F &&  output 
)

Derivative of the 2D Avg Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the Derivative of 2D Avg Pooling of the input expression.

◆ avg_pool_derivative_2d() [2/3]

template<typename E , typename F >
dyn_pool_derivative_expr<detail::build_type<E>, F, impl::avg_pool_derivative_2d> etl::avg_pool_derivative_2d ( E &&  input,
F &&  output,
size_t  c1,
size_t  c2 
)

Derivative of the 2D Avg Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Derivative of 2D Avg Pooling of the input expression.

◆ avg_pool_derivative_2d() [3/3]

template<typename E , typename F >
dyn_pool_derivative_expr<detail::build_type<E>, F, impl::avg_pool_derivative_2d> etl::avg_pool_derivative_2d ( E &&  input,
F &&  output,
size_t  c1,
size_t  c2,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Derivative of the 2D Avg Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Derivative of 2D Avg Pooling of the input expression.

◆ avg_pool_derivative_3d() [1/2]

template<size_t C1, size_t C2, size_t C3, etl_expr E, etl_expr F>
pool_derivative_expr<detail::build_type<E>, F, C1, C2, C3, C1, C2, C3, 0, 0, 0, impl::avg_pool_derivative_3d> etl::avg_pool_derivative_3d ( E &&  input,
F &&  output 
)

Derivative of the 3D Avg Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
C3The third pooling ratio
Returns
A expression representing the Derivative of 3D Avg Pooling of the input expression.

◆ avg_pool_derivative_3d() [2/2]

template<typename E , typename F >
dyn_pool_derivative_expr<detail::build_type<E>, F, impl::avg_pool_derivative_3d> etl::avg_pool_derivative_3d ( E &&  input,
F &&  output,
size_t  c1,
size_t  c2,
size_t  c3 
)

Derivative of the 3D Avg Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the Derivative of 3D Avg Pooling of the input expression.

◆ avg_pool_upsample_2d() [1/3]

template<typename A , typename B , typename C >
dyn_pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, false> etl::avg_pool_upsample_2d ( A &&  input,
B &&  output,
C &&  errors,
size_t  c1,
size_t  c2 
)

Derivative of the 2D Average Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Derivative of 3D Average Pooling of the input expression.

◆ avg_pool_upsample_2d() [2/3]

template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, C1, C2, S1, S2, P1, P2, false> etl::avg_pool_upsample_2d ( A &&  input,
B &&  output,
C &&  errors 
)

Derivative of the 2D Avg Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the Derivative of 3D Max Pooling of the input expression.

◆ avg_pool_upsample_2d() [3/3]

template<typename A , typename B , typename C >
dyn_pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, false> etl::avg_pool_upsample_2d ( A &&  input,
B &&  output,
C &&  errors,
size_t  c1,
size_t  c2,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Derivative of the 2D Average Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Derivative of 3D Average Pooling of the input expression.

◆ avg_pool_upsample_3d() [1/2]

template<typename A , typename B , typename C >
dyn_pool_upsample_3d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, false> etl::avg_pool_upsample_3d ( A &&  input,
B &&  output,
C &&  errors,
size_t  c1,
size_t  c2,
size_t  c3 
)

Derivative of the 3D Average Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the Derivative of 3D Average Pooling of the input expression.

◆ avg_pool_upsample_3d() [2/2]

template<size_t C1, size_t C2, size_t C3, typename A , typename B , typename C >
pool_upsample_3d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, C1, C2, C3, false> etl::avg_pool_upsample_3d ( A &&  input,
B &&  output,
C &&  errors 
)

Derivative of the 3D Average Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
C3The third pooling ratio
Returns
A expression representing the Derivative of 3D Average Pooling of the input expression.

◆ batch_dispatch()

template<etl_expr M, etl_expr N>
M& etl::batch_dispatch ( M &  dispatched,
const N &  merged,
size_t  index 
)

Dispatch a part of merged to dispatched from the given position, for each batch.

Parameters
dispatchedThe dispatched result
mergedThe data to dispatch inside dispatched
indexThe position from which to dispatch
Returns
dispatched

◆ batch_embedding_gradients()

template<etl_2d I, etl_3d E, etl_expr W>
batch_embedding_gradients_expr<detail::build_type<I>, detail::build_type<E>, detail::build_type<W> > etl::batch_embedding_gradients ( const I &  value,
const E &  errors,
const W &  vocab 
)

Returns the embeddings for the given sequence.

Parameters
valueThe input sequence
vocabThe embedding vocabulary
Returns
The embeeddings of the given sequence.

◆ batch_embedding_lookup()

template<etl_2d I, etl_2d V>
batch_embedding_lookup_expr<detail::build_type<I>, detail::build_type<V> > etl::batch_embedding_lookup ( const I &  value,
const V &  vocab 
)

Returns the embeddings for the given sequence.

Parameters
valueThe input sequence
vocabThe embedding vocabulary
Returns
The embeeddings of the given sequence.

◆ batch_hint()

template<typename Expr >
auto etl::batch_hint ( Expr &&  expr)

Build a special expression for batched expressions.

Parameters
exprThe expression to be transformed.
Returns
Either the same expression or a transformed batch expression if possible

◆ batch_k_minus_scale()

template<etl_1d A, etl_2d_or_4d B, etl_1d C>
batch_k_minus_scale_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C> > etl::batch_k_minus_scale ( const A &  a,
const B &  b,
const C &  c 
)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ batch_k_scale()

template<etl_1d A, etl_2d_or_4d B>
batch_k_scale_expr<detail::build_type<A>, detail::build_type<B> > etl::batch_k_scale ( const A &  a,
const B &  b 
)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ batch_k_scale_plus()

template<etl_1d A, etl_2d_or_4d B, etl_1d C>
batch_k_scale_plus_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C> > etl::batch_k_scale_plus ( const A &  a,
const B &  b,
const C &  c 
)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ batch_merge()

template<etl_expr M, etl_expr N>
M& etl::batch_merge ( M &  merged,
const N &  sub,
size_t  index 
)

Merge sub inside merged at the given position, for each batch.

Parameters
mergedThe merged result
subThe data to merge inside merged
indexThe position at which to merge
Returns
merged

◆ batch_outer() [1/2]

template<typename A , typename B >
batch_outer_product_expr<detail::build_type<A>, detail::build_type<B> > etl::batch_outer ( A &&  a,
B &&  b 
)

Batch Outer product multiplication of two matrices.

Parameters
aThe left hand side matrix
bThe right hand side matrix
Returns
An expression representing the outer product multiplication of a and b

◆ batch_outer() [2/2]

template<typename A , typename B , typename C >
auto etl::batch_outer ( A &&  a,
B &&  b,
C &&  c 
)

Batch Outer product multiplication of two matrices and store the result in c.

Parameters
aThe left hand side matrix
bThe right hand side matrix
cThe expression used to store the result
Returns
An expression representing the outer product multiplication of a and b

◆ bernoulli() [1/2]

template<etl_expr E>
auto etl::bernoulli ( const E &  value) -> detail::unary_helper<E, bernoulli_unary_op>

Apply Bernoulli sampling to the values of the expression.

Parameters
valuethe expression to sample
Returns
an expression representing the Bernoulli sampling of the given expression

◆ bernoulli() [2/2]

template<typename E , typename G >
auto etl::bernoulli ( G &  g,
E &&  value 
)

Apply Bernoulli sampling to the values of the expression.

Parameters
valuethe expression to sample
Returns
an expression representing the Bernoulli sampling of the given expression

◆ bias_add_2d()

template<etl_2d E, etl_1d B>
bias_add_2d_expr<detail::build_type<E>, detail::build_type<B> > etl::bias_add_2d ( const E &  x,
const B &  biases 
)

Returns the result of adding the bias [K] to the 4D matrix [N1, K, N2, N3].

Parameters
xThe 4D matrix
biasesThe vector of biases
Returns
The transpose of the given expression.

◆ bias_add_4d()

template<etl_4d E, etl_1d B>
bias_add_4d_expr<detail::build_type<E>, detail::build_type<B> > etl::bias_add_4d ( const E &  x,
const B &  biases 
)

Returns the result of adding the bias [K] to the 4D matrix [N1, K, N2, N3].

Parameters
xThe 4D matrix
biasesThe vector of biases
Returns
The transpose of the given expression.

◆ bias_batch_mean_2d()

template<etl_2d E>
bias_batch_mean_2d_expr<detail::build_type<E>, true> etl::bias_batch_mean_2d ( const E &  value)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ bias_batch_mean_4d()

template<etl_4d E>
bias_batch_mean_4d_expr<detail::build_type<E>, true> etl::bias_batch_mean_4d ( const E &  value)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ bias_batch_sum_2d()

template<etl_2d E>
bias_batch_mean_2d_expr<detail::build_type<E>, false> etl::bias_batch_sum_2d ( const E &  value)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ bias_batch_sum_4d()

template<etl_4d E>
bias_batch_mean_4d_expr<detail::build_type<E>, false> etl::bias_batch_sum_4d ( const E &  value)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ bias_batch_var_2d()

template<etl_2d A, etl_1d B>
bias_batch_var_2d_expr<detail::build_type<A>, detail::build_type<B> > etl::bias_batch_var_2d ( const A &  a,
const B &  b 
)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ bias_batch_var_4d()

template<etl_4d A, etl_1d B>
bias_batch_var_4d_expr<detail::build_type<A>, detail::build_type<B> > etl::bias_batch_var_4d ( const A &  a,
const B &  b 
)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ binarize()

template<etl_expr M, typename T >
void etl::binarize ( M &  matrix,
b 
)

Binarize the given ETL contrainer.

Parameters
matrixThe container binarize
bThe binarization threshold.

◆ cbrt() [1/2]

template<etl_expr E>
auto etl::cbrt ( E &&  value) -> detail::unary_helper<E, cbrt_unary_op>

Apply cubic root on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the cubic root of each value of the given expression

◆ cbrt() [2/2]

template<typename T >
complex<T> etl::cbrt ( complex< T >  z)

Computes the complex cubic root of the input.

Parameters
zThe input complex number
Returns
The cubic root of z

◆ ceil()

template<etl_expr E>
auto etl::ceil ( E &&  value)

Round up each values of the ETL expression.

Parameters
valueThe ETL expression
Returns
an expression representing the values of the ETL expression rounded up.

◆ clip()

template<etl_expr E, arithmetic T>
auto etl::clip ( E &&  value,
min,
max 
)

Clip each values of the ETL expression between min and max.

Parameters
valueThe ETL expression
minThe minimum
maxThe maximum
Returns
an expression representing the values of the ETL expression clipped between min and max

◆ col()

template<etl_expr E>
auto etl::col ( E &&  value,
size_t  i 
) -> detail::identity_helper<E, dim_view<detail::build_identity_type<E>, 2>>

Returns view representing the ith column of the given expression.

Parameters
valueThe ETL expression
iThe column index
Returns
a view expression representing the ith column of the given expression

◆ col_stride()

template<etl_2d E>
size_t etl::col_stride ( E &&  expr)

Returns the column stride of the given ETL matrix expression.

Parameters
exprThe ETL expression.
Returns
the column stride of the given ETL matrix expression

◆ columns() [1/2]

template<dyn_matrix_c E>
size_t etl::columns ( const E &  expr)

Returns the number of columns of the given ETL expression.

Parameters
exprThe expression to get the number of columns from.
Returns
The number of columns of the given expression.

◆ columns() [2/2]

template<fast_matrix_c E>
constexpr size_t etl::columns ( const E &  expr)
noexcept

Returns the number of columns of the given ETL expression.

Parameters
exprThe expression to get the number of columns from.
Returns
The number of columns of the given expression.

◆ complexity() [1/2]

template<typename E >
constexpr int etl::complexity ( [[maybe_unused] ] const E &  expr)
noexcept

Return the complexity of the expression.

Parameters
exprThe expression to get the complexity for
Returns
The estimated complexity of the given expression.

◆ complexity() [2/2]

template<typename E >
constexpr int etl::complexity ( )
noexcept

Return the complexity of the expression.

Template Parameters
EThe expression type to get the complexity for
Returns
The estimated complexity of the given type.

◆ conj() [1/2]

template<etl_complex_expr E>
auto etl::conj ( E &&  value)

Apply the conjugate operation on each complex value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the the conjugate operation of each complex of the given expression

◆ conj() [2/2]

template<typename T >
complex<T> etl::conj ( const complex< T > &  c)
inline

Returns the conjugate of the complex number.

Parameters
cThe complex number
Returns
The conjugate of the complex number

◆ conj_inverse()

template<typename T >
complex<T> etl::conj_inverse ( complex< T >  x)
inline

Returns the conjugate of the inverse of the complex number.

Parameters
xThe complex number
Returns
The conjugate of the inverse of the complex number

◆ conj_transpose()

template<etl_expr E>
auto etl::conj_transpose ( const E &  value)

Returns the conjugate transpose of the given expression.

Parameters
valueThe expression
Returns
The conjugate transpose of the given expression.

◆ conv_1d_full() [1/2]

template<etl_expr A, etl_expr B>
conv_1d_full_expr<detail::build_type<A>, detail::build_type<B> > etl::conv_1d_full ( A &&  a,
B &&  b 
)

Creates an expression representing the valid 1D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the valid 1D convolution of a and b

◆ conv_1d_full() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_1d_full ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the valid 1D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the valid 1D convolution of a and b

◆ conv_1d_same() [1/2]

template<etl_expr A, etl_expr B>
conv_1d_same_expr<detail::build_type<A>, detail::build_type<B> > etl::conv_1d_same ( A &&  a,
B &&  b 
)

Creates an expression representing the 'same' 1D convolution of a and b.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_1d_same() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_1d_same ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'same' 1D convolution of a and b, the result will be stored in c.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_1d_valid() [1/2]

template<etl_1d A, etl_1d B>
conv_1d_valid_expr<detail::build_type<A>, detail::build_type<B> > etl::conv_1d_valid ( A &&  a,
B &&  b 
)

Creates an expression representing the valid 1D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the valid 1D convolution of a and b

◆ conv_1d_valid() [2/2]

template<etl_1d A, etl_1d B, etl_1d C>
auto etl::conv_1d_valid ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the valid 1D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the valid 1D convolution of a and b

◆ conv_2d_backward() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_2d_backward_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_backward ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and b.

The configuration (padding and stride) is the configuration of the convolution that is to be transposed.

Parameters
aThe input expression
bThe kernel expression
s1The stride of the first dimension
s2The stride of the second dimension
p1The padding of the first dimension
p2The padding of the second dimension
Returns
an expression representing the transposed 2D convolution of a and b.

◆ conv_2d_backward() [2/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_2d A, etl_2d B>
conv_2d_backward_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_2d_backward ( A &&  a,
B &&  b 
)

Creates an expression representing the transposed 2D convolution of a and b.

The configuration (padding and stride) is the configuration of the convolution that is to be transposed.

Parameters
aThe input expression
bThe kernel expression
Template Parameters
S1The stride of the first dimension
S2The stride of the second dimension
P1The padding of the first dimension
P2The padding of the second dimension
Returns
an expression representing the transposed 2D convolution of a and b.

◆ conv_2d_backward() [3/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_backward ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed '2D' convolution of a and b and store its result in c.

The configuration (padding and stride) is the configuration of the convolution that is to be transposed.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The stride of the first dimension
s2The stride of the second dimension
p1The padding of the first dimension
p2The padding of the second dimension
Returns
c

◆ conv_2d_backward() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_2d A, etl_2d B, etl_2d C>
auto etl::conv_2d_backward ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the transposed '2D' convolution of a and b and store its result in c.

The configuration (padding and stride) is the configuration of the convolution that is to be transposed.

Parameters
aThe input expression
bThe kernel expression
cThe result
Template Parameters
S1The stride of the first dimension
S2The stride of the second dimension
P1The padding of the first dimension
P2The padding of the second dimension
Returns
c

◆ conv_2d_backward_flipped() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_2d_backward_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_backward_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the 'backward' 1D convolution of a and flipped b.

The configuration (padding and stride) is the configuration of the convolution that is to be transposed.

Parameters
aThe input expression
bThe kernel expression
s1The stride of the first dimension
s2The stride of the second dimension
p1The padding of the first dimension
p2The padding of the second dimension
Returns
an expression representing the transposed 2D convolution of a and b.

◆ conv_2d_backward_flipped() [2/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_2d A, etl_2d B>
conv_2d_backward_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_2d_backward_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'backward' 1D convolution of a and flipped b.

The configuration (padding and stride) is the configuration of the convolution that is to be transposed.

Parameters
aThe input expression
bThe kernel expression
Template Parameters
S1The stride of the first dimension
S2The stride of the second dimension
P1The padding of the first dimension
P2The padding of the second dimension
Returns
an expression representing the transposed 2D convolution of a and b.

◆ conv_2d_backward_flipped() [3/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_backward_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed '2D' convolution of a and flipped b and store its result in c.

The configuration (padding and stride) is the configuration of the convolution that is to be transposed.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The stride of the first dimension
s2The stride of the second dimension
p1The padding of the first dimension
p2The padding of the second dimension
Returns
c

◆ conv_2d_backward_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_2d A, etl_2d B, etl_2d C>
auto etl::conv_2d_backward_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the transposed '2D' convolution of a and flipped b and store its result in c.

The configuration (padding and stride) is the configuration of the convolution that is to be transposed.

Parameters
aThe input expression
bThe kernel expression
cThe result
Template Parameters
S1The stride of the first dimension
S2The stride of the second dimension
P1The padding of the first dimension
P2The padding of the second dimension
Returns
c

◆ conv_2d_full() [1/2]

template<etl_2d A, etl_2d B>
conv_2d_full_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_full ( A &&  a,
B &&  b 
)

Creates an expression representing the 'full' 1D convolution of a and b.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full() [2/2]

template<etl_2d A, etl_2d B, etl_2d C>
auto etl::conv_2d_full ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'full' 1D convolution of a and b, the result will be stored in c.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_deep() [1/2]

template<etl_expr A, etl_expr B>
conv_2d_full_deep_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_full_deep ( A &&  a,
B &&  b 
)

Creates an expression representing the 'full' 1D convolution of a and b.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_deep() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_full_deep ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'full' 1D convolution of a and b, the result will be stored in c.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_deep_flipped() [1/2]

template<etl_expr A, etl_expr B>
conv_2d_full_deep_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_full_deep_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'full' 1D convolution of a and flipped b.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_deep_flipped() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_full_deep_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'full' 1D convolution of a and flipped b, the result will be stored in c.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_flipped() [1/2]

template<etl_2d A, etl_2d B>
conv_2d_full_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_full_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'full' 1D convolution of a and flipped b.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_flipped() [2/2]

template<etl_2d A, etl_2d B, etl_2d C>
auto etl::conv_2d_full_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'full' 1D convolution of a and flipped b, the result will be stored in c.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_multi() [1/2]

template<etl_2d A, etl_3d B>
conv_2d_full_multi_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_full_multi ( A &&  a,
B &&  b 
)

Creates an expression representing the 'full' 1D convolution of a and b.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_multi() [2/2]

template<etl_2d A, etl_3d B, etl_3d C>
auto etl::conv_2d_full_multi ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'full' 1D convolution of a and b, the result will be stored in c.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_multi_flipped() [1/2]

template<etl_2d A, etl_3d B>
conv_2d_full_multi_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_full_multi_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'full' 1D convolution of a and flipped b.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_full_multi_flipped() [2/2]

template<etl_2d A, etl_3d B, etl_3d C>
auto etl::conv_2d_full_multi_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'full' 1D convolution of a and flipped b, the result will be stored in c.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_2d_same() [1/2]

template<etl_expr A, etl_expr B>
conv_2d_same_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_same ( A &&  a,
B &&  b 
)

Creates an expression representing the 'same' 1D convolution of a and b.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_same ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'same' 1D convolution of a and b, the result will be stored in c.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_deep() [1/2]

template<etl_expr A, etl_expr B>
conv_2d_same_deep_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_same_deep ( A &&  a,
B &&  b 
)

Creates an expression representing the 'same' 1D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_deep() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_same_deep ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'same' 1D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_deep_flipped() [1/2]

template<etl_expr A, etl_expr B>
conv_2d_same_deep_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_same_deep_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'same' 1D convolution of a and flipped b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_deep_flipped() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_same_deep_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'same' 1D convolution of a and flipped b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_flipped() [1/2]

template<etl_expr A, etl_expr B>
conv_2d_same_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_same_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'same' 1D convolution of a and flipped b.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_flipped() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_same_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'same' 1D convolution of a and flipped b, the result will be stored in c.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_multi() [1/2]

template<etl_expr A, etl_expr B>
conv_2d_same_multi_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_same_multi ( A &&  a,
B &&  b 
)

Creates an expression representing the 'same' 1D convolution of a and b.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_multi() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_same_multi ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'same' 1D convolution of a and b, the result will be stored in c.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_multi_flipped() [1/2]

template<etl_expr A, etl_expr B>
conv_2d_same_multi_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_same_multi_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'same' 1D convolution of a and flipped b.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_same_multi_flipped() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_same_multi_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'same' 1D convolution of a and flipped b, the result will be stored in c.

The convolution is applied with padding so that the output has the same size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'same' 1D convolution of a and b

◆ conv_2d_valid() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_valid ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 2D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid() [2/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_2d_valid ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_deep() [1/2]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_deep_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_2d_valid_deep ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and b.

The convolution is applied with padding so that the output has the valid size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_deep() [2/2]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_deep ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c.

The convolution is applied with padding so that the output has the valid size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_deep_flipped() [1/2]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_deep_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_2d_valid_deep_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b.

The convolution is applied with padding so that the output has the valid size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_deep_flipped() [2/2]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_deep_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c.

The convolution is applied with padding so that the output has the valid size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_flipped() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_valid_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 2D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_flipped() [2/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_flipped() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_2d_valid_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_multi() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_multi_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_valid_multi ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 2D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_multi() [2/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_multi_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_2d_valid_multi ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_multi() [3/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_multi ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_multi() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_multi ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_multi_flipped() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_multi_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_valid_multi_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 2D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_multi_flipped() [2/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_multi_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_2d_valid_multi_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_multi_flipped() [3/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_multi_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_multi_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_multi_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_2d_valid_multi_multi() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_multi_multi_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_2d_valid_multi_multi ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 2D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_multi_multi() [2/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_multi_multi ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_multi_multi() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_multi_multi_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_2d_valid_multi_multi ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 2D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 2D convolution of a and b

◆ conv_2d_valid_multi_multi() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_multi_multi ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 2D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 2D convolution of a and b

◆ conv_2d_valid_multi_multi_flipped() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_2d_valid_multi_multi_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_2d_valid_multi_multi_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 2D convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_multi_multi_flipped() [2/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_2d_valid_multi_multi_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_2d_valid_multi_multi_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 2D convolution of a and flipped b.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 2D convolution of a and b

◆ conv_2d_valid_multi_multi_flipped() [3/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_multi_multi_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 2D convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 2D convolution of a and b

◆ conv_2d_valid_multi_multi_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_2d_valid_multi_multi_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 2D convolution of a and flipped b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 2D convolution of a and b

◆ conv_4d_backward() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_4d_backward_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_4d_backward ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the transposed convolution convolution of a and b

◆ conv_4d_backward() [2/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_4d_backward ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_backward() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_4d_backward_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_4d_backward ( A &&  a,
B &&  b 
)

Creates an expression representing the transposed 2D convolution of a and b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the transposed convolution convolution of a and b

◆ conv_4d_backward() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_4d_backward ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the transposed 2D convolution of a and b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_backward_filter() [1/4]

template<etl_4d A, etl_4d B>
dyn_conv_4d_backward_filter_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_4d_backward_filter ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the transposed convolution convolution of a and b

◆ conv_4d_backward_filter() [2/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_backward_filter_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_4d_backward_filter ( A &&  a,
B &&  b 
)

Creates an expression representing the 'backward' 1D convolution of a and b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'backward' 1D convolution of a and b

◆ conv_4d_backward_filter() [3/4]

template<etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_backward_filter ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_backward_filter() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_backward_filter ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'backward' 1D convolution of a and b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'backward' 1D convolution of a and b

◆ conv_4d_backward_filter_flipped() [1/4]

template<etl_4d A, etl_4d B>
dyn_conv_4d_backward_filter_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_4d_backward_filter_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and flipped b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_backward_filter_flipped() [2/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_backward_filter_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_4d_backward_filter_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'backward' 1D convolution of a and flipped b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'backward' 1D convolution of a and b

◆ conv_4d_backward_filter_flipped() [3/4]

template<etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_backward_filter_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and flipped b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_backward_filter_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_backward_filter_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'backward' 1D convolution of a and flipped b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'backward' 1D convolution of a and b

◆ conv_4d_backward_flipped() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_4d_backward_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_4d_backward_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and flipped b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_backward_flipped() [2/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_4d_backward_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the transposed 2D convolution of a and flipped b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_backward_flipped() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_4d_backward_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_4d_backward_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the transposed 2D convolution of a and flipped b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_backward_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_4d_backward_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the transposed 2D convolution of a and flipped b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the transposed 2D convolution of a and b

◆ conv_4d_full() [1/2]

template<etl_4d A, etl_4d B>
conv_4d_full_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_4d_full ( A &&  a,
B &&  b 
)

Creates an expression representing the 'full' 1D convolution of a and b.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_4d_full() [2/2]

template<etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_full ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'full' 1D convolution of a and b, the result will be stored in c.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_4d_full_flipped() [1/2]

template<etl_4d A, etl_4d B>
conv_4d_full_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_4d_full_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'full' 1D convolution of a and flipped b.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_4d_full_flipped() [2/2]

template<etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_full_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'full' 1D convolution of a and flipped b, the result will be stored in c.

The convolution is applied with padding so that the output has the full size as the input.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'full' 1D convolution of a and b

◆ conv_4d_valid() [1/4]

template<etl_4d A, etl_4d B>
dyn_conv_4d_valid_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_4d_valid ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 4d convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid() [2/4]

template<etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_valid ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_4d_valid_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_4d_valid ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_4d_valid ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_back() [1/4]

template<etl_4d A, etl_4d B>
dyn_conv_4d_valid_back_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_4d_valid_back ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 4d convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_back() [2/4]

template<etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_valid_back ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_back() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_valid_back_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_4d_valid_back ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_back() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_valid_back ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_back_flipped() [1/4]

template<etl_4d A, etl_4d B>
dyn_conv_4d_valid_back_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_4d_valid_back_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid_back 4d convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_back_flipped() [2/4]

template<etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_valid_back_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_back_flipped() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_valid_back_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_4d_valid_back_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_back_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_valid_back_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_filter() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_4d_valid_filter_expr<detail::build_type<A>, detail::build_type<B>, false> etl::conv_4d_valid_filter ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 4d convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_filter() [2/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_4d_valid_filter ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_filter() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_valid_filter_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, false> etl::conv_4d_valid_filter ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_filter() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_valid_filter ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_filter_flipped() [1/4]

template<etl_expr A, etl_expr B>
dyn_conv_4d_valid_filter_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_4d_valid_filter_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid_filter 4d convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_filter_flipped() [2/4]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_4d_valid_filter_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_filter_flipped() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B>
conv_4d_valid_filter_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_4d_valid_filter_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_filter_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_valid_filter_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_flipped() [1/4]

template<etl_4d A, etl_4d B>
dyn_conv_4d_valid_expr<detail::build_type<A>, detail::build_type<B>, true> etl::conv_4d_valid_flipped ( A &&  a,
B &&  b,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Creates an expression representing the valid 4d convolution of a and b.

Parameters
aThe input expression
bThe kernel expression
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_flipped() [2/4]

template<etl_4d A, etl_4d B, etl_4d C>
auto etl::conv_4d_valid_flipped ( A &&  a,
B &&  b,
C &&  c,
size_t  s1,
size_t  s2,
size_t  p1,
size_t  p2 
)

Creates an expression representing the valid 4d convolution of a and b, the result will be stored in c.

Parameters
aThe input expression
bThe kernel expression
cThe result
s1The first dimension stride
s2The second dimension stride
p1The first dimension padding (left and right)
p2The second dimension padding (top and bottom)
Returns
an expression representing the valid 4d convolution of a and b

◆ conv_4d_valid_flipped() [3/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B>
conv_4d_valid_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::conv_4d_valid_flipped ( A &&  a,
B &&  b 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b.

The 4D matrix a is assumed to be of [N, C, H, W] dimensions. The 4D matrix b is assumed to be of [K, C, H, W] dimensions.

Parameters
aThe input expression
bThe kernel expression
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ conv_4d_valid_flipped() [4/4]

template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
auto etl::conv_4d_valid_flipped ( A &&  a,
B &&  b,
C &&  c 
)

Creates an expression representing the 'valid' 1D convolution of a and flipped b, the result will be stored in c.

The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hf, Wf] dimensions. The 4D matrix c is assumed to be of [N, K, Hi - Hf + 1, Wi - Wf + 1] dimensions.

Parameters
aThe input expression
bThe kernel expression
cThe result
Returns
an expression representing the 'valid' 1D convolution of a and b

◆ convmtx()

template<etl_1d A>
auto etl::convmtx ( A &&  a,
size_t  h 
) -> detail::stable_transform_helper<A, dyn_convmtx_transformer>

Construct a matrix to compute a convolution by matrix-matrix multiplication.

Parameters
aThe vector to transform (the input of the convolution)
hThe size of kernel
Returns
a matrix expression for convolution

◆ convmtx2()

template<etl_2d A>
auto etl::convmtx2 ( A &&  a,
size_t  k1,
size_t  k2 
) -> detail::stable_transform_helper<A, dyn_convmtx2_transformer>

Construct a matrix to compute a 2D convolution by matrix-matrix multiplication.

Parameters
aThe 2D matrix to transform (the input of the convolution)
k1The first dimension of the kernel
k2The second dimension of the kernel
Returns
a matrix expression for convolution

◆ convmtx2_direct()

template<size_t K1, size_t K2, etl_2d A>
convmtx_2d_expr<detail::build_type<A>, K1, K2> etl::convmtx2_direct ( A &&  a)

Construct a matrix to compute a 2D convolution by matrix-matrix multiplication.

Parameters
aThe 2D matrix to transform (the input of the convolution)
Template Parameters
K1The first dimension of the kernel
K2The second dimension of the kernel
Returns
a matrix expression for convolution

◆ convmtx2_direct_t()

template<typename A , typename M >
void etl::convmtx2_direct_t ( M &  m,
A &&  sub,
size_t  k1,
size_t  k2 
)

Compute the convolution matrix of sub into m for a kernel of size (k1,k2)

Parameters
mThe output matrix
subThe input matrix
k1The first dimension of ther kernel
k2The second dimension of ther kernel

◆ cos() [1/2]

template<etl_expr E>
auto etl::cos ( E &&  value) -> detail::unary_helper<E, cos_unary_op>

Apply cosinus on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the cosinus of each value of the given expression

◆ cos() [2/2]

template<typename T >
complex<T> etl::cos ( complex< T >  z)

Computes the cosine of the complex input.

Parameters
zThe input complex number
Returns
The cosine of z

◆ cosh() [1/2]

template<etl_expr E>
auto etl::cosh ( E &&  value) -> detail::unary_helper<E, cosh_unary_op>

Apply hyperbolic cosinus on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the hyperbolic cosinus of each value of the given expression

◆ cosh() [2/2]

template<typename T >
complex<T> etl::cosh ( complex< T >  z)

Computes the hyperbolic cosine of the complex input.

Parameters
zThe input complex number
Returns
The hyperbolic cosine of z

◆ cross()

template<etl_1d A, etl_1d B>
etl::fast_vector<value_t<A>, 3> etl::cross ( const A &  a,
const B &  b 
)

Returns the dot product of the two given expressions.

Parameters
aThe left expression
bThe right expression
Returns
The dot product of the two expressions

◆ ctrans()

template<etl_expr E>
auto etl::ctrans ( const E &  value)

Returns the conjugate transpose of the given expression.

Parameters
valueThe expression
Returns
The conjugate transpose of the given expression.

◆ deserialize() [1/2]

template<typename Stream , typename T , typename ST , order SO, size_t... Dims>
void etl::deserialize ( deserializer< Stream > &  os,
fast_matrix_impl< T, ST, SO, Dims... > &  matrix 
)

Deserialize the given matrix using the given serializer.

Parameters
osThe deserializer
matrixThe matrix to deserialize

◆ deserialize() [2/2]

template<typename Stream , typename T , order SO, size_t D>
void etl::deserialize ( deserializer< Stream > &  is,
dyn_matrix_impl< T, SO, D > &  matrix 
)

Deserialize the given matrix using the given serializer.

Parameters
isThe deserializer
matrixThe matrix to deserialize

◆ determinant()

template<etl_expr E>
value_t<E> etl::determinant ( E &&  expr)

Returns the determinant of the given square matrix.

If the given expression does not represent a square matrix, this function will fail

Parameters
exprThe expression to get the determinant from.
Returns
The determinant of the given expression

◆ dim() [1/5]

template<size_t D, etl_expr E>
auto etl::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.

Parameters
iThe index to consider in the view
Template Parameters
DThe dimension to consider
Returns
a view representing the ith Dth dimension.

◆ dim() [2/5]

template<size_t D, dyn_expr E>
size_t etl::dim ( const E &  e)
noexcept

Return the D dimension of e.

Parameters
eThe expression to get the dimensions from
Template Parameters
DThe dimension to get
Returns
the Dth dimension of e

◆ dim() [3/5]

template<etl_expr E>
size_t etl::dim ( const E &  e,
size_t  d 
)
noexcept

Return the d dimension of e.

Parameters
eThe expression to get the dimensions from
dThe dimension to get
Returns
the dth dimension of e

◆ dim() [4/5]

template<size_t D, fast_expr E>
constexpr size_t etl::dim ( const E &  e)
noexcept

Return the D dimension of e.

Parameters
eThe expression to get the dimensions from
Template Parameters
DThe dimension to get
Returns
the Dth dimension of e

◆ dim() [5/5]

template<size_t D, fast_expr E>
constexpr size_t etl::dim ( )
noexcept

Return the D dimension of E.

Returns
the Dth dimension of E

◆ dimensions() [1/2]

template<typename E >
constexpr size_t etl::dimensions ( [[maybe_unused] ] const E &  expr)
noexcept

Return the number of dimensions of the given ETL expression.

Parameters
exprThe expression to get the number of dimensions for
Returns
The number of dimensions of the given expression.

◆ dimensions() [2/2]

template<typename E >
constexpr size_t etl::dimensions ( )
noexcept

Return the number of dimensions of the given ETL type.

Template Parameters
EThe expression type to get the number of dimensions for
Returns
The number of dimensions of the given type.

◆ direct_copy()

template<typename S , typename T >
void etl::direct_copy ( const S *  first,
const S *  last,
T *  target 
)

Performs a direct memory copy.

Parameters
firstpointer to the first element to copy
lastpointer to the next-to-last element to copy
targetpointer to the first element of the result

◆ direct_copy_n()

template<typename S , typename T >
void etl::direct_copy_n ( const S *  source,
T *  target,
size_t  n 
)

Performs a direct memory copy.

Parameters
sourcepointer to the first source element
targetpointer to the first element of the result
nThe number of elements to copy

◆ direct_fill() [1/2]

template<typename E , typename V >
void etl::direct_fill ( E &&  mat,
value 
)

Fill the given ETL value class with the given value.

Parameters
matThe ETL value class
valueThe value to set to each element of the matrix

◆ direct_fill() [2/2]

template<typename S , typename T >
void etl::direct_fill ( S *  first,
S *  last,
value 
)

Fills the given memory with the given value.

Parameters
firstpointer to the first element to copy
lastpointer to the next-to-last element to copy
valueThe value to fill the memory with

◆ direct_fill_n()

template<typename S , typename T >
void etl::direct_fill_n ( S *  first,
size_t  n,
value 
)

Fills the given memory with the given value.

Parameters
firstpointer to the first element to copy
nThe number of elements to fill
valueThe value to fill the memory with

◆ dispatch()

template<etl_expr M, etl_expr N>
M& etl::dispatch ( M &  dispatched,
const N &  merged,
size_t  index 
)

Dispatch a part of merged to dispatched from the given position.

Parameters
dispatchedThe dispatched result
mergedThe data to dispatch inside dispatched
indexThe position from which to dispatch
Returns
dispatched

◆ dot()

template<typename A , typename B >
value_t<A> etl::dot ( const A &  a,
const B &  b 
)

Returns the dot product of the two given expressions.

Parameters
aThe left expression
bThe right expression
Returns
The dot product of the two expressions

◆ dropout_mask() [1/2]

template<typename T = float>
auto etl::dropout_mask ( probability)

Create an expression generating numbers for a dropout mask.

Parameters
probabilityThe probability of dropout
Returns
An expression generating numbers for a dropout mask

◆ dropout_mask() [2/2]

template<typename T = float, typename G >
auto etl::dropout_mask ( G &  g,
probability 
)

Create an expression generating numbers for a dropout mask using the given custom random engine.

Parameters
gThe random engine
probabilityThe probability of dropout
Returns
An expression generating numbers for a dropout mask

◆ dyn_index() [1/5]

template<etl_1d T>
size_t etl::dyn_index ( [[maybe_unused] ] const T &  expression,
size_t  i 
)
noexcept

Compute the index for a 1D dynamic matrix.

Parameters
expressionThe matrix reference
iThe index to access
Returns
The flat position of (i)

◆ dyn_index() [2/5]

template<etl_2d T>
size_t etl::dyn_index ( const T &  expression,
size_t  i,
size_t  j 
)
noexcept

Compute the index for a 2D dynamic matrix.

Parameters
expressionThe matrix reference
iThe index of the first dimension to access
jThe index of the second dimension to access
Returns
The flat position of (i,j)

◆ dyn_index() [3/5]

template<etl_3d T>
size_t etl::dyn_index ( const T &  expression,
size_t  i,
size_t  j,
size_t  k 
)
noexcept

Compute the index for a 3D dynamic matrix.

Parameters
expressionThe matrix reference
iThe index of the first dimension to access
jThe index of the second dimension to access
kThe index of the third dimension to access
Returns
The flat position of (i,j,k)

◆ dyn_index() [4/5]

template<etl_4d T>
size_t etl::dyn_index ( const T &  expression,
size_t  i,
size_t  j,
size_t  k,
size_t  l 
)
noexcept

Compute the index for a 4D dynamic matrix.

Parameters
expressionThe matrix reference
iThe index of the first dimension to access
jThe index of the second dimension to access
kThe index of the third dimension to access
lThe index of the fourth dimension to access
Returns
The flat position of (i,j,k,l)

◆ dyn_index() [5/5]

template<typename T , typename... S>
size_t etl::dyn_index ( const T &  expression,
S...  sizes 
) &&
noexcept

Compute the index for a N-D dynamic matrix.

Parameters
expressionThe matrix reference
sizesThe indices to access
Returns
The flat position of (sizes...)

◆ dyn_matrix_view()

template<typename... S>
etl::dyn_matrix_view ( sub_type  sub,
S...  dims 
)
explicit

Construct a new dyn_matrix_view over the given sub expression.

Parameters
dimsThe dimensions

◆ dyn_nth_size()

template<size_t D1, size_t... D>
size_t etl::dyn_nth_size ( size_t  i)

Returns the dth (dynamic) dimension from the variadic list D.

Template Parameters
DThe list of dimensions
Parameters
dThe index of the dimension to get

◆ embedding_gradients()

template<etl_1d I, etl_2d E, etl_expr W>
embedding_gradients_expr<detail::build_type<I>, detail::build_type<E>, detail::build_type<W> > etl::embedding_gradients ( const I &  value,
const E &  errors,
const W &  vocab 
)

Returns the embeddings for the given sequence.

Parameters
valueThe input sequence
vocabThe embedding vocabulary
Returns
The embeeddings of the given sequence.

◆ embedding_lookup()

template<etl_1d I, etl_2d V>
embedding_lookup_expr<detail::build_type<I>, detail::build_type<V> > etl::embedding_lookup ( const I &  value,
const V &  vocab 
)

Returns the embeddings for the given sequence.

Parameters
valueThe input sequence
vocabThe embedding vocabulary
Returns
The embeeddings of the given sequence.

◆ engine_dispatch_1d() [1/2]

template<typename Functor >
void etl::engine_dispatch_1d ( Functor &&  functor,
size_t  first,
size_t  last,
[[maybe_unused] ] size_t  threshold,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine.

The dispatching will be done in batch. That is to say that the functor will be called with a range of data.

This will only be dispatched in parallel if etl is running in parallel mode and if the range is bigger than the treshold.

Parameters
functorThe functor to execute
firstThe beginning of the range
lastThe end of the range. Must be bigger or equal to first.
thresholdThe threshold for parallelization

◆ engine_dispatch_1d() [2/2]

template<typename Functor >
void etl::engine_dispatch_1d ( Functor &&  functor,
size_t  first,
size_t  last,
[[maybe_unused] ] bool  select,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine.

The dispatching will be done in batch. That is to say that the functor will be called with a range of data.

This will only be dispatched in parallel if etl is running in parallel mode and if the range is bigger than the treshold.

Parameters
functorThe functor to execute
firstThe beginning of the range
lastThe end of the range. Must be bigger or equal to first.

◆ engine_dispatch_1d_acc()

template<typename T , typename Functor , typename AccFunctor >
void etl::engine_dispatch_1d_acc ( Functor &&  functor,
AccFunctor &&  acc_functor,
size_t  first,
size_t  last,
[[maybe_unused] ] size_t  threshold,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner and use an accumulator functor to accumulate the results.

Parameters
functorThe functor to execute
acc_functorThe functor to accumulate results
firstThe beginning of the range
lastThe end of the range
thresholdThe threshold for paralellization

◆ engine_dispatch_1d_acc_slice()

template<typename E , typename Functor , typename AccFunctor >
void etl::engine_dispatch_1d_acc_slice ( E &&  expr,
Functor &&  functor,
AccFunctor &&  acc_functor,
[[maybe_unused] ] size_t  threshold,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of an ETL container in a parallel manner and use an accumulator functor to accumulate the results.

The functors will be called with slices of the original expression.

Parameters
exprThe expression to slice
functorThe functor to execute
acc_functorThe functor to accumulate results
thresholdThe threshold for paralellization

◆ engine_dispatch_1d_cpu() [1/2]

template<typename Functor >
void etl::engine_dispatch_1d_cpu ( Functor &&  functor,
size_t  first,
size_t  last,
size_t  threshold,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine.

The dispatching will be done in batch. That is to say that the functor will be called with a range of data.

This will only be dispatched in parallel if etl is running in parallel mode and if the range is bigger than the treshold.

Parameters
functorThe functor to execute
firstThe beginning of the range
lastThe end of the range. Must be bigger or equal to first.
thresholdThe threshold for parallelization

◆ engine_dispatch_1d_cpu() [2/2]

template<typename Functor >
void etl::engine_dispatch_1d_cpu ( Functor &&  functor,
size_t  first,
size_t  last,
bool  select,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine.

The dispatching will be done in batch. That is to say that the functor will be called with a range of data.

This will only be dispatched in parallel if etl is running in parallel mode and if the range is bigger than the treshold.

Parameters
functorThe functor to execute
firstThe beginning of the range
lastThe end of the range. Must be bigger or equal to first.

◆ engine_dispatch_1d_serial() [1/2]

template<typename Functor >
void etl::engine_dispatch_1d_serial ( Functor &&  functor,
size_t  first,
size_t  last,
size_t  threshold,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine.

The dispatching will be done in batch. That is to say that the functor will be called with a range of data.

This will only be dispatched in parallel if etl is running in parallel mode and if the range is bigger than the treshold.

Parameters
functorThe functor to execute
firstThe beginning of the range
lastThe end of the range. Must be bigger or equal to first.
thresholdThe threshold for parallelization

◆ engine_dispatch_1d_serial() [2/2]

template<typename Functor >
void etl::engine_dispatch_1d_serial ( Functor &&  functor,
size_t  first,
size_t  last,
bool  select,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine.

The dispatching will be done in batch. That is to say that the functor will be called with a range of data.

This will only be dispatched in parallel if etl is running in parallel mode and if the range is bigger than the treshold.

Parameters
functorThe functor to execute
firstThe beginning of the range
lastThe end of the range. Must be bigger or equal to first.

◆ engine_dispatch_1d_serial_cpu() [1/2]

template<typename Functor >
void etl::engine_dispatch_1d_serial_cpu ( Functor &&  functor,
size_t  first,
size_t  last,
size_t  threshold,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine.

The dispatching will be done in batch. That is to say that the functor will be called with a range of data.

This will only be dispatched in parallel if etl is running in parallel mode and if the range is bigger than the treshold.

Parameters
functorThe functor to execute
firstThe beginning of the range
lastThe end of the range. Must be bigger or equal to first.
thresholdThe threshold for parallelization

◆ engine_dispatch_1d_serial_cpu() [2/2]

template<typename Functor >
void etl::engine_dispatch_1d_serial_cpu ( Functor &&  functor,
size_t  first,
size_t  last,
bool  select,
[[maybe_unused] ] size_t  n_threads = etl::threads 
)
inline

Dispatch the elements of a range to a functor in a parallel manner, using the global thread engine.

The dispatching will be done in batch. That is to say that the functor will be called with a range of data.

This will only be dispatched in parallel if etl is running in parallel mode and if the range is bigger than the treshold.

Parameters
functorThe functor to execute
firstThe beginning of the range
lastThe end of the range. Must be bigger or equal to first.

◆ engine_select_parallel() [1/2]

bool etl::engine_select_parallel ( [[maybe_unused] ] size_t  n,
[[maybe_unused] ] size_t  threshold = parallel_threshold 
)
inline

Indicates if an 1D evaluation should run in paralle.

Parameters
nThe size of the evaluation
thresholdThe parallel threshold
Returns
true if the evaluation should be done in paralle, false otherwise

◆ engine_select_parallel() [2/2]

bool etl::engine_select_parallel ( [[maybe_unused] ] bool  select)
inline

Indicates if an 1D evaluation should run in paralle.

Parameters
selectThe secondary parallel selection
Returns
true if the evaluation should be done in paralle, false otherwise

◆ ensure_cpu_up_to_date()

void etl::ensure_cpu_up_to_date ( ) const

Ensures that the GPU memory is allocated and that the GPU memory is up to date (to undefined value).

Copy back from the GPU to the expression memory if necessary.

◆ ensure_gpu_up_to_date()

void etl::ensure_gpu_up_to_date ( ) const

Copy back from the GPU to the expression memory if necessary.

Allocate memory on the GPU for the expression and copy the values into the GPU.

◆ equal()

template<typename LE , typename RE >
auto etl::equal ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise comparison of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise comparison of lhs and rhs

◆ exit()

void etl::exit ( )
inline

Exit from ETL, releasing any possible resource.

This function must be called if ETL_GPU_POOL is used

◆ exp()

template<etl_expr E>
auto etl::exp ( E &&  value) -> detail::unary_helper<E, exp_unary_op>

Apply exponential on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the exponential of each value of the given expression

◆ fast_index() [1/5]

template<etl_1d T>
constexpr size_t etl::fast_index ( size_t  i)
noexcept

Compute the index for a 1D fast matrix.

Parameters
iThe index to access
Returns
The flat position of (i)

◆ fast_index() [2/5]

template<etl_2d T>
constexpr size_t etl::fast_index ( size_t  i,
size_t  j 
)
noexcept

Compute the index for a 2D fast matrix.

Parameters
iThe index of the first dimension to access
jThe index of the second dimension to access
Returns
The flat position of (i,j)

◆ fast_index() [3/5]

template<etl_3d T>
constexpr size_t etl::fast_index ( size_t  i,
size_t  j,
size_t  k 
)
noexcept

Compute the index for a 3D fast matrix.

Parameters
iThe index of the first dimension to access
jThe index of the second dimension to access
kThe index of the third dimension to access
Returns
The flat position of (i,j,k)

◆ fast_index() [4/5]

template<etl_4d T>
constexpr size_t etl::fast_index ( size_t  i,
size_t  j,
size_t  k,
size_t  l 
)
noexcept

Compute the index for a 4D fast matrix.

Parameters
iThe index of the first dimension to access
jThe index of the second dimension to access
kThe index of the third dimension to access
lThe index of the fourth dimension to access
Returns
The flat position of (i,j,k,l)

◆ fast_index() [5/5]

template<typename T , typename... S>
constexpr size_t etl::fast_index ( S...  sizes) &&
noexcept

Compute the index for a N-D fast matrix.

Parameters
sizesThe indices to access
Returns
The flat position of (sizes...)

◆ fast_matrix_over()

template<size_t... Dims, typename T >
fast_matrix_impl<T, std::span<T>, order::RowMajor, Dims...> etl::fast_matrix_over ( T *  memory)

Create a fast_matrix of the given dimensions over the given memory.

Parameters
memoryThe memory
Returns
A fast_matrix using the given memory

The memory must be large enough to hold the matrix

◆ fast_sigmoid()

template<etl_expr E>
auto etl::fast_sigmoid ( const E &  value) -> detail::unary_helper<E, fast_sigmoid_unary_op>

Return a fast approximation of the logistic sigmoid of the given ETL expression.

This function is faster than the sigmoid function and has an acceptable precision.

Parameters
valueThe ETL expression
Returns
An ETL expression representing a fast approximation of the logistic sigmoid of the input.

◆ fflip()

template<mat_or_vec E>
auto etl::fflip ( const E &  value)

Returns the horizontal and vertical flipping of the given expression.

Parameters
valueThe expression
Returns
The horizontal and vertical flipping of the given expression.

◆ fft_1d() [1/2]

template<etl_expr A>
fft_expr<detail::build_type<A>, detail::fft_value_type<A>, detail::fft1_impl> etl::fft_1d ( A &&  a)

Creates an expression representing the 1D Fast-Fourrier-Transform of the given expression.

Parameters
aThe input expression
Returns
an expression representing the 1D FFT of a

◆ fft_1d() [2/2]

template<etl_expr A, etl_expr C>
auto etl::fft_1d ( A &&  a,
C &&  c 
)

Creates an expression representing the 1D Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Parameters
aThe input expression
cThe result
Returns
an expression representing the 1D FFT of a

◆ fft_1d_many() [1/2]

template<matrix A>
fft_expr<detail::build_type<A>, detail::fft_value_type<A>, detail::fft1_many_impl> etl::fft_1d_many ( A &&  a)

Creates an expression representing several 1D Fast-Fourrier-Transform of the given expression.

Only the last dimension is used for the FFT itself, the first dimensions are used as containers to perform multiple FFT.

Parameters
aThe input expression
Returns
an expression representing several 1D FFT of a

◆ fft_1d_many() [2/2]

template<matrix A, matrix C>
auto etl::fft_1d_many ( A &&  a,
C &&  c 
)

Creates an expression representing several 1D Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Only the last dimension is used for the FFT itself, the first dimensions are used as containers to perform multiple FFT.

Parameters
aThe input expression
cThe result
Returns
an expression representing several 1D FFT of a

◆ fft_2d() [1/2]

template<etl_expr A>
fft_expr<detail::build_type<A>, detail::fft_value_type<A>, detail::fft2_impl> etl::fft_2d ( A &&  a)

Creates an expression representing the 2D Fast-Fourrier-Transform of the given expression.

Parameters
aThe input expression
Returns
an expression representing the 2D FFT of a

◆ fft_2d() [2/2]

template<etl_expr A, etl_expr C>
auto etl::fft_2d ( A &&  a,
C &&  c 
)

Creates an expression representing the 2D Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Parameters
aThe input expression
cThe result
Returns
an expression representing the 2D FFT of a

◆ fft_2d_many() [1/2]

template<deep_mat A>
fft_expr<detail::build_type<A>, detail::fft_value_type<A>, detail::fft2_many_impl> etl::fft_2d_many ( A &&  a)

Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression.

Only the last two dimensions are used for the FFT itself, the first dimensions are used as containers to perform multiple FFT.

Parameters
aThe input expression
Returns
an expression representing several 2D FFT of a

◆ fft_2d_many() [2/2]

template<deep_mat A, deep_mat C>
auto etl::fft_2d_many ( A &&  a,
C &&  c 
)

Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Only the last two dimensions are used for the FFT itself, the first dimensions are used as containers to perform multiple FFT.

Parameters
aThe input expression
cThe result
Returns
an expression representing several 2D FFT of a

◆ floor()

template<etl_expr E>
auto etl::floor ( E &&  value)

Round down each values of the ETL expression.

Parameters
valueThe ETL expression
Returns
an expression representing the values of the ETL expression rounded down.

◆ force()

template<typename Expr >
void etl::force ( Expr &&  expr)

Force the internal evaluation of an expression.

Parameters
exprThe expression to force inner evaluation

This function can be used when complex expressions are used lazily.

◆ force_temporary()

template<typename E >
decltype(auto) etl::force_temporary ( E &&  expr)

Force a temporary out of the expression.

In case of a fast matrix, a fast matrix with vector storage is created even if the input has array storage.

Parameters
exprThe expression to make a temporary from
Returns
a temporary of the expression

◆ force_temporary_dim_only()

template<typename E >
decltype(auto) etl::force_temporary_dim_only ( E &&  expr)

Force a temporary out of the expression with the same dimensions, but the content is not defined. The expression will not be evaluated.

Parameters
exprThe expression to make a temporary from
Returns
a temporary with the same dimensions as the expression

◆ force_temporary_dyn()

template<typename E >
decltype(auto) etl::force_temporary_dyn ( E &&  expr)

Force a dynamic temporary out of the expression.

This function will always return a dyn_matrix. This has the advantage of the matrix being able to change dimensions (transpose for instance). However, this cause fast matrix dimensions to decay.

Parameters
exprThe expression to make a temporary from
Returns
a temporary of the expression

◆ force_temporary_gpu()

template<typename E >
decltype(auto) etl::force_temporary_gpu ( E &&  expr)

Force a temporary out of the expression.

This has the same behaviour as force_temporary(expr), but has stricter conditions of for use. It can only be used on DMA expressions and the result is guaranteed to preserve CPU and GPU status.

In case of a fast matrix, a fast matrix with vector storage is created even if the input has array storage.

Parameters
exprThe expression to make a temporary from
Returns
a temporary of the expression

◆ force_temporary_gpu_dim_only()

template<typename E >
decltype(auto) etl::force_temporary_gpu_dim_only ( E &&  expr)

Force a temporary out of the expression, without copying its content.

This has the same behaviour as force_temporary(expr), but has stricter conditions of for use. It can only be used on DMA expressions and the result is guaranteed to preserve CPU and GPU status.

In case of a fast matrix, a fast matrix with vector storage is created even if the input has array storage.

Parameters
exprThe expression to make a temporary from
Returns
a temporary of the expression

◆ force_temporary_gpu_dim_only_t()

template<typename T , typename E >
decltype(auto) etl::force_temporary_gpu_dim_only_t ( E &&  expr)

Force a temporary out of the expression, without copying its content and using the specified type.

This has the same behaviour as force_temporary(expr), but has stricter conditions of for use. It can only be used on DMA expressions and the result is guaranteed to preserve CPU and GPU status.

In case of a fast matrix, a fast matrix with vector storage is created even if the input has array storage.

Parameters
exprThe expression to make a temporary from
Returns
a temporary of the expression

◆ force_temporary_opp()

template<typename E >
decltype(auto) etl::force_temporary_opp ( E &&  expr)

Force a temporary out of the expression, with opposite storage order.

In case of a fast matrix, a fast matrix with vector storage is created even if the input has array storage.

Parameters
exprThe expression to make a temporary from
Returns
a temporary of the expression

◆ get_conj() [1/2]

template<typename T >
std::complex<T> etl::get_conj ( const std::complex< T > &  c)
inline

Returns the conjugate of the given complex number.

Parameters
cThe complex number
Returns
the conjugate of the given complex number

◆ get_conj() [2/2]

template<typename T >
etl::complex<T> etl::get_conj ( const etl::complex< T > &  c)
inline

Returns the conjugate of the given complex number.

Parameters
cThe complex number
Returns
the conjugate of the given complex number

◆ get_imag() [1/2]

template<typename T >
T etl::get_imag ( const std::complex< T > &  c)
inline

Returns the imaginary part of the given complex number.

Parameters
cThe complex number
Returns
the imaginary part of the given complex number

◆ get_imag() [2/2]

template<typename T >
T etl::get_imag ( const etl::complex< T > &  c)
inline

Returns the imaginary part of the given complex number.

Parameters
cThe complex number
Returns
the imaginary part of the given complex number

◆ get_real() [1/2]

template<typename T >
T etl::get_real ( const std::complex< T > &  c)
inline

Returns the real part of the given complex number.

Parameters
cThe complex number
Returns
the real part of the given complex number

◆ get_real() [2/2]

template<typename T >
T etl::get_real ( const etl::complex< T > &  c)
inline

Returns the real part of the given complex number.

Parameters
cThe complex number
Returns
the real part of the given complex number

◆ gpu_compute_hint()

template<typename Y >
const auto& etl::gpu_compute_hint ( [[maybe_unused] ] Y &  y) const

Return a GPU computed version of this expression.

Returns
a GPU-computed ETL expression for this expression

◆ gpu_copy_from()

void etl::gpu_copy_from ( [[maybe_unused] ] const value_type new_gpu_memory) const

Copy from GPU to GPU.

Parameters
new_gpu_memoryPointer to CPU memory from which to copy

◆ gpu_memory()

value_type* etl::gpu_memory ( ) const
noexcept

Return GPU memory of this expression, if any.

Returns
a pointer to the GPU memory or nullptr if not allocated in GPU.

◆ greater()

template<typename LE , typename RE >
auto etl::greater ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise greater than comparison of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise greater than comparison of lhs and rhs

◆ greater_equal()

template<typename LE , typename RE >
auto etl::greater_equal ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise greater than or equals comparison of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise greater than or equals comparison of lhs and rhs

◆ hard_sigmoid()

template<etl_expr E>
auto etl::hard_sigmoid ( E &&  x) -> decltype(etl::clip(x * 0.2 + 0.5, 0.0, 1.0))

Return an hard approximation of the logistic sigmoid of the given ETL expression.

This function is much faster than the sigmoid, but it's precision is very low.

Parameters
xThe ETL expression
Returns
An ETL expression representing an hard approximation of the logistic sigmoid of the input.

◆ hflip()

template<mat_or_vec E>
auto etl::hflip ( const E &  value)

Returns the horizontal flipping of the given expression.

Parameters
valueThe expression
Returns
The horizontal flipping of the given expression.

◆ identity()

template<typename E >
decltype(auto) etl::identity ( E &&  value)

Performs the identiy function on the ETL expression.

Parameters
valueThe ETL expression
Returns
The same value, perfectly forwardd

◆ identity_derivative()

template<typename E >
auto etl::identity_derivative ( [[maybe_unused] ] E &&  value)

Return the derivative of the identiy function for the given value.

Parameters
valueThe ETL expression
Returns
1.0

◆ ifft_1d() [1/2]

template<etl_expr A>
fft_expr<detail::build_type<A>, detail::ifft_value_type<A>, detail::ifft1_impl> etl::ifft_1d ( A &&  a)

Creates an expression representing the 1D inverse Fast-Fourrier-Transform of the given expression.

Parameters
aThe input expression
Returns
an expression representing the 1D inverse FFT of a

◆ ifft_1d() [2/2]

template<etl_expr A, etl_expr C>
auto etl::ifft_1d ( A &&  a,
C &&  c 
)

Creates an expression representing the 1D inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Parameters
aThe input expression
cThe result
Returns
an expression representing the 1D inverse FFT of a

◆ ifft_1d_many() [1/2]

template<matrix A>
fft_expr<detail::build_type<A>, detail::ifft_value_type<A>, detail::ifft1_many_impl> etl::ifft_1d_many ( A &&  a)

Creates an expression representing several 1D Inverse Fast-Fourrier-Transform of the given expression.

Only the last dimension is used for the FFT itself, the first dimensions are used as containers to perform multiple FFT.

Parameters
aThe input expression
Returns
an expression representing several 1D FFT of a

◆ ifft_1d_many() [2/2]

template<matrix A, matrix C>
auto etl::ifft_1d_many ( A &&  a,
C &&  c 
)

Creates an expression representing several 1D Inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Only the last dimension is used for the FFT itself, the first dimensions are used as containers to perform multiple FFT.

Parameters
aThe input expression
cThe result
Returns
an expression representing several 1D FFT of a

◆ ifft_1d_real() [1/2]

template<etl_expr A>
fft_expr<detail::build_type<A>, detail::ifft_real_value_type<A>, detail::ifft1_real_impl> etl::ifft_1d_real ( A &&  a)

Creates an expression representing the real part of the 1D inverse Fast-Fourrier-Transform of the given expression.

Parameters
aThe input expression
Returns
an expression representing the real part of the 1D inverse FFT of a

◆ ifft_1d_real() [2/2]

template<etl_expr A, etl_expr C>
auto etl::ifft_1d_real ( A &&  a,
C &&  c 
)

Creates an expression representing the real part of the 1D inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Parameters
aThe input expression
cThe result
Returns
an expression representing the real part of the 1D inverse FFT of a

◆ ifft_2d() [1/2]

template<etl_expr A>
fft_expr<detail::build_type<A>, detail::ifft_value_type<A>, detail::ifft2_impl> etl::ifft_2d ( A &&  a)

Creates an expression representing the 2D inverse Fast-Fourrier-Transform of the given expression.

Parameters
aThe input expression
Returns
an expression representing the 2D inverse FFT of a

◆ ifft_2d() [2/2]

template<etl_expr A, etl_expr C>
auto etl::ifft_2d ( A &&  a,
C &&  c 
)

Creates an expression representing the 2D inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Parameters
aThe input expression
cThe result
Returns
an expression representing the 2D inverse FFT of a

◆ ifft_2d_many() [1/2]

template<deep_mat A>
fft_expr<detail::build_type<A>, detail::ifft_value_type<A>, detail::ifft2_many_impl> etl::ifft_2d_many ( A &&  a)

Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression.

Only the last two dimensions are used for the FFT itself, the first dimensions are used as containers to perform multiple FFT.

Parameters
aThe input expression
Returns
an expression representing several 2D FFT of a

◆ ifft_2d_many() [2/2]

template<deep_mat A, deep_mat C>
auto etl::ifft_2d_many ( A &&  a,
C &&  c 
)

Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Only the last two dimensions are used for the FFT itself, the first dimensions are used as containers to perform multiple FFT.

Parameters
aThe input expression
cThe result
Returns
an expression representing several 2D FFT of a

◆ ifft_2d_real() [1/2]

template<etl_expr A>
fft_expr<detail::build_type<A>, detail::ifft_real_value_type<A>, detail::ifft2_real_impl> etl::ifft_2d_real ( A &&  a)

Creates an expression representing the real part of the 2D inverse Fast-Fourrier-Transform of the given expression.

Parameters
aThe input expression
Returns
an expression representing the real part of the 2D inverse FFT of a

◆ ifft_2d_real() [2/2]

template<etl_expr A, etl_expr C>
auto etl::ifft_2d_real ( A &&  a,
C &&  c 
)

Creates an expression representing the real part of the 2D inverse Fast-Fourrier-Transform of the given expression, the result will be stored in c.

Parameters
aThe input expression
cThe result
Returns
an expression representing the real part of the 2D inverse FFT of a

◆ im2col_direct()

template<typename A , typename M >
void etl::im2col_direct ( M &  m,
A &&  sub,
size_t  k1,
size_t  k2 
)

Convert an image to a sequence of image columns to be multiplied by kernels of size (k1,k2)

Parameters
mThe output matrix
subThe input image
k1The first dimension of ther kernel
k2The second dimension of ther kernel

◆ im2col_direct_tr()

template<etl_dma A, etl_dma M>
void etl::im2col_direct_tr ( M &  m,
A &&  sub,
size_t  k1,
size_t  k2 
)

Convert an image to a sequence of image columns to be multiplied by kernels of size (k1,k2).

This special version does not require any transposition when used.

Parameters
mThe output matrix
subThe input image
k1The first dimension of ther kernel
k2The second dimension of ther kernel

◆ im2col_direct_tr_multi()

template<etl_dma A, etl_dma M>
void etl::im2col_direct_tr_multi ( M &  m,
A &&  sub,
size_t  k1,
size_t  k2 
)

Convert a sequence of images to a sequence of image columns to be multiplied by kernels of size (k1,k2).

This special version does not require any transposition when used.

Parameters
mThe output matrix
subThe input image
k1The first dimension of ther kernel
k2The second dimension of ther kernel

◆ imag()

template<etl_complex_expr E>
auto etl::imag ( E &&  value)

Extract the imag part of each complex value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the imag part of each complex of the given expression

◆ inc_counter()

void etl::inc_counter ( [[maybe_unused] ] const char *  name)
inline

Increase the given counter.

Parameters
nameThe name of the counter to increase

◆ index_to_2d()

template<typename E >
constexpr std::pair<size_t, size_t> etl::index_to_2d ( E &&  sub,
size_t  i 
)

Convert a flat index into a 2D index.

Parameters
subThe matrix expression
iThe flat index
Returns
a pair of indices for the equivalent 2D index

◆ inv()

template<etl_expr A>
inv_expr<A> etl::inv ( A &&  a)

Creates an expression representing the Inverse of the given expression.

Parameters
aThe input expression
Returns
an expression representing the 1D FFT of a

◆ invcbrt() [1/2]

template<etl_expr E>
auto etl::invcbrt ( E &&  value) -> detail::unary_helper<E, invcbrt_unary_op>

Apply inverse cubic root on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the inverse cubic root of each value of the given expression

◆ invcbrt() [2/2]

template<typename T >
complex<T> etl::invcbrt ( complex< T >  z)

Computes the inverse complex cubic root of the input.

Parameters
zThe input complex number
Returns
The inverse cubic root of z

◆ inverse()

template<typename T >
complex<T> etl::inverse ( complex< T >  x)
inline

Returns the inverse of the complex number.

Parameters
xThe complex number
Returns
The inverse of the complex number

◆ inverse_conj()

template<typename T >
complex<T> etl::inverse_conj ( complex< T >  x)
inline

Returns the inverse of the conjugate of the complex number.

Parameters
xThe complex number
Returns
The inverse of the conjugate of the complex number

◆ inverted_dropout_mask() [1/2]

template<typename T = float>
auto etl::inverted_dropout_mask ( probability)

Create an expression generating numbers for an inverted dropout mask.

Parameters
probabilityThe probability of dropout
Returns
An expression generating numbers for an inverted dropout mask

◆ inverted_dropout_mask() [2/2]

template<typename T = float, typename G >
auto etl::inverted_dropout_mask ( G &  g,
probability 
)

Create an expression generating numbers for an inverted dropout mask using the given custom random engine.

Parameters
gThe random engine
probabilityThe probability of dropout
Returns
An expression generating numbers for an inverted dropout mask

◆ invsqrt() [1/2]

template<etl_expr E>
auto etl::invsqrt ( E &&  value) -> detail::unary_helper<E, invsqrt_unary_op>

Apply inverse square root on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the inverse square root of each value of the given expression

◆ invsqrt() [2/2]

template<typename T >
complex<T> etl::invsqrt ( complex< T >  z)

Computes the inverse complex square root of the input.

Parameters
zThe input complex number
Returns
The inverse square root of z

◆ is_complex_matrix()

template<etl_expr E>
bool etl::is_complex_matrix ( [[maybe_unused] ] E &&  expr)

Indicates if the given expression is a complex matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a complex matrix, false otherwise.

◆ is_cpu_up_to_date()

bool etl::is_cpu_up_to_date ( ) const
noexcept

Indicates if the CPU memory is up to date.

Returns
true if the CPU memory is up to date, false otherwise.

◆ is_diagonal()

template<typename E >
bool etl::is_diagonal ( E &&  expr)

Indicates if the given expression is a diagonal matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a diagonal matrix, false otherwise.

◆ is_gpu_up_to_date()

bool etl::is_gpu_up_to_date ( ) const
noexcept

Indicates if the GPU memory is up to date.

Returns
true if the GPU memory is up to date, false otherwise.

◆ is_hermitian()

template<typename E >
bool etl::is_hermitian ( E &&  expr)

Indicates if the given expression represents an hermitian matrix.

Parameters
exprThe expression to test
Returns
true if the given expression is an hermitian matrix, false otherwise.

◆ is_lower_triangular()

template<typename E >
bool etl::is_lower_triangular ( E &&  expr)

Indicates if the given expression is a lower triangular matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a lower triangular matrix, false otherwise.

◆ is_optimizable()

template<typename Expr >
bool etl::is_optimizable ( const Expr &  expr)

Function to test if expr is optimizable.

Parameters
exprThe expression to test
Returns
true if the expression is optimizable or not

◆ is_optimizable_deep()

template<typename Expr >
bool etl::is_optimizable_deep ( const Expr &  expr)

Function to test if expr or sub parts of expr are optimizable.

Parameters
exprThe expression to test
Returns
true if the expression is deeply optimizable or not

◆ is_parallel_session()

bool etl::is_parallel_session ( )
inline

Indicates if a parallel session is currently active.

Returns
true if a parallel section is active, false otherwise

◆ is_permutation_matrix()

template<typename E >
bool etl::is_permutation_matrix ( E &&  expr)

Indicates if the given expression represents a permutation matrix.

Parameters
exprThe expression to test
Returns
true if the given expression is an hermitian matrix, false otherwise.

◆ is_real_matrix()

template<etl_expr E>
bool etl::is_real_matrix ( [[maybe_unused] ] E &&  expr)

Indicates if the given expression is a real matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a real matrix, false otherwise.

◆ is_rectangular()

template<etl_expr E>
bool etl::is_rectangular ( E &&  expr)

Indicates if the given expression is a rectangular matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a rectangular matrix, false otherwise.

◆ is_something_forced()

bool etl::is_something_forced ( )
inline

Indicates if some implementation is forced in the context.

Returns
true if something is forced in the context, false otherwise

◆ is_square()

template<etl_expr E>
bool etl::is_square ( E &&  expr)

Indicates if the given expression is a square matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a square matrix, false otherwise.

◆ is_strictly_lower_triangular()

template<typename E >
bool etl::is_strictly_lower_triangular ( E &&  expr)

Indicates if the given expression is a strictly lower triangular matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a strictly lower triangular matrix, false otherwise.

◆ is_strictly_upper_triangular()

template<typename E >
bool etl::is_strictly_upper_triangular ( E &&  expr)

Indicates if the given expression is a strictly upper triangular matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a strictly upper triangular matrix, false otherwise.

◆ is_sub_rectangular()

template<etl_expr E>
bool etl::is_sub_rectangular ( E &&  expr)

Indicates if the given expression contains sub matrices that are rectangular.

Parameters
exprThe expression to test
Returns
true if the given expression contains sub matrices that are rectangular, false otherwise.

◆ is_sub_square()

template<etl_expr E>
bool etl::is_sub_square ( E &&  expr)

Indicates if the given expression contains sub matrices that are square.

Parameters
exprThe expression to test
Returns
true if the given expression contains sub matrices that are square, false otherwise.

◆ is_symmetric()

template<typename E >
bool etl::is_symmetric ( E &&  expr)

Indicates if the given expression is a symmetric matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a symmetric matrix, false otherwise.

◆ is_triangular()

template<typename E >
bool etl::is_triangular ( E &&  expr)

Indicates if the given expression is a triangular matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a triangular matrix, false otherwise.

◆ is_uni_lower_triangular()

template<typename E >
bool etl::is_uni_lower_triangular ( E &&  expr)

Indicates if the given expression is a uni lower triangular matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a lower triangular matrix, false otherwise.

◆ is_uni_upper_triangular()

template<typename E >
bool etl::is_uni_upper_triangular ( E &&  expr)

Indicates if the given expression is a strictly upper triangular matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a strictly upper triangular matrix, false otherwise.

◆ is_uniform()

template<typename E >
bool etl::is_uniform ( E &&  expr)

Indicates if the given expression is uniform (all elements of the same value)

Parameters
exprThe expression to test
Returns
true if the given expression is uniform, false otherwise.

◆ is_upper_triangular()

template<typename E >
bool etl::is_upper_triangular ( E &&  expr)

Indicates if the given expression is a upper triangular matrix or not.

Parameters
exprThe expression to test
Returns
true if the given expression is a upper triangular matrix, false otherwise.

◆ lazy_mul()

template<etl_2d A, etl_2d B>
auto etl::lazy_mul ( A &&  a,
B &&  b 
) -> detail::stable_transform_binary_helper<A, B, mm_mul_transformer>

Multiply two matrices together lazily (expression templates)

Parameters
aThe left hand side matrix
bThe right hand side matrix
Returns
An expression representing the matrix-matrix multiplication of a and b

◆ less()

template<typename LE , typename RE >
auto etl::less ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise less than comparison of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise less than comparison of lhs and rhs

◆ less_equal()

template<typename LE , typename RE >
auto etl::less_equal ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise less than or equals comparison of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise less than or equals comparison of lhs and rhs

◆ load()

template<typename V = default_vec>
auto etl::load ( size_t  x) const
noexcept

Load several elements of the expression at once.

Parameters
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use
Returns
a vector containing several elements of the expression

◆ loadu()

template<typename V = default_vec>
auto etl::loadu ( size_t  x) const
noexcept

Load several elements of the expression at once.

Parameters
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use
Returns
a vector containing several elements of the expression

◆ local_context()

context& etl::local_context ( )
inline

Return the configuration context of the current thread.

Returns
the configuration context of the current thread

◆ log() [1/2]

template<etl_expr E>
auto etl::log ( E &&  value) -> detail::unary_helper<E, log_unary_op>

Apply logarithm (base e) on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the logarithm (base e) of each value of the given expression

◆ log() [2/2]

template<typename T >
complex<T> etl::log ( complex< T >  z)

Computes the complex logarithm, in base e, of the input.

Parameters
zThe input complex number
Returns
The complex logarithm, in base e, of z

◆ log10() [1/2]

template<etl_expr E>
auto etl::log10 ( E &&  value) -> detail::unary_helper<E, log10_unary_op>

Apply logarithm (base 10) on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the logarithm (base 10) of each value of the given expression

◆ log10() [2/2]

template<typename T >
complex<T> etl::log10 ( complex< T >  z)

Computes the complex logarithm, in base 10, of the input.

Parameters
zThe input complex number
Returns
The complex logarithm, in base 10, of z

◆ log2() [1/2]

template<etl_expr E>
auto etl::log2 ( E &&  value) -> detail::unary_helper<E, log2_unary_op>

Apply logarithm (base 2) on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the logarithm (base 2) of each value of the given expression

◆ log2() [2/2]

template<typename T >
complex<T> etl::log2 ( complex< T >  z)

Computes the complex logarithm, in base 2, of the input.

Parameters
zThe input complex number
Returns
The complex logarithm, in base 2, of z

◆ logical_and() [1/3]

template<etl_expr LE, etl_expr RE>
auto etl::logical_and ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the elementwise logical and of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical and of lhs and rhs

◆ logical_and() [2/3]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::logical_and ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise logical and of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical and of lhs and rhs (scalar)

◆ logical_and() [3/3]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::logical_and ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the elementwise logical and of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical and of lhs (scalar) and rhs

◆ logical_or() [1/3]

template<etl_expr LE, etl_expr RE>
auto etl::logical_or ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the elementwise logical or of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical or of lhs and rhs

◆ logical_or() [2/3]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::logical_or ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise logical or of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical or of lhs and rhs (scalar)

◆ logical_or() [3/3]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::logical_or ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the elementwise logical or of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical or of lhs (scalar) and rhs

◆ logical_xor() [1/3]

template<etl_expr LE, etl_expr RE>
auto etl::logical_xor ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the elementwise logical xor of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical xor of lhs and rhs

◆ logical_xor() [2/3]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::logical_xor ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise logical xor of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical xor of lhs and rhs (scalar)

◆ logical_xor() [3/3]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::logical_xor ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the elementwise logical xor of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise logical xor of lhs (scalar) and rhs

◆ logistic_noise() [1/2]

template<etl_expr E>
auto etl::logistic_noise ( E &&  value)

Add some normal noise (0, sigmoid(x)) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ logistic_noise() [2/2]

template<etl_expr E, typename G >
auto etl::logistic_noise ( G &  g,
E &&  value 
)

Add some normal noise (0, sigmoid(x)) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ lu()

template<etl_expr AT, etl_expr LT, etl_expr UT, etl_expr PT>
bool etl::lu ( const AT &  A,
LT &  L,
UT &  U,
PT &  P 
)

Decomposition the matrix so that P * A = L * U.

Decomposition the matrix so that P * A = L * U.

Parameters
AThe A matrix
LThe L matrix (Lower Diagonal)
UThe U matrix (Upper Diagonal)
PThe P matrix (Pivot Permutation Matrix)
Returns
true if the decomposition suceeded, false otherwise
Parameters
AThe A matrix
LThe L matrix (Lower Diagonal)
UThe U matrix (Upper Diagonal)
PThe P matrix (Pivot Permutation Matrix)
Returns
true if the decomposition suceeded, false otherwise

◆ magic() [1/2]

template<typename D = double>
auto etl::magic ( size_t  i) -> detail::virtual_helper<D, magic_view<D>>

Returns a view representing the square magic matrix.

Parameters
iThe size of the matrix (one side)
Returns
a virtual view expression representing the square magic matrix

◆ magic() [2/2]

template<size_t N, typename D = double>
auto etl::magic ( ) -> detail::virtual_helper<D, fast_magic_view<D, N>>

Returns a view representing the square magic matrix.

Template Parameters
NThe size of the matrix (one side)
Returns
a virtual view expression representing the square magic matrix

◆ major_stride()

template<etl_2d E>
size_t etl::major_stride ( E &&  expr)

Returns the major stride of the given ETL matrix expression.

Parameters
exprThe ETL expression.
Returns
the major stride of the given ETL matrix expression

◆ make_dyn_matrix()

template<typename T , typename... Sizes>
etl::dyn_matrix<T, sizeof...(Sizes)> etl::make_dyn_matrix ( Sizes...  sizes)

Helper to create a dyn matrix using the dimensions.

This avoids having to set the number of dimensions.

Template Parameters
TThe type contained in the matrix
Parameters
sizesThe dimensions
Returns
A dyn matrix of the given dimensions.

◆ make_temporary()

template<typename E >
decltype(auto) etl::make_temporary ( E &&  expr)

Make a temporary out of the expression if necessary.

A temporary is necessary when the expression has no direct access.

Parameters
exprThe expression to make a temporary from
Returns
a temporary of the expression if necessary, otherwise the expression itself

◆ max() [1/2]

template<etl_expr L, typename R >
auto etl::max ( L &&  lhs,
R &&  rhs 
)

Create an expression with the max value of lhs or rhs.

Parameters
lhsThe left hand side ETL expression
rhsThe right hand side ETL expression
Returns
an expression representing the max values from lhs and rhs

◆ max() [2/2]

template<etl_expr E>
detail::value_return_t<E> etl::max ( E &&  values)

Returns the maximum element contained in the expression When possible, this returns a reference to the element.

Parameters
valuesThe expression to search
Returns
The maximum element of the expression

◆ max_index()

template<etl_expr E>
size_t etl::max_index ( E &&  values)

Returns the index of the maximum element contained in the expression.

Parameters
valuesThe expression to search
Returns
The index of the maximum element of the expression

◆ max_pool_2d() [1/3]

template<etl_expr E>
dyn_pool_2d_expr<detail::build_type<E>, impl::max_pool_2d> etl::max_pool_2d ( E &&  value,
size_t  c1,
size_t  c2 
)

2D Max Pooling of the given matrix expression

Parameters
valueThe matrix expression
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the 2D Max Pooling of the input expression.

◆ max_pool_2d() [2/3]

template<etl_expr E>
dyn_pool_2d_expr<detail::build_type<E>, impl::max_pool_2d> etl::max_pool_2d ( E &&  value,
size_t  c1,
size_t  c2,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

2D Max Pooling of the given matrix expression

Parameters
valueThe matrix expression
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the 2D Max Pooling of the input expression.

◆ max_pool_2d() [3/3]

template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr E>
pool_2d_expr<detail::build_type<E>, C1, C2, S1, S2, P1, P2, impl::max_pool_2d> etl::max_pool_2d ( E &&  value)

2D Max Pooling of the given matrix expression

Parameters
valueThe matrix expression
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the 2D Max Pooling of the input expression.

◆ max_pool_3d() [1/3]

template<etl_expr E>
dyn_pool_3d_expr<detail::build_type<E>, impl::max_pool_3d> etl::max_pool_3d ( E &&  value,
size_t  c1,
size_t  c2,
size_t  c3 
)

3D Max Pooling of the given matrix expression

Parameters
valueThe matrix expression
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the 3D Max Pooling of the input expression.

◆ max_pool_3d() [2/3]

template<etl_expr E>
dyn_pool_3d_expr<detail::build_type<E>, impl::max_pool_3d> etl::max_pool_3d ( E &&  value,
size_t  c1,
size_t  c2,
size_t  c3,
size_t  s1,
size_t  s2,
size_t  s3,
size_t  p1 = 0,
size_t  p2 = 0,
size_t  p3 = 0 
)

3D Max Pooling of the given matrix expression

Parameters
valueThe matrix expression
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the 3D Max Pooling of the input expression.

◆ max_pool_3d() [3/3]

template<size_t C1, size_t C2, size_t C3, size_t S1 = C1, size_t S2 = C2, size_t S3 = C3, size_t P1 = 0, size_t P2 = 0, size_t P3 = 0, etl_expr E>
pool_3d_expr<detail::build_type<E>, C1, C2, C3, S1, S2, S3, P1, P2, P3, impl::max_pool_3d> etl::max_pool_3d ( E &&  value)

3D Max Pooling of the given matrix expression

Parameters
valueThe matrix expression
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
C3The third pooling ratio
Returns
A expression representing the 3D Max Pooling of the input expression.

◆ max_pool_derivative_2d() [1/3]

template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr E, etl_expr F>
pool_derivative_expr<detail::build_type<E>, F, C1, C2, 0, S1, S2, 0, P1, P2, 0, impl::max_pool_derivative_2d> etl::max_pool_derivative_2d ( E &&  input,
F &&  output 
)

Derivative of the 2D Max Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the Derivative of 2D Max Pooling of the input expression.

◆ max_pool_derivative_2d() [2/3]

template<typename E , typename F >
dyn_pool_derivative_expr<detail::build_type<E>, F, impl::max_pool_derivative_2d> etl::max_pool_derivative_2d ( E &&  input,
F &&  output,
size_t  c1,
size_t  c2 
)

Derivative of the 2D Max Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Derivative of 2D Max Pooling of the input expression.

◆ max_pool_derivative_2d() [3/3]

template<typename E , typename F >
dyn_pool_derivative_expr<detail::build_type<E>, F, impl::max_pool_derivative_2d> etl::max_pool_derivative_2d ( E &&  input,
F &&  output,
size_t  c1,
size_t  c2,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Derivative of the 2D Max Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Derivative of 2D Max Pooling of the input expression.

◆ max_pool_derivative_3d() [1/2]

template<size_t C1, size_t C2, size_t C3, etl_expr E, etl_expr F>
pool_derivative_expr<detail::build_type<E>, F, C1, C2, C3, C1, C2, C3, 0, 0, 0, impl::max_pool_derivative_3d> etl::max_pool_derivative_3d ( E &&  input,
F &&  output 
)

Derivative of the 3D Max Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
C3The third pooling ratio
Returns
A expression representing the Derivative of 3D Max Pooling of the input expression.

◆ max_pool_derivative_3d() [2/2]

template<typename E , typename F >
dyn_pool_derivative_expr<detail::build_type<E>, F, impl::max_pool_derivative_3d> etl::max_pool_derivative_3d ( E &&  input,
F &&  output,
size_t  c1,
size_t  c2,
size_t  c3 
)

Derivative of the 3D Max Pooling of the given matrix expression.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the Derivative of 3D Max Pooling of the input expression.

◆ max_pool_upsample_2d() [1/3]

template<typename A , typename B , typename C >
dyn_pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, true> etl::max_pool_upsample_2d ( A &&  input,
B &&  output,
C &&  errors,
size_t  c1,
size_t  c2 
)

Derivative of the 2D Max Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Derivative of 3D Max Pooling of the input expression.

◆ max_pool_upsample_2d() [2/3]

template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B, etl_expr C>
pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, C1, C2, S1, S2, P1, P2, true> etl::max_pool_upsample_2d ( A &&  input,
B &&  output,
C &&  errors 
)

Derivative of the 2D Max Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the Derivative of 3D Max Pooling of the input expression.

◆ max_pool_upsample_2d() [3/3]

template<typename A , typename B , typename C >
dyn_pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, true> etl::max_pool_upsample_2d ( A &&  input,
B &&  output,
C &&  errors,
size_t  c1,
size_t  c2,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Derivative of the 2D Max Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Derivative of 3D Max Pooling of the input expression.

◆ max_pool_upsample_3d() [1/2]

template<typename A , typename B , typename C >
dyn_pool_upsample_3d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, true> etl::max_pool_upsample_3d ( A &&  input,
B &&  output,
C &&  errors,
size_t  c1,
size_t  c2,
size_t  c3 
)

Derivative of the 3D Max Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the Derivative of 3D Max Pooling of the input expression.

◆ max_pool_upsample_3d() [2/2]

template<size_t C1, size_t C2, size_t C3, typename A , typename B , typename C >
pool_upsample_3d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, C1, C2, C3, true> etl::max_pool_upsample_3d ( A &&  input,
B &&  output,
C &&  errors 
)

Derivative of the 3D Max Pooling of the given matrix expression and upsampling.

Parameters
inputThe input
outputThe output
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
C3The third pooling ratio
Returns
A expression representing the Derivative of 3D Max Pooling of the input expression.

◆ mean()

template<etl_expr E>
value_t<E> etl::mean ( E &&  values)

Returns the mean of all the values contained in the given expression.

Parameters
valuesThe expression to reduce
Returns
The mean of the values of the expression

◆ mean_l()

template<matrix E>
auto etl::mean_l ( E &&  value)

Aggregate (average) a dimension from the left. This effectively removes the first dimension from the expression and averages its values to the right.

Parameters
valueThe value to aggregate
Returns
an expression representing the aggregated expression

◆ mean_r()

template<matrix E>
auto etl::mean_r ( E &&  value)

Aggregate (average) a dimension from the right. This effectively removes the last dimension from the expression and averages its values to the left.

Parameters
valueThe value to aggregate
Returns
an expression representing the aggregated expression

◆ memory_alias()

template<typename P1 , typename P2 >
bool etl::memory_alias ( const P1 *  a_begin,
const P1 *  a_end,
const P2 *  b_begin,
const P2 *  b_end 
)

Test if two memory ranges overlap.

Parameters
a_beginThe beginning of the first range
a_endThe end (exclusive) of the first range
b_beginThe beginning of the second range
b_endThe end (exclusive) of the second range

The ranges must be ordered (begin <= end). This function is optimized so that only two comparisons are performed.

Returns
true if the two ranges overlap, false otherwise

◆ memory_slice()

template<bool Aligned = false, etl_expr E>
auto etl::memory_slice ( E &&  value,
size_t  first,
size_t  last 
) -> detail::identity_helper<E, memory_slice_view<detail::build_identity_type<E>, Aligned>>

Returns view representing a memory slice view of the given expression.

Parameters
valueThe ETL expression
firstThe first index
lastThe last index
Returns
a view expression representing a sub dimensional view of the given expression

◆ merge()

template<etl_expr M, etl_expr N>
M& etl::merge ( M &  merged,
const N &  sub,
size_t  index 
)

Merge sub inside merged at the given position.

Parameters
mergedThe merged result
subThe data to merge inside merged
indexThe position at which to merge
Returns
merged

◆ min() [1/2]

template<etl_expr L, typename R >
auto etl::min ( L &&  lhs,
R &&  rhs 
)

Create an expression with the min value of lhs or rhs.

Parameters
lhsThe left hand side ETL expression
rhsThe right hand side ETL expression
Returns
an expression representing the min values from lhs and rhs

◆ min() [2/2]

template<etl_expr E>
detail::value_return_t<E> etl::min ( E &&  values)

Returns the minimum element contained in the expression When possible, this returns a reference to the element.

Parameters
valuesThe expression to search
Returns
The minimum element of the expression

◆ min_index()

template<etl_expr E>
size_t etl::min_index ( E &&  values)

Returns the index of the minimum element contained in the expression.

Parameters
valuesThe expression to search
Returns
The index of the minimum element of the expression

◆ minor_stride()

template<etl_2d E>
size_t etl::minor_stride ( E &&  expr)

Returns the minor stride of the given ETL matrix expression.

Parameters
exprThe ETL expression.
Returns
the minor stride of the given ETL matrix expression

◆ mul() [1/3]

template<etl_2d A, etl_2d B>
auto etl::mul ( A &&  a,
B &&  b 
)

Multiply two matrices together.

Multiply a vector and a matrix together.

Multiply a matrix and a vector together.

Parameters
aThe left hand side matrix
bThe right hand side matrix
Returns
An expression representing the matrix-matrix multiplication of a and b
Parameters
aThe left hand side matrix
bThe right hand side vector
Returns
An expression representing the matrix-vector multiplication of a and b
Parameters
aThe left hand side vector
bThe right hand side matrix
Returns
An expression representing the vector-matrix multiplication of a and b

◆ mul() [2/3]

template<etl_2d A, etl_2d B>
gemm_expr<A, B, false> etl::mul ( value_t< A >  alpha,
gemm_expr< A, B, false > &&  gemm 
)

Create an expression for alpha * (A * B)

Parameters
alphaThe alpha factor
gemmThe GEMM expression
Returns
An expression representing alpha * (A * B)

◆ mul() [3/3]

template<etl_2d A, etl_2d B, etl_2d C>
auto etl::mul ( A &&  a,
B &&  b,
C &&  c 
)

Multiply two matrices together and store the result in c.

Multiply a vector and a matrix together and store the result in c.

Multiply a matrix and a vector together and store the result in c.

Parameters
aThe left hand side matrix
bThe right hand side matrix
cThe expression used to store the result
Returns
An expression representing the matrix-matrix multiplication of a and b
Parameters
aThe left hand side matrix
bThe right hand side vector
cThe expression used to store the result
Returns
An expression representing the matrix-vector multiplication of a and b
Parameters
aThe left hand side vector
bThe right hand side matrix
cThe expression used to store the result
Returns
An expression representing the vector-matrix multiplication of a and b

◆ norm()

template<typename A >
value_t<A> etl::norm ( const A &  a)

Returns euclidean norm of the given expression.

Parameters
aThe expression
Returns
The euclidean norm of the expression

◆ normal_generator() [1/2]

template<typename T = double>
auto etl::normal_generator ( mean = 0.0,
stddev = 1.0 
)

Create an expression generating numbers from a normal distribution.

Parameters
meanThe mean of the distribution
stddevThe standard deviation of the distribution
Returns
An expression generating numbers from the normal distribution

◆ normal_generator() [2/2]

template<typename T = double, typename G >
auto etl::normal_generator ( G &  g,
mean = 0.0,
stddev = 1.0 
)

Create an expression generating numbers from a normal distribution using the given custom random engine.

Parameters
gThe random engine
meanThe mean of the distribution
stddevThe standard deviation of the distribution
Returns
An expression generating numbers from the normal distribution

◆ normal_noise() [1/2]

template<etl_expr E>
auto etl::normal_noise ( E &&  value)

Add some normal noise (0, 1.0) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ normal_noise() [2/2]

template<etl_expr E, typename G >
auto etl::normal_noise ( G &  g,
E &&  value 
)

Add some normal noise (0, 1.0) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ normalize_flat()

template<etl_expr M>
void etl::normalize_flat ( M &  matrix)

Normalize the given ETL contrainer to zero-mean and unit-variance.

Parameters
matrixThe container to normalize

◆ normalize_sub()

template<etl_expr M>
void etl::normalize_sub ( M &  matrix)

Normalize each sub container of the given ETL contrainer to zero-mean and unit-variance.

Parameters
matrixThe container to normalize

◆ not_equal()

template<typename LE , typename RE >
auto etl::not_equal ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the elementwise comparison of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the element wise comparison of lhs and rhs

◆ nth_size()

template<size_t S, size_t I, size_t F, size_t... Dims>
constexpr size_t etl::nth_size ( )

Traits to get the Sth dimension in Dims..

Template Parameters
SThe searched dimension
IThe current index (start at zero)

◆ one_if()

template<etl_expr E, arithmetic T>
auto etl::one_if ( E &&  value,
v 
)

Creates an expression with values of 1 where the ETL expression has a value of v.

Parameters
valueThe ETL expression
vThe value to test
Returns
an expression representing the values of 1 where the ETL expression has a value of v

◆ one_if_max()

template<etl_expr E>
auto etl::one_if_max ( E &&  value)

Creates an expression with a value of 1 where the max value is and all zeroes other places.

Parameters
valueThe ETL expression
Returns
an expression with a value of 1 where the max value is and all zeroes other places

◆ one_if_max_sub()

template<etl_2d E>
auto etl::one_if_max_sub ( const E &  value)

Return, for each original position, 1.0 if the value is the max of the sub matrix, 0.0 otherwise.

Parameters
valueThe matrix to explore
Returns
an expression representing the 1-if-max view for each sub view of the input matrix

◆ operator!=() [1/2]

template<typename T >
bool etl::operator!= ( const complex< T > &  lhs,
const complex< T > &  rhs 
)
inline

Test two complex numbers for inequality.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
true if the numbers are not equals, false otherwise

◆ operator!=() [2/2]

template<etl_expr L, etl_expr R>
bool etl::operator!= ( L &&  lhs,
R &&  rhs 
)

Compare the expression with another expression for inequality.

Returns
false if the expressions contains the same sequence of values, true othwerise.

◆ operator%() [1/3]

template<etl_expr LE, etl_expr RE>
auto etl::operator% ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the modulo of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the modulo of lhs and rhs

◆ operator%() [2/3]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::operator% ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the modulo of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the modulo of lhs and rhs (scalar)

◆ operator%() [3/3]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::operator% ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the modulo of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the modulo of lhs (scalar) and rhs

◆ operator%=() [1/2]

template<simple_lhs LE, arithmetic RE>
decltype(auto) etl::operator%= ( LE &&  lhs,
RE  rhs 
)

Compound modulo of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator%=() [2/2]

template<simple_lhs LE, etl_expr RE>
decltype(auto) etl::operator%= ( LE &&  lhs,
const RE &  rhs 
)

Compound modulo of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator()() [1/4]

const_return_type etl::operator() ( size_t  j) const

Access to the element at the given position.

Parameters
jThe index
Returns
a reference to the element at the given position.

◆ operator()() [2/4]

template<typename... S>
const_return_type etl::operator() ( size_t  f1,
size_t  f2,
S...  sizes 
) const

Access to the element at the given position.

Parameters
f1The first index
f2The second index
sizesThe following indices
Returns
a reference to the element at the given position.

◆ operator()() [3/4]

template<typename... S>
etl::operator() ( S...  args) const

Access to the element at the given (args...) position.

Parameters
argsThe indices
Returns
a reference to the element at the given position.

◆ operator()() [4/4]

template<typename... S>
return_type etl::operator() ( size_t  f1,
size_t  f2,
S...  sizes 
)

Access to the element at the given (i,j) position.

Parameters
f1The first index
f2The second index
sizesThe following indices
Returns
a reference to the element at the given position.

◆ operator*() [1/8]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::operator* ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the multiplication of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the multiplication of lhs and rhs (scalar)

◆ operator*() [2/8]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::operator* ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the multiplication of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the multiplication of lhs (scalar) and rhs

◆ operator*() [3/8]

template<typename T >
complex<T> etl::operator* ( const complex< T > &  lhs,
const complex< T > &  rhs 
)
inline

Computes the multiplication of two complex numbers.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
a new complex with the value of the multiplication of the two complex numbers

◆ operator*() [4/8]

template<typename T >
complex<T> etl::operator* ( const complex< T > &  lhs,
rhs 
)
inline

Computes the multiplication of a complex number and a scalar.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
a new complex with the value of the multiplication of a complex number and a scalar

◆ operator*() [5/8]

template<typename T >
complex<T> etl::operator* ( lhs,
const complex< T > &  rhs 
)
inline

Computes the multiplication of a complex number and a scalar.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
a new complex with the value of the multiplication of a complex number and a scalar

◆ operator*() [6/8]

template<etl_2d A, etl_2d B>
auto etl::operator* ( A &&  a,
B &&  b 
)

Multiply two matrices together.

Multiply a vector and a matrix together.

Multiply a matrix and a vector together.

Parameters
aThe left hand side matrix
bThe right hand side matrix
Returns
An expression representing the matrix-matrix multiplication of a and b
Parameters
aThe left hand side matrix
bThe right hand side vector
Returns
An expression representing the matrix-vector multiplication of a and b
Parameters
aThe left hand side vector
bThe right hand side matrix
Returns
An expression representing the vector-matrix multiplication of a and b

◆ operator*() [7/8]

template<etl_2d A, etl_2d B>
gemm_expr<A, B, false> etl::operator* ( value_t< A >  alpha,
gemm_expr< A, B, false > &&  gemm 
)

Create an expression for alpha * (A * B)

Parameters
alphaThe alpha factor
gemmThe GEMM expression
Returns
An expression representing alpha * (A * B)

◆ operator*() [8/8]

template<etl_expr Expr>
decltype(auto) etl::operator* ( Expr &&  expr)

Force evaluation of an expression.

The temporary sub expressions will be evaluated and all the results are guaranteed to be in CPU memory.

Returns
The expression

◆ operator*=() [1/2]

template<simple_lhs LE, arithmetic RE>
decltype(auto) etl::operator*= ( LE &&  lhs,
RE  rhs 
)

Compound multiplication of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator*=() [2/2]

template<simple_lhs LE, etl_expr RE>
decltype(auto) etl::operator*= ( LE &&  lhs,
const RE &  rhs 
)

Compound multiplication of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator+() [1/5]

template<etl_expr LE, etl_expr RE>
auto etl::operator+ ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the addition of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the addition of lhs and rhs

◆ operator+() [2/5]

template<typename E >
auto etl::operator+ ( E &&  value)

Unary plus on the expression

Parameters
valueThe expression on which to apply the operator
Returns
an expression representing the unary plus of the given expression

◆ operator+() [3/5]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::operator+ ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the addition of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the addition of lhs and rhs (scalar)

◆ operator+() [4/5]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::operator+ ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the addition of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the addition of lhs (scalar) and rhs

◆ operator+() [5/5]

template<typename T >
complex<T> etl::operator+ ( const complex< T > &  lhs,
const complex< T > &  rhs 
)
inline

Computes the addition of two complex numbers.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
a new complex with the value of the addition of the two complex numbers

◆ operator+=() [1/2]

template<simple_lhs LE, arithmetic RE>
decltype(auto) etl::operator+= ( LE &&  lhs,
RE  rhs 
)

Compound addition of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator+=() [2/2]

template<simple_lhs LE, etl_expr RE>
decltype(auto) etl::operator+= ( LE &&  lhs,
const RE &  rhs 
)

Compound addition of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator-() [1/6]

template<etl_expr LE, etl_expr RE>
auto etl::operator- ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the subtraction of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the subtraction of lhs and rhs

◆ operator-() [2/6]

template<typename E >
auto etl::operator- ( E &&  value)

Unary minus on the expression

Parameters
valueThe expression on which to apply the operator
Returns
an expression representing the unary minus of the given expression

◆ operator-() [3/6]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::operator- ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the subtraction of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the subtraction of lhs and rhs (scalar)

◆ operator-() [4/6]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::operator- ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the subtraction of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the subtraction of lhs (scalar) and rhs

◆ operator-() [5/6]

template<typename T >
complex<T> etl::operator- ( complex< T >  rhs)
inline

Returns a complex number with the value of -rhs.

Parameters
rhsThe right hand side complex
Returns
a complex number with the value of -rhs

◆ operator-() [6/6]

template<typename T >
complex<T> etl::operator- ( const complex< T > &  lhs,
const complex< T > &  rhs 
)
inline

Computes the subtraction of two complex numbers.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
a new complex with the value of the subtraction of the two complex numbers

◆ operator-=() [1/2]

template<simple_lhs LE, arithmetic RE>
decltype(auto) etl::operator-= ( LE &&  lhs,
RE  rhs 
)

Compound subtraction of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator-=() [2/2]

template<simple_lhs LE, etl_expr RE>
decltype(auto) etl::operator-= ( LE &&  lhs,
const RE &  rhs 
)

Compound subtraction of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator/() [1/5]

template<etl_expr LE, etl_expr RE>
auto etl::operator/ ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the division of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the division of lhs and rhs

◆ operator/() [2/5]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::operator/ ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the division of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the division of lhs and rhs (scalar)

◆ operator/() [3/5]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::operator/ ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the division of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the division of lhs (scalar) and rhs

◆ operator/() [4/5]

template<typename T >
complex<T> etl::operator/ ( const complex< T > &  lhs,
rhs 
)
inline

Computes the division of a complex number and a scalar.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
a new complex with the value of the multiplication of a complex number and a scalar

◆ operator/() [5/5]

template<typename T >
complex<T> etl::operator/ ( const complex< T > &  lhs,
const complex< T > &  rhs 
)
inline

Computes the division of two complex numbers.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
a new complex with the value of the division of the two complex numbers

◆ operator/=() [1/2]

template<simple_lhs LE, arithmetic RE>
decltype(auto) etl::operator/= ( LE &&  lhs,
RE  rhs 
)

Compound division of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator/=() [2/2]

template<simple_lhs LE, etl_expr RE>
decltype(auto) etl::operator/= ( LE &&  lhs,
const RE &  rhs 
)

Compound division of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator<<() [1/3]

friend std::ostream& etl::operator<< ( std::ostream &  os,
const dyn_matrix_view v 
)

Print a representation of the view on the given stream.

Parameters
osThe output stream
vThe view to print
Returns
the output stream

◆ operator<<() [2/3]

template<typename T >
std::ostream& etl::operator<< ( std::ostream &  os,
const etl::complex< T > &  c 
)

Outputs a textual representation of the complex number in the given stream.

Parameters
osThe stream to output to
cThe complex number to get representation from
Returns
The output stream

◆ operator<<() [3/3]

friend std::ostream& etl::operator<< ( std::ostream &  os,
const sub_view v 
)

Print a representation of the view on the given stream.

Parameters
osThe output stream
vThe view to print
Returns
the output stream

◆ operator==() [1/2]

template<etl_expr L, etl_expr R>
bool etl::operator== ( L &&  lhs,
R &&  rhs 
)

Compare two ETL expressions for equality.

Returns
true if the expressions contains the same sequence of values, false othwerise.

◆ operator==() [2/2]

template<typename T >
bool etl::operator== ( const complex< T > &  lhs,
const complex< T > &  rhs 
)
inline

Test two complex numbers for equality.

Parameters
lhsThe left hand side complex
rhsThe right hand side complex
Returns
true if the numbers are equals, false otherwise

◆ operator>>() [1/3]

template<etl_expr LE, etl_expr RE>
auto etl::operator>> ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the scalar multipliation of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the scalar multipliation of lhs and rhs

◆ operator>>() [2/3]

template<etl_expr LE, std::convertible_to< value_t< LE >> RE>
auto etl::operator>> ( LE &&  lhs,
RE  rhs 
)

Builds an expression representing the multiplication of lhs and rhs (scalar)

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the multiplication of lhs and rhs (scalar)

◆ operator>>() [3/3]

template<etl_expr RE, std::convertible_to< value_t< RE >> LE>
auto etl::operator>> ( LE  lhs,
RE &&  rhs 
)

Builds an expression representing the multiplication of lhs (scalar) and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the multiplication of lhs (scalar) and rhs

◆ operator>>=() [1/2]

template<simple_lhs LE, arithmetic RE>
decltype(auto) etl::operator>>= ( LE &&  lhs,
RE  rhs 
)

Compound multiplication of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator>>=() [2/2]

template<simple_lhs LE, etl_expr RE>
decltype(auto) etl::operator>>= ( LE &&  lhs,
const RE &  rhs 
)

Compound multiplication of the right hand side to the left hand side.

Parameters
lhsThe left hand side, will be changed
rhsThe right hand side
Returns
the left hand side

◆ operator[]()

const_reference_type etl::operator[] ( size_t  n) const
noexcept

Returns the element at the given index.

Returns the element at the given index This function may result in insertion of deletion of elements in the matrix and therefore invalidation of some references.

Parameters
jThe index
Returns
a reference to the element at the given index.
Parameters
nThe index
Returns
a reference to the element at the given index.

◆ opt()

template<typename Expr >
auto etl::opt ( Expr &&  expr) -> optimized_expr<detail::build_type<Expr>>

Create an optimized expression wrapping the given expression.

The expression will be optimized before being evaluated.

Parameters
exprThe expression to be wrapped
Returns
an optimized expression wrapping the given expression

◆ optimize()

template<typename Builder , typename Expr >
void etl::optimize ( Builder  parent_builder,
Expr &  expr 
)

Optimize an expression and reconstruct the parent from the optimized expression.

Parameters
parent_builderThe builder to rebuild the parent
exprThe expression to optimize

◆ optimized_forward()

template<typename Expr , typename Result >
void etl::optimized_forward ( Expr &  expr,
Result  result 
)

Optimize an expression and pass the optimized expression to the given functor.

Parameters
exprThe expression to optimize
resultThe functor to apply on the optimized expression

◆ optional_move()

template<bool B, typename T >
decltype(auto) constexpr etl::optional_move ( T &&  t)

Function to move or forward depending on a constant boolean flag.

Template Parameters
BDecides if return is moving (true) or forwarding (false)

◆ outer() [1/2]

template<etl_expr A, etl_expr B>
outer_product_expr<detail::build_type<A>, detail::build_type<B> > etl::outer ( A &&  a,
B &&  b 
)

Outer product multiplication of two matrices.

Parameters
aThe left hand side matrix
bThe right hand side matrix
Returns
An expression representing the matrix-matrix multiplication of a and b

◆ outer() [2/2]

template<etl_expr A, etl_expr B, etl_expr C>
auto etl::outer ( A &&  a,
B &&  b,
C &&  c 
)

Outer product multiplication of two matrices and store the result in c.

Parameters
aThe left hand side matrix
bThe right hand side matrix
cThe expression used to store the result
Returns
An expression representing the matrix-matrix multiplication of a and b

◆ p_max_pool_h() [1/2]

template<etl_expr E>
dyn_prob_pool_2d_expr<detail::build_type<E> > etl::p_max_pool_h ( E &&  value,
size_t  c1,
size_t  c2 
)

Probabilistic Max Pooling for hidden units.

Parameters
valueThe input expression
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Probabilistic Max Pooling of hidden units

◆ p_max_pool_h() [2/2]

template<size_t C1, size_t C2, typename E >
prob_pool_2d_expr<detail::build_type<E>, C1, C2> etl::p_max_pool_h ( E &&  value)

Probabilistic Max Pooling for hidden units.

Parameters
valueThe input expression
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the Probabilistic Max Pooling of hidden units

◆ p_max_pool_p() [1/2]

template<size_t C1, size_t C2, etl_expr E>
pool_2d_expr<detail::build_type<E>, C1, C2, C1, C2, 0, 0, impl::standard::pmp_p_impl> etl::p_max_pool_p ( E &&  value)

Probabilistic Max Pooling for pooling units.

Parameters
valueThe input expression
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the Probabilistic Max Pooling of pooling units

◆ p_max_pool_p() [2/2]

template<etl_expr E>
dyn_pool_2d_expr<detail::build_type<E>, impl::standard::dyn_pmp_p_impl> etl::p_max_pool_p ( E &&  value,
size_t  c1,
size_t  c2 
)

Probabilistic Max Pooling for pooling units.

Parameters
valueThe input expression
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Probabilistic Max Pooling of pooling units

◆ parallel()

template<typename Expr >
auto etl::parallel ( Expr &&  expr) -> parallel_expr<detail::build_type<Expr>>

Create a parallel expression wrapping the given expression.

The evaluation (and assignment) of the expression will be done parallelly, if possible.

Parameters
exprThe expression to be wrapped
Returns
a parallel expression wrapping the given expression

◆ parallel_shuffle() [1/2]

template<etl_expr T1, etl_expr T2>
void etl::parallel_shuffle ( T1 &  v1,
T2 &  v2 
)

Shuffle all the elements of two vectors or matrices, using the same permutation.

Note: This function will be executed on GPU if EGBLAS is configured and the par_shuffle_seed operation is available.

Parameters
v1The first vector or matrix to shuffle
v2The second vector or matrix to shuffle

◆ parallel_shuffle() [2/2]

template<etl_expr T1, etl_expr T2, typename G >
void etl::parallel_shuffle ( T1 &  v1,
T2 &  v2,
G &&  g 
)

Shuffle all the elements of two vectors or matrices, using the same permutation.

Note: This function will be executed on GPU if EGBLAS is configured and the par_shuffle_seed operation is available.

Parameters
v1The first vector or matrix to shuffle
v2The second vector or matrix to shuffle

◆ parallel_shuffle_first() [1/2]

template<etl_expr T1, etl_expr T2, typename G >
void etl::parallel_shuffle_first ( T1 &  m1,
T2 &  m2,
G &&  g 
)

Shuffle all the elements of two matrices, using the same permutation.

The elements will be shuffled according to the first dimension of the matrix.

Note: This function will be executed on GPU if EGBLAS is configured and the par_shuffle operation is available.

Parameters
m1The first matrix to shuffle
m2The first matrix to shuffle

◆ parallel_shuffle_first() [2/2]

template<etl_expr T1, etl_expr T2>
void etl::parallel_shuffle_first ( T1 &  m1,
T2 &  m2 
)

Shuffle all the elements of two matrices, using the same permutation.

The elements will be shuffled according to the first dimension of the matrix.

Note: This function will be executed on GPU if EGBLAS is configured and the par_shuffle operation is available.

Parameters
m1The first matrix to shuffle
m2The first matrix to shuffle

◆ parallel_shuffle_flat() [1/2]

template<etl_expr T1, same_dimensions< T1 > T2, typename G >
void etl::parallel_shuffle_flat ( T1 &  v1,
T2 &  v2,
G &&  g 
)

Shuffle all the elements of two vectors, using the same permutation.

Note: This function will be executed on GPU if EGBLAS is configured and the par_shuffle operation is available.

Parameters
v1The first vector to shuffle
v2The second vector to shuffle

◆ parallel_shuffle_flat() [2/2]

template<etl_expr T1, etl_expr T2>
void etl::parallel_shuffle_flat ( T1 &  v1,
T2 &  v2 
)

Shuffle all the elements of two vectors, using the same permutation.

Note: This function will be executed on GPU if EGBLAS is configured and the par_shuffle operation is available.

Parameters
v1The first vector to shuffle
v2The second vector to shuffle

◆ pow()

template<etl_expr E, arithmetic T>
auto etl::pow ( E &&  value,
v 
)

Apply pow(x, v) on each element x of the ETL expression.

This function is not guaranteed to return the same results in different operation modes (CPU, GPU, VEC). It should only be used with positives x.

Parameters
valueThe ETL expression
vThe power
Returns
an expression representing the pow(x, v) of each value x of the given expression

◆ pow_int()

template<etl_expr E>
auto etl::pow_int ( E &&  value,
size_t  v 
)

Apply pow(x, v) on each element x of the ETL expression.

Parameters
valueThe ETL expression
vThe power
Returns
an expression representing the pow(x, v) of each value x of the given expression

◆ pow_precise()

template<etl_expr E, arithmetic T>
auto etl::pow_precise ( E &&  value,
v 
)

Apply pow(x, v) on each element x of the ETL expression.

This function does not have different precision in different operation mode (GPU, VEC, ...). This is guaranteeed to work with the same precision as std::pow.

Parameters
valueThe ETL expression
vThe power
Returns
an expression representing the pow(x, v) of each value x of the given expression

◆ qr()

template<etl_expr AT, etl_expr QT, etl_expr RT>
bool etl::qr ( AT &  A,
QT &  Q,
RT &  R 
)

Decomposition the matrix so that A = Q * R.

Parameters
AThe A matrix (mxn)
QThe Q matrix (Orthogonal mxm)
RThe R matrix (Upper Triangular mxn)
Returns
true if the decomposition suceeded, false otherwise

◆ r_bernoulli() [1/2]

template<etl_expr E>
auto etl::r_bernoulli ( const E &  value) -> detail::unary_helper<E, reverse_bernoulli_unary_op>

Apply Reverse Bernoulli sampling to the values of the expression.

Parameters
valuethe expression to sample
Returns
an expression representing the Reverse Bernoulli sampling of the given expression

◆ r_bernoulli() [2/2]

template<etl_expr E, typename G >
auto etl::r_bernoulli ( G &  g,
E &&  value 
)

Apply Reverse Bernoulli sampling to the values of the expression.

Parameters
valuethe expression to sample
Returns
an expression representing the Reverse Bernoulli sampling of the given expression

◆ ranged_noise()

template<etl_expr E, arithmetic T>
auto etl::ranged_noise ( E &&  value,
v 
)

Add some normal noise N(0,1) to x. No noise is added to values equal to zero or to given the value.

Parameters
valueThe value to add noise to
vThe value for the upper range limit
Returns
An expression representing the left value plus the noise

◆ read_flat()

value_type etl::read_flat ( size_t  j) const
noexcept

Returns the value at the given index This function never has side effects.

Returns the value at the given index This function never alters the state of the container.

Parameters
jThe index
Returns
the value at the given index.
Parameters
nThe index
Returns
the value at the given index.

◆ real()

template<etl_complex_expr E>
auto etl::real ( E &&  value)

Extract the real part of each complex value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the real part of each complex of the given expression

◆ relu()

template<etl_expr E>
auto etl::relu ( const E &  value) -> detail::unary_helper<E, relu_unary_op>

Return the relu activation of the given ETL expression.

Parameters
valueThe ETL expression
Returns
An ETL expression representing the relu activation of the input.

◆ relu_derivative()

template<etl_expr E>
auto etl::relu_derivative ( const E &  value) -> detail::unary_helper<E, relu_derivative_op>

Return the derivative of the relu function of the given ETL expression.

Parameters
valueThe ETL expression
Returns
An ETL expression representing the derivative of the relu function of the input.

◆ rep() [1/2]

template<size_t D1, size_t... D, etl_expr E>
auto etl::rep ( E &&  value)

Repeats the expression to the right (adds dimension after existing)

Parameters
valueThe expression to repeat
Template Parameters
D1The first repeat
DThe remaining repeated dimensions
Returns
an expression representing the repeated expression

◆ rep() [2/2]

template<typename... D, etl_expr E>
auto etl::rep ( E &&  value,
size_t  d1,
D...  d 
)

Repeats the expression to the right (adds dimension after existing)

Parameters
valueThe expression to repeat
d1The first repeat
dThe remaining repeated dimensions
Returns
an expression representing the repeated expression

◆ rep_l() [1/2]

template<size_t D1, size_t... D, etl_expr E>
auto etl::rep_l ( E &&  value)

Repeats the expression to the left (adds dimension before existing)

Parameters
valueThe expression to repeat
Template Parameters
D1The first repeat
DThe remaining repeated dimensions
Returns
an expression representing the repeated expression

◆ rep_l() [2/2]

template<typename... D, etl_expr E>
auto etl::rep_l ( E &&  value,
size_t  d1,
D...  d 
)

Repeats the expression to the left (adds dimension after existing)

Parameters
valueThe expression to repeat
d1The first repeat
dThe remaining repeated dimensions
Returns
an expression representing the repeated expression

◆ rep_r() [1/2]

template<size_t D1, size_t... D, etl_expr E>
auto etl::rep_r ( E &&  value)

Repeats the expression to the right (adds dimension after existing)

Parameters
valueThe expression to repeat
Template Parameters
D1The first repeat
DThe remaining repeated dimensions
Returns
an expression representing the repeated expression

◆ rep_r() [2/2]

template<typename... D, etl_expr E>
auto etl::rep_r ( E &&  value,
size_t  d1,
D...  d 
)

Repeats the expression to the right (adds dimension after existing)

Parameters
valueThe expression to repeat
d1The first repeat
dThe remaining repeated dimensions
Returns
an expression representing the repeated expression

◆ requires() [1/12]

template<typename T >
etl::requires ( !fast_slice_view_able< T >  )

Specialization of slice_view for non-DMA types.

< The type of this expression

< The iterable base type

< The assignable base type

< The sub type

< The value contained in the expression

< The memory acess type

< The const memory access type

< The type returned by the view

< The const type return by the view

< The iterator type

< The const iterator type

< The Sub expression

< The index

< The last index

Construct a new slice_view over the given sub expression

Parameters
subThe sub expression
firstThe first index
lastThe last index

Returns the element at the given index

Parameters
jThe index
Returns
a reference to the element at the given index.

Returns the element at the given index

Parameters
jThe index
Returns
a reference to the element at the given index.

Returns the value at the given index This function never has side effects.

Parameters
jThe index
Returns
the value at the given index.

Access to the element at the given (args...) position

Parameters
argsThe indices
Returns
a reference to the element at the given position.

Access to the element at the given (args...) position

Parameters
argsThe indices
Returns
a reference to the element at the given position.

Creates a sub view of the matrix, effectively removing the first dimension and fixing it to the given index.

Parameters
xThe index to use
Returns
a sub view of the matrix at position x.

Load several elements of the expression at once

Parameters
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use
Returns
a vector containing several elements of the expression

Load several elements of the expression at once

Parameters
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use
Returns
a vector containing several elements of the expression

Test if this expression aliases with the given expression

Parameters
rhsThe other expression to test
Returns
true if the two expressions aliases, false otherwise

Assign to the given left-hand-side expression

Parameters
lhsThe expression to which assign

Add to the given left-hand-side expression

Parameters
lhsThe expression to which assign

Sub from the given left-hand-side expression

Parameters
lhsThe expression to which assign

Multiply the given left-hand-side expression

Parameters
lhsThe expression to which assign

Divide the given left-hand-side expression

Parameters
lhsThe expression to which assign

Modulo the given left-hand-side expression

Parameters
lhsThe expression to which assign

Apply the given visitor to this expression and its descendants.

Parameters
visitorThe visitor to apply

Ensures that the GPU memory is allocated and that the GPU memory is up to date (to undefined value).

Copy back from the GPU to the expression memory if necessary.

◆ requires() [2/12]

template<etl_expr T, size_t D>
etl::requires ( !is_dma< T >  )

View to represent a dyn matrix in top of an expression.

Template Parameters
TThe type of expression on which the view is made

◆ requires() [3/12]

template<matrix T, bool Aligned>
etl::requires ( !fast_sub_view_able< T >  )

View that shows a sub matrix of an expression.

Template Parameters
TThe type of expression on which the view is made

◆ requires() [4/12]

template<typename Derived , typename T , size_t D>
etl::requires ( D  ,
 
)

Matrix with run-time fixed dimensions.

The matrix support an arbitrary number of dimensions.

< The number of dimensions

< The memory alignment

< The value type

< The type used to store the dimensions

< The memory type

< The const memory type

< The derived (CRTP) type

< The type of this class

< The size of the matrix

< The dimensions of the matrix

Verify some invariants with assertions

This function should only be used internally to ensure that no breaking changes are made.

Allocate aligned memory for n elements of the given type

Template Parameters
Mthe type of objects to allocate
Parameters
nThe number of elements to allocate
Returns
The allocated memory

Release aligned memory for n elements of the given type

Parameters
ptrPointer to the memory to release
nThe number of elements to release

Initialize the dyn_base with a size of 0

Copy construct a dyn_base

Parameters
rhsThe dyn_base to copy from

Move construct a dyn_base

Parameters
rhsThe dyn_base to move from

Construct a dyn_base if the given size and dimensions

Parameters
sizeThe size of the matrix
dimensionsThe dimensions of the matrix

Move construct a dyn_base

Parameters
rhsThe dyn_base to move from

Returns the number of dimensions of the matrix

Returns
the number of dimensions of the matrix

Returns the size of the matrix, in O(1)

Returns
The size of the matrix

Returns the number of rows of the matrix (the first dimension)

Returns
The number of rows of the matrix

Returns the number of columns of the matrix (the first dimension)

Returns
The number of columns of the matrix

Returns the dth dimension of the matrix

Parameters
dThe dimension to get
Returns
The Dth dimension of the matrix

Returns the D2th dimension of the matrix

Returns
The D2th dimension of the matrix

◆ requires() [5/12]

template<typename T , size_t D>
etl::requires ( D  = = 2)

Sparse matrix implementation with COO storage type.

Template Parameters
TThe type of value
DThe number of dimensions

◆ requires() [6/12]

template<typename T >
etl::requires ( fast_slice_view_able< T >  )

Specialization of slice_view for DMA types.

< The type of this expression

< The iterable base type

< The assignable base type

< The sub type

< The value contained in the expression

< The memory acess type

< The const memory access type

< The type returned by the view

< The const type return by the view

< The iterator type

< The const iterator type

The vectorization type for V

< The Sub expression

< The index

< The last index

< The sub size

< Pointer to the CPU memory

< Indicates if the CPU is up to date

< Indicates if the GPU is up to date

Construct a new slice_view over the given sub expression

Parameters
subThe sub expression
firstThe first index
lastThe last index

Destructs the slice view

Returns the element at the given index

Parameters
jThe index
Returns
a reference to the element at the given index.

Returns the element at the given index

Parameters
jThe index
Returns
a reference to the element at the given index.

Returns the value at the given index This function never has side effects.

Parameters
jThe index
Returns
the value at the given index.

Access to the element at the given (args...) position

Parameters
argsThe indices
Returns
a reference to the element at the given position.

Access to the element at the given (args...) position

Parameters
argsThe indices
Returns
a reference to the element at the given position.

Creates a sub view of the matrix, effectively removing the first dimension and fixing it to the given index.

Parameters
xThe index to use
Returns
a sub view of the matrix at position x.

Load several elements of the expression at once

Parameters
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use
Returns
a vector containing several elements of the expression

Store several elements in the matrix at once

Parameters
inThe several elements to store
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use

Store several elements in the matrix at once

Parameters
inThe several elements to store
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use

Store several elements in the matrix at once, using non-temporal store

Parameters
inThe several elements to store
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use

Load several elements of the expression at once

Parameters
xThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use
Returns
a vector containing several elements of the expression

Test if this expression aliases with the given expression

Parameters
rhsThe other expression to test
Returns
true if the two expressions aliases, false otherwise

Return a GPU computed version of this expression

Returns
a GPU-computed ETL expression for this expression

Return a GPU computed version of this expression

Returns
a GPU-computed ETL expression for this expression

Returns a pointer to the first element in memory.

Returns
a pointer tot the first element in memory.

Returns a pointer to the first element in memory.

Returns
a pointer tot the first element in memory.

Returns a pointer to the past-the-end element in memory.

Returns
a pointer tot the past-the-end element in memory.

Returns a pointer to the past-the-end element in memory.

Returns
a pointer tot the past-the-end element in memory.

Assign to the given left-hand-side expression

Parameters
lhsThe expression to which assign

Add to the given left-hand-side expression

Parameters
lhsThe expression to which assign

Sub from the given left-hand-side expression

Parameters
lhsThe expression to which assign

Multiply the given left-hand-side expression

Parameters
lhsThe expression to which assign

Divide the given left-hand-side expression

Parameters
lhsThe expression to which assign

Modulo the given left-hand-side expression

Parameters
lhsThe expression to which assign

Apply the given visitor to this expression and its descendants.

Parameters
visitorThe visitor to apply

Return GPU memory of this expression, if any.

Returns
a pointer to the GPU memory or nullptr if not allocated in GPU.

Evict the expression from GPU.

Invalidates the CPU memory

Invalidates the GPU memory

Validates the CPU memory

Validates the GPU memory

Ensures that the GPU memory is allocated and that the GPU memory is up to date (to undefined value).

Allocate memory on the GPU for the expression and copy the values into the GPU.

Copy back from the GPU to the expression memory if necessary.

Copy from GPU to GPU

Parameters
new_gpu_memoryPointer to CPU memory from which to copy

Indicates if the CPU memory is up to date.

Returns
true if the CPU memory is up to date, false otherwise.

Indicates if the GPU memory is up to date.

Returns
true if the GPU memory is up to date, false otherwise.

◆ requires() [7/12]

template<etl_expr T, size_t D>
etl::requires ( is_dma< T >  )

View to represent a dyn matrix in top of an expression.

Template Parameters
TThe type of expression on which the view is made

◆ requires() [8/12]

template<matrix T, bool Aligned>
etl::requires ( fast_sub_view_able< T >  )

View that shows a sub matrix of an expression.

Template Parameters
TThe type of expression on which the view is made

◆ requires() [9/12]

template<typename T >
etl::requires ( cpp::specialization_of< etl::hflip_transformer, T >||cpp::specialization_of< etl::vflip_transformer, T >||cpp::specialization_of< etl::fflip_transformer, T >||cpp::specialization_of< etl::one_if_max_sub_transformer, T >  )

Specialization for forwarding everything to the sub expression.

< The expression type

< The sub expression type

< The value type

< Indicates if the type is an ETL expression

< Indicates if the type is a transformer

< Indicates if the type is a view

< Indicates if the type is a magic view

< Indicates if the expression is fast

< Indicates if the expression is linear

< Indicates if the expression is thread safe

< Indicates if the expression is of value type

< Indicates if the expression has direct memory access

< Indicates if the expression is a generated

< Indicates if the expression is padded

< Indicates if the expression is padded

< Indicates if the expression needs an evaluator visitor

< Indicates if the expression can be computed on GPU

< The expression storage order

Indicates if the expression is vectorizable using the given vector mode

Template Parameters
VThe vector mode

Returns the size of the given expression

Parameters
vThe expression to get the size for
Returns
the size of the given expression

Returns the dth dimension of the given expression

Parameters
vThe expression
dThe dimension to get
Returns
The dth dimension of the given expression

Returns the size of an expression of this fast type.

Returns
the size of an expression of this fast type.

Returns the Dth dimension of an expression of this type

Template Parameters
DThe dimension to get
Returns
the Dth dimension of an expression of this type

Returns the number of expressions for this type

Returns
the number of dimensions of this type

Estimate the complexity of computation

Returns
An estimation of the complexity of the expression

◆ requires() [10/12]

template<typename T >
etl::requires ( cpp::specialization_of< etl::argmax_transformer, T >||cpp::specialization_of< etl::argmin_transformer, T >||cpp::specialization_of< etl::sum_r_transformer, T >||cpp::specialization_of< etl::mean_r_transformer, T >  )

Specialization for (sum-mean)_r_transformer.

< The expression type

< The sub expression type

< The value type of the expression

< Indicates if the type is an ETL expression

< Indicates if the type is a transformer

< Indicates if the type is a view

< Indicates if the type is a magic view

< Indicates if the expression is fast

< Indicates if the expression is linear

< Indicates if the expression is thread safe

< Indicates if the expression is of value type

< Indicates if the expression has direct memory access

< Indicates if the expression is a generated

< Indicates if the expression is padded

< Indicates if the expression is padded

< Indicaes if the expression needs an evaluator visitor

< Indicates if the expression can be computed on GPU

< The expression storage order

Indicates if the expression is vectorizable using the given vector mode

Template Parameters
VThe vector mode

Returns the size of the given expression

Parameters
vThe expression to get the size for
Returns
the size of the given expression

Returns the dth dimension of the given expression

Parameters
vThe expression
dThe dimension to get
Returns
The dth dimension of the given expression

Returns the size of an expression of this fast type.

Returns
the size of an expression of this fast type.

Returns the Dth dimension of an expression of this type

Template Parameters
DThe dimension to get
Returns
the Dth dimension of an expression of this type

Returns the number of expressions for this type

Returns
the number of dimensions of this type

Estimate the complexity of computation

Returns
An estimation of the complexity of the expression

◆ requires() [11/12]

template<typename T >
etl::requires ( cpp::specialization_of< etl::sum_l_transformer, T >||cpp::specialization_of< etl::mean_l_transformer, T >  )

Specialization for (sum-mean)_r_transformer.

< The expression type

< The sub expression type

< The value type of the expression

< Indicates if the type is an ETL expression

< Indicates if the type is a transformer

< Indicates if the type is a view

< Indicates if the type is a magic view

< Indicates if the expression is fast

< Indicates if the expression is linear

< Indicates if the expression is thread safe

< Indicates if the expression is of value type

< Indicates if the expression has direct memory access

< Indicates if the expression is a generated

< Indicates if the expression is padded

< Indicates if the expression is padded

< Indicaes if the expression needs an evaluator visitor

< Indicates if the expression can be computed on GPU

< The expression storage order

Indicates if the expression is vectorizable using the given vector mode

Template Parameters
VThe vector mode

Returns the size of the given expression

Parameters
vThe expression to get the size for
Returns
the size of the given expression

Returns the dth dimension of the given expression

Parameters
vThe expression
dThe dimension to get
Returns
The dth dimension of the given expression

Returns the size of an expression of this fast type.

Returns
the size of an expression of this fast type.

Returns the Dth dimension of an expression of this type

Template Parameters
DThe dimension to get
Returns
the Dth dimension of an expression of this type

Returns the number of expressions for this type

Returns
the number of dimensions of this type

Estimate the complexity of computation

Returns
An estimation of the complexity of the expression

◆ requires() [12/12]

template<typename T >
etl::requires ( is_etl_value_class< T >  )

Specialization for value structures.

< The value type of the expression

< Indicates if the type is an ETL expression

< Indicates if the type is a transformer

< Indicates if the type is a view

< Indicates if the type is a magic view

< Indicates if the expression is fast

< Indicates if the expression is of value type

< Indicates if the expression has direct memory access

< Indicates if the expression is thread safe

< Indicates if the expression is linear

< Indicates if the expression is a generator expression

< Indicates if the expression needs an evaluator visitor

< Indicates if the expression is padded

< Indicates if the expression is aligned

< The expression storage order

< Indicates if the expression can be computed on GPU

Indicates if the expression is vectorizable using the given vector mode

Template Parameters
VThe vector mode

Return the size of the given epxression

Parameters
vThe expression to get the size from
Returns
the size of the given expressio

Return the dth dimension of the given epxression

Parameters
vThe expression to get the size from
dThe dimension to get
Returns
the dth dimension of the given expressio

Return the size of an expression of the given type

Returns
the size of an expression of the given type

Return the Dth dimension of the given epxression

Template Parameters
DThe dimension to get
Returns
the Dth dimension of the given expressio

Return the number of dimensions of an expression of the given type

Returns
the number of dimensions of an expression of the given type

Estimate the complexity of computation

Returns
An estimation of the complexity of the expression

◆ reshape() [1/2]

template<size_t... Dims, etl_expr E>
auto etl::reshape ( E &&  value) -> fast_matrix_view<detail::build_identity_type<E>, is_dma<E>, Dims...>

Returns view representing the reshape of another expression.

Parameters
valueThe ETL expression
Template Parameters
Dimsthe reshape dimensions
Returns
a view expression representing the same expression with a different shape

◆ reshape() [2/2]

template<etl_expr E, typename... S>
auto etl::reshape ( E &&  value,
S...  sizes 
) -> dyn_matrix_view<detail::build_identity_type<E>, sizeof...(sizes)>

Returns view representing the reshape of another expression.

Parameters
valueThe ETL expression
sizesThe dimensions of the reshaped expression
Returns
a view expression representing the same expression with a different shape

◆ resolution_to_string()

template<typename Resolution >
std::string etl::resolution_to_string ( )

return the string representation of the given resolution

Returns
the tring representation of the given resolution

◆ reverse()

constexpr order etl::reverse ( order  o)

Reverse the given storage order.

Parameters
oThe order to reverse
Returns
the reversed equivalent storage order

◆ row()

template<etl_expr E>
auto etl::row ( E &&  value,
size_t  i 
) -> detail::identity_helper<E, dim_view<detail::build_identity_type<E>, 1>>

Returns view representing the ith row of the given expression.

Parameters
valueThe ETL expression
iThe row index
Returns
a view expression representing the ith row of the given expression

◆ row_stride()

template<etl_2d E>
size_t etl::row_stride ( E &&  expr)

Returns the row stride of the given ETL matrix expression.

Parameters
exprThe ETL expression.
Returns
the row stride of the given ETL matrix expression

◆ rows() [1/2]

template<dyn_expr E>
size_t etl::rows ( const E &  expr)

Returns the number of rows of the given ETL expression.

Parameters
exprThe expression to get the number of rows from.
Returns
The number of rows of the given expression.

◆ rows() [2/2]

template<fast_expr E>
constexpr size_t etl::rows ( const E &  expr)
noexcept

Returns the number of rows of the given ETL expression.

Parameters
exprThe expression to get the number of rows from.
Returns
The number of rows of the given expression.

◆ s()

template<dyn_expr T>
auto etl::s ( T &&  value)

Force the evaluation of the given expression.

Parameters
valueThe ETL expression
Returns
A value class with the values of the given expression

◆ safe_ensure_cpu_up_to_date()

template<typename E >
void etl::safe_ensure_cpu_up_to_date ( E &&  expr)

Ensure that the CPU is up to date.

Parameters
exprThe expression

◆ safe_is_cpu_up_to_date()

template<typename E >
bool etl::safe_is_cpu_up_to_date ( E &&  expr)

Indicates if the CPU memory is up to date. If the expression does not have direct memory access, return true.

Parameters
exprThe expression

◆ safe_is_gpu_up_to_date()

template<typename E >
bool etl::safe_is_gpu_up_to_date ( E &&  expr)

Indicates if the GPU memory is up to date. If the expression does not have direct memory access, return false.

Parameters
exprThe expression

◆ scale()

template<typename LE , typename RE >
auto etl::scale ( LE &&  lhs,
RE &&  rhs 
)

Builds an expression representing the scalar multiplication of lhs and rhs.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression
Returns
An expression representing the scalar multiplication of lhs and rhs

◆ select_smart_gpu_compute()

template<typename X , typename Y >
decltype(auto) etl::select_smart_gpu_compute ( X &  x,
Y &  y 
)

Compute the expression into a representation that is GPU up to date and possibly store this representation in y.

This function tries to minimize the number of copies and evaluations that is performed. Ideally, the result will be directly computed inside y.

Parameters
xThe expression that must be evaluated
yThe expression into which store the GPU result of x
Returns
either a temporary of the result of x (possibly x) or y

◆ sequence_generator()

template<typename T = double>
auto etl::sequence_generator ( current = 0)

Create an expression generating numbers from a consecutive sequence.

Parameters
currentThe first number to generate
Returns
an expression generating numbers from a consecutive sequence

◆ serial()

template<typename Expr >
auto etl::serial ( Expr &&  expr) -> serial_expr<detail::build_type<Expr>>

Create a serial expression wrapping the given expression.

The evaluation (and assignment) of the expression is guaranteed to be evaluated serially.

Parameters
exprThe expression to be wrapped
Returns
a serial expression wrapping the given expression

◆ serialize() [1/2]

template<typename Stream , typename T , typename ST , order SO, size_t... Dims>
void etl::serialize ( serializer< Stream > &  os,
const fast_matrix_impl< T, ST, SO, Dims... > &  matrix 
)

Serialize the given matrix using the given serializer.

Parameters
osThe serializer
matrixThe matrix to serialize

◆ serialize() [2/2]

template<typename Stream , typename T , order SO, size_t D>
void etl::serialize ( serializer< Stream > &  os,
const dyn_matrix_impl< T, SO, D > &  matrix 
)

Serialize the given matrix using the given serializer.

Parameters
osThe serializer
matrixThe matrix to serialize

◆ shuffle() [1/2]

template<etl_expr T>
void etl::shuffle ( T &  vector)

Shuffle all the elements of an ETL vector.

Note: This function will be executed on GPU if EGBLAS is configured and the shuffle operation is available.

Parameters
vectorThe vector to shuffle

◆ shuffle() [2/2]

template<etl_expr T, typename G >
void etl::shuffle ( T &  vector,
G &&  g 
)

Shuffle all the elements of an ETL vector.

Note: This function will be executed on GPU if EGBLAS is configured and the shuffle operation is available.

Parameters
vectorThe vector to shuffle
gThe generator to use for random number generation

◆ shuffle_first() [1/2]

template<etl_expr T, typename G >
void etl::shuffle_first ( T &  matrix,
G &&  g 
)

Shuffle all the elements of a matrix.

The elements will be shuffled according to the first dimension of the matrix.

Note: This function will be executed on GPU if EGBLAS is configured and the shuffle operation is available.

Parameters
matrixThe matrix to shuffle
gThe generator to use for random number generation

◆ shuffle_first() [2/2]

template<etl_expr T>
void etl::shuffle_first ( T &  matrix)

Shuffle all the elements of a matrix.

The elements will be shuffled according to the first dimension of the matrix.

Note: This function will be executed on GPU if EGBLAS is configured and the shuffle operation is available.

Parameters
matrixThe matrix to shuffle

◆ shuffle_flat() [1/2]

template<etl_expr T, typename G >
void etl::shuffle_flat ( T &  vector,
G &&  g 
)

Shuffle all the elements of an ETL vector or matrix (considered as array).

Note: This function will be executed on GPU if EGBLAS is configured and the shuffle operation is available.

Parameters
vectorThe vector to shuffle
gThe generator to use for random number generation

◆ shuffle_flat() [2/2]

template<etl_expr T>
void etl::shuffle_flat ( T &  vector)

Shuffle all the elements of an ETL vector or matrix (considered as array)

Note: This function will be executed on GPU if EGBLAS is configured and the shuffle operation is available.

Parameters
vectorThe vector to shuffle

◆ sigmoid()

template<etl_expr E>
auto etl::sigmoid ( const E &  value) -> detail::unary_helper<E, sigmoid_unary_op>

Return the logistic sigmoid of the given ETL expression.

Parameters
valueThe ETL expression
Returns
An ETL expression representing the logistic sigmoid of the input.

◆ sigmoid_derivative()

template<etl_expr E>
auto etl::sigmoid_derivative ( E &&  value) -> decltype(sigmoid(value) >> (1.0 - sigmoid(value)))

Return the derivative of the logistic sigmoid of the given ETL expression.

Parameters
valueThe ETL expression
Returns
An ETL expression representing the derivative of the logistic sigmoid of the input.

◆ sign()

template<etl_expr E>
auto etl::sign ( E &&  value) -> detail::unary_helper<E, sign_unary_op>

Apply sign on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the sign of each value of the given expression

◆ sin() [1/2]

template<etl_expr E>
auto etl::sin ( E &&  value) -> detail::unary_helper<E, sin_unary_op>

Apply sinus on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the sinus of each value of the given expression

◆ sin() [2/2]

template<typename T >
complex<T> etl::sin ( complex< T >  z)

Computes the sinus of the complex input.

Parameters
zThe input complex number
Returns
The sinus of z

◆ sinh() [1/2]

template<etl_expr E>
auto etl::sinh ( E &&  value) -> detail::unary_helper<E, sinh_unary_op>

Apply hyperbolic sinus on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the hyperbolic sinus of each value of the given expression

◆ sinh() [2/2]

template<typename T >
complex<T> etl::sinh ( complex< T >  z)

Computes the hyperbolic sinus of the complex input.

Parameters
zThe input complex number
Returns
The hyperbolic sinus of z

◆ size() [1/2]

template<dyn_expr E>
size_t etl::size ( const E &  expr)

Returns the size of the given ETL expression.

Parameters
exprThe expression to get the size from.
Returns
The size of the given expression.

◆ size() [2/2]

template<fast_expr E>
constexpr size_t etl::size ( const E &  expr)
noexcept

Returns the size of the given ETL expression.

Parameters
exprThe expression to get the size from.
Returns
The size of the given expression.

◆ slice()

template<etl_expr E>
auto etl::slice ( E &&  value,
size_t  first,
size_t  last 
) -> slice_view<detail::build_identity_type<E>>

Returns view representing a slice view of the given expression.

Parameters
valueThe ETL expression
firstThe first index
lastThe last index
Returns
a view expression representing a sub dimensional view of the given expression

◆ smart_forward()

template<typename E >
decltype(auto) etl::smart_forward ( E &  expr)

Smart forwarding for a temporary expression.

This is guaranteed to produce a DMA expression in the most efficient way possible.

Parameters
exprthe Expresison from which to create a temporary.
Returns
a direct expression

◆ smart_forward_gpu()

template<typename E >
decltype(auto) etl::smart_forward_gpu ( E &  expr)

Smart forwarding for a temporary expression that will be computed in GPU.

This is guaranteed to produce a DMA expression in the most efficient way possible.

Parameters
exprthe Expresison from which to create a temporary.
Returns
a direct GPU-able expression

◆ smart_gpu_compute()

template<typename X , typename Y >
decltype(auto) etl::smart_gpu_compute ( X &  x,
Y &  y 
)

Compute the expression into a representation that is GPU up to date and store this representation in y.

This function tries to minimize the number of copies and evaluations that is performed. Ideally, the result will be directly computed inside y.

Parameters
xThe expression that must be evaluated
yThe expression into which store the GPU result of x
Returns
y

◆ smart_gpu_compute_hint()

template<typename E , typename Y >
decltype(auto) etl::smart_gpu_compute_hint ( E &  expr,
Y &  y 
)

Compute the expression into a representation that is GPU up to date.

This function tries to minimize the number of copies and evaluations that is performed.

Parameters
exprThe expression that must be evaluated
Returns
A gpu-computed expression reprensenting the results of the input expr

◆ softmax()

template<etl_expr E>
auto etl::softmax ( E &&  e)

Return the softmax function of the given ETL expression.

Parameters
eThe ETL expression
Returns
An ETL expression representing the softmax function of the input.

◆ softmax_derivative()

template<typename E >
auto etl::softmax_derivative ( [[maybe_unused] ] E &&  e)

Return the derivative of the softmax function of the given ETL expression.

Parameters
eThe ETL expression
Returns
An ETL expression representing the derivative of the softmax function of the input.

◆ softplus()

template<etl_expr E>
auto etl::softplus ( E &&  value) -> detail::unary_helper<E, softplus_unary_op>

Return the softplus of the given ETL expression.

Parameters
valueThe ETL expression
Returns
An ETL expression representing the softplus of the input.

◆ sqrt() [1/2]

template<etl_expr E>
auto etl::sqrt ( E &&  value) -> detail::unary_helper<E, sqrt_unary_op>

Apply square root on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the square root of each value of the given expression

◆ sqrt() [2/2]

template<typename T >
complex<T> etl::sqrt ( complex< T >  z)

Computes the complex square root of the input.

Parameters
zThe input complex number
Returns
The square root of z

◆ stable_softmax()

template<etl_expr E>
auto etl::stable_softmax ( E &&  e)

Returns the softmax function of the given ETL expression. This version is implemented so that numerical stability is preserved.

Parameters
eThe ETL expression
Returns
An ETL expression representing the softmax function of the input.

◆ state_bernoulli() [1/4]

template<etl_expr E>
auto etl::state_bernoulli ( const E &  value)

Apply Bernoulli sampling to the values of the expression.

Parameters
valuethe expression to sample
Returns
an expression representing the Bernoulli sampling of the given expression

◆ state_bernoulli() [2/4]

template<etl_expr E>
auto etl::state_bernoulli ( const E &  value,
const std::shared_ptr< void *> &  states 
)

Apply Bernoulli sampling to the values of the expression.

Parameters
valuethe expression to sample
Returns
an expression representing the Bernoulli sampling of the given expression

◆ state_bernoulli() [3/4]

template<etl_expr E, typename G >
auto etl::state_bernoulli ( G &  g,
E &&  value 
)

Apply Bernoulli sampling to the values of the expression.

Parameters
valuethe expression to sample
Returns
an expression representing the Bernoulli sampling of the given expression

◆ state_bernoulli() [4/4]

template<etl_expr E, typename G >
auto etl::state_bernoulli ( G &  g,
E &&  value,
const std::shared_ptr< void *> &  states 
)

Apply Bernoulli sampling to the values of the expression.

Parameters
valuethe expression to sample
Returns
an expression representing the Bernoulli sampling of the given expression

◆ state_dropout_mask() [1/2]

template<typename T = float>
auto etl::state_dropout_mask ( probability)

Create an expression generating numbers for a dropout mask.

Parameters
probabilityThe probability of dropout
Returns
An expression generating numbers for a dropout mask

◆ state_dropout_mask() [2/2]

template<typename T = float, typename G >
auto etl::state_dropout_mask ( G &  g,
probability 
)

Create an expression generating numbers for a dropout mask using the given custom random engine.

Parameters
gThe random engine
probabilityThe probability of dropout
Returns
An expression generating numbers for a dropout mask

◆ state_inverted_dropout_mask() [1/2]

template<typename T = float, typename G >
auto etl::state_inverted_dropout_mask ( G &  g,
probability 
)

Create an expression generating numbers for an inverted dropout mask using the given custom random engine.

Parameters
gThe random engine
probabilityThe probability of dropout
Returns
An expression generating numbers for an inverted dropout mask

◆ state_inverted_dropout_mask() [2/2]

template<typename T = float>
auto etl::state_inverted_dropout_mask ( probability)

Create an expression generating numbers for an inverted dropout mask.

Parameters
probabilityThe probability of dropout
Returns
An expression generating numbers for an inverted dropout mask

◆ state_logistic_noise() [1/4]

template<etl_expr E>
auto etl::state_logistic_noise ( E &&  value)

Add some normal noise (0, sigmoid(x)) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ state_logistic_noise() [2/4]

template<etl_expr E>
auto etl::state_logistic_noise ( E &&  value,
const std::shared_ptr< void *> &  states 
)

Add some normal noise (0, sigmoid(x)) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ state_logistic_noise() [3/4]

template<typename G , etl_expr E>
auto etl::state_logistic_noise ( G &  g,
E &&  value 
)

Add some normal noise (0, sigmoid(x)) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ state_logistic_noise() [4/4]

template<etl_expr E, typename G >
auto etl::state_logistic_noise ( G &  g,
E &&  value,
const std::shared_ptr< void *> &  states 
)

Add some normal noise (0, sigmoid(x)) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ std_add_evaluate()

template<typename Expr , typename Result >
void etl::std_add_evaluate ( Expr &&  expr,
Result &&  result 
)

Compound add evaluation of the expr into result.

Parameters
exprThe right hand side expression
resultThe left hand side

◆ std_assign_evaluate()

template<typename Expr , typename Result >
void etl::std_assign_evaluate ( Expr &&  expr,
Result &&  result 
)

Evaluation of the expr into result.

Parameters
exprThe right hand side expression
resultThe left hand side

◆ std_div_evaluate()

template<typename Expr , typename Result >
void etl::std_div_evaluate ( Expr &&  expr,
Result &&  result 
)

Compound divide evaluation of the expr into result.

Parameters
exprThe right hand side expression
resultThe left hand side

◆ std_mod_evaluate()

template<typename Expr , typename Result >
void etl::std_mod_evaluate ( Expr &&  expr,
Result &&  result 
)

Compound modulo evaluation of the expr into result.

Parameters
exprThe right hand side expression
resultThe left hand side

◆ std_mul_evaluate()

template<typename Expr , typename Result >
void etl::std_mul_evaluate ( Expr &&  expr,
Result &&  result 
)

Compound multiply evaluation of the expr into result.

Parameters
exprThe right hand side expression
resultThe left hand side

◆ std_sub_evaluate()

template<typename Expr , typename Result >
void etl::std_sub_evaluate ( Expr &&  expr,
Result &&  result 
)

Compound subtract evaluation of the expr into result.

Parameters
exprThe right hand side expression
resultThe left hand side

◆ stddev() [1/2]

template<etl_expr E>
value_t<E> etl::stddev ( E &&  values)

Returns the standard deviation of all the values contained in the given expression.

Parameters
valuesThe expression to reduce
Returns
The standard deviation of the values of the expression

◆ stddev() [2/2]

template<etl_expr E>
value_t<E> etl::stddev ( E &&  values,
value_t< E >  mean 
)

Returns the standard deviation of all the values contained in the given expression.

Parameters
valuesThe expression to reduce
meanThe mean of the exprssion
Returns
The standard deviation of the values of the expression

◆ store()

template<typename V = default_vec>
void etl::store ( vec_type< V >  in,
size_t  i 
)
noexcept

Store several elements in the matrix at once.

Parameters
inThe several elements to store
iThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use

◆ storeu()

template<typename V = default_vec>
void etl::storeu ( vec_type< V >  in,
size_t  i 
)
noexcept

Store several elements in the matrix at once.

Parameters
inThe several elements to store
iThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use

◆ strassen_mul() [1/2]

template<etl_2d A, etl_2d B>
auto etl::strassen_mul ( A &&  a,
B &&  b 
)

Multiply two matrices together using strassen.

Parameters
aThe left hand side matrix
bThe right hand side matrix
Returns
An expression representing the matrix-matrix multiplication of a and b

◆ strassen_mul() [2/2]

template<etl_2d A, etl_2d B, etl_2d C>
auto etl::strassen_mul ( A &&  a,
B &&  b,
C &&  c 
)

Multiply two matrices together using strassen and store the result in c.

Parameters
aThe left hand side matrix
bThe right hand side matrix
cThe expression used to store the result
Returns
An expression representing the matrix-matrix multiplication of a and b

◆ stream()

template<typename V = default_vec>
void etl::stream ( vec_type< V >  in,
size_t  i 
)
noexcept

Store several elements in the matrix at once, using non-temporal store.

Parameters
inThe several elements to store
iThe position at which to start. This will be aligned from the beginning (multiple of the vector size).
Template Parameters
VThe vectorization mode to use

◆ sub() [1/4]

template<matrix E>
auto etl::sub ( E &&  value,
size_t  i 
) -> sub_view<detail::build_identity_type<E>, false>

Returns view representing a sub dimensional view of the given expression.

Parameters
valueThe ETL expression
iThe first index
Returns
a view expression representing a sub dimensional view of the given expression

◆ sub() [2/4]

template<etl_2d E>
auto etl::sub ( E &&  value,
size_t  i,
size_t  j,
size_t  m,
size_t  n 
) -> sub_matrix_2d<detail::build_identity_type<E>, false>

Returns view representing a sub matrix view of the given expression.

Parameters
valueThe ETL expression
iThe first index
jThe second index
mThe first dimension
nThe second dimension
Returns
a view expression representing a sub matrix view of the given expression

◆ sub() [3/4]

template<etl_3d E>
auto etl::sub ( E &&  value,
size_t  i,
size_t  j,
size_t  k,
size_t  m,
size_t  n,
size_t  o 
) -> sub_matrix_3d<detail::build_identity_type<E>, false>

Returns view representing a sub matrix view of the given expression.

Parameters
valueThe ETL expression
iThe first index
jThe second index
mThe first dimension
nThe second dimension
Returns
a view expression representing a sub matrix view of the given expression

◆ sub() [4/4]

template<etl_4d E>
auto etl::sub ( E &&  value,
size_t  i,
size_t  j,
size_t  k,
size_t  l,
size_t  m,
size_t  n,
size_t  o,
size_t  p 
) -> sub_matrix_4d<detail::build_identity_type<E>, false>

Returns view representing a sub matrix view of the given expression.

Parameters
valueThe ETL expression
iThe first index
jThe second index
mThe first dimension
nThe second dimension
Returns
a view expression representing a sub matrix view of the given expression

◆ sub_view()

etl::sub_view ( sub_type  sub_expr,
size_t  i 
)

Construct a new sub_view over the given sub expression.

Parameters
sub_exprThe sub expression
iThe sub index

◆ subsize() [1/2]

template<dyn_matrix_c E>
size_t etl::subsize ( const E &  expr)

Returns the sub-size of the given ETL expression, i.e. the size not considering the first dimension.

Parameters
exprThe expression to get the sub-size from.
Returns
The sub-size of the given expression.

◆ subsize() [2/2]

template<fast_matrix_c E>
constexpr size_t etl::subsize ( const E &  expr)
noexcept

Returns the sub-size of the given ETL expression, i.e. the size not considering the first dimension.

Parameters
exprThe expression to get the sub-size from.
Returns
The sub-size of the given expression.

◆ sum()

template<etl_expr E>
value_t<E> etl::sum ( E &&  values)

Returns the sum of all the values contained in the given expression.

Parameters
valuesThe expression to reduce
Returns
The sum of the values of the expression

◆ sum_l()

template<matrix E>
auto etl::sum_l ( E &&  value)

Aggregate (sum) a dimension from the left. This effectively removes the first dimension from the expression and sums its values to the right.

Parameters
valueThe value to aggregate
Returns
an expression representing the aggregated expression

◆ sum_r()

template<matrix E>
auto etl::sum_r ( E &&  value)

Aggregate (sum) a dimension from the right. This effectively removes the last dimension from the expression and sums its values to the left. the last dimension from the expression and sums its values to the left.

Parameters
valueThe value to aggregate
Returns
an expression representing the aggregated expression

◆ swap() [1/4]

template<typename T , typename ST , order SO, size_t... Dims>
void etl::swap ( custom_fast_matrix_impl< T, ST, SO, Dims... > &  lhs,
custom_fast_matrix_impl< T, ST, SO, Dims... > &  rhs 
)

Swaps the given two matrices.

Parameters
lhsThe first matrix to swap
rhsThe second matrix to swap

◆ swap() [2/4]

template<typename T , order SO, size_t D>
void etl::swap ( custom_dyn_matrix_impl< T, SO, D > &  lhs,
custom_dyn_matrix_impl< T, SO, D > &  rhs 
)

Swap two dyn matrix.

Parameters
lhsThe first matrix
rhsThe second matrix

◆ swap() [3/4]

template<typename T , typename ST , order SO, size_t... Dims>
void etl::swap ( fast_matrix_impl< T, ST, SO, Dims... > &  lhs,
fast_matrix_impl< T, ST, SO, Dims... > &  rhs 
)

Swaps the given two matrices.

Parameters
lhsThe first matrix to swap
rhsThe second matrix to swap

◆ swap() [4/4]

template<typename T , order SO, size_t D>
void etl::swap ( dyn_matrix_impl< T, SO, D > &  lhs,
dyn_matrix_impl< T, SO, D > &  rhs 
)

Swap two dyn matrix.

Parameters
lhsThe first matrix
rhsThe second matrix

◆ tan() [1/2]

template<etl_expr E>
auto etl::tan ( E &&  value) -> detail::unary_helper<E, tan_unary_op>

Apply tangent on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the tangent of each value of the given expression

◆ tan() [2/2]

template<typename T >
complex<T> etl::tan ( complex< T >  z)

Computes the tangent of the complex input.

Parameters
zThe input complex number
Returns
The tangent of z

◆ tanh() [1/2]

template<etl_expr E>
auto etl::tanh ( E &&  value) -> detail::unary_helper<E, tanh_unary_op>

Apply hyperbolic tangent on each value of the given expression.

Parameters
valueThe ETL expression
Returns
an expression representing the hyperbolic tangent of each value of the given expression

◆ tanh() [2/2]

template<typename T >
complex<T> etl::tanh ( complex< T >  z)

Computes the hyperbolic tangent of the complex input.

Parameters
zThe input complex number
Returns
The hyperbolic tangent of z

◆ tanh_derivative()

template<etl_expr E>
auto etl::tanh_derivative ( E &&  value) -> decltype(1.0 - (tanh(value) >> tanh(value)))

Return the derivative of the tanh function of the given ETL expression.

Parameters
valueThe ETL expression
Returns
An ETL expression representing the derivative of the tanh function of the input.

◆ timed()

template<typename Expr >
auto etl::timed ( Expr &&  expr) -> timed_expr<detail::build_type<Expr>>

Create a timed expression wrapping the given expression.

The evaluation (and assignment) of the expression will be timed.

Parameters
exprThe expression to be wrapped
Returns
a timed expression wrapping the given expression

◆ timed_res()

template<typename R , typename Expr >
auto etl::timed_res ( Expr &&  expr) -> timed_expr<detail::build_type<Expr>, R>

Create a timed expression wrapping the given expression with the given resolution.

The evaluation (and assignment) of the expression will be timed.

Template Parameters
RThe clock resolution (std::chrono resolutions)
Parameters
exprThe expression to be wrapped
Returns
a timed expression wrapping the given expression

◆ to_octave()

template<bool Sub = false, typename T >
std::string etl::to_octave ( T &&  m)

Construct a textual representation of the matrix contents, following the octave format.

Parameters
mThe expression to transform
Returns
a string representing the contents of the expression

◆ to_string()

template<typename T >
std::string etl::to_string ( T &&  m)

Construct a textual representation of the matrix contents.

Parameters
mThe expression to transform
Returns
a string representing the contents of the expression

◆ trace()

template<etl_expr E>
value_t<E> etl::trace ( E &&  expr)

Returns the trace of the given square matrix.

If the given expression does not represent a square matrix, this function will fail

Parameters
exprThe expression to get the trace from.
Returns
The trace of the given expression

◆ trans()

template<etl_expr E>
auto etl::trans ( const E &  value)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ transform()

template<typename Builder , typename Expr >
void etl::transform ( Builder  parent_builder,
const Expr &  expr 
)

Function to transform the expression into its optimized form.

Parameters
parent_builderThe builder of its parent node
exprThe expression to optimize

◆ transpose()

template<mat_or_vec E>
auto etl::transpose ( const E &  value)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ transpose_front()

template<deep_mat E>
auto etl::transpose_front ( const E &  value)

Returns the transpose of the given expression.

Parameters
valueThe expression
Returns
The transpose of the given expression.

◆ truncated_normal_generator() [1/2]

template<typename T = double>
auto etl::truncated_normal_generator ( mean = 0.0,
stddev = 1.0 
)

Create an expression generating numbers from a truncated normal distribution.

Parameters
meanThe mean of the distribution
stddevThe standard deviation of the distribution
Returns
An expression generating numbers from the normal distribution

◆ truncated_normal_generator() [2/2]

template<typename T = double, typename G >
auto etl::truncated_normal_generator ( G &  g,
mean = 0.0,
stddev = 1.0 
)

Create an expression generating numbers from a truncated normal distribution using the given custom random engine.

Parameters
gThe random engine
meanThe mean of the distribution
stddevThe standard deviation of the distribution
Returns
An expression generating numbers from the normal distribution

◆ uniform_generator() [1/2]

template<typename T = double>
auto etl::uniform_generator ( start,
end 
)

Create an expression generating numbers from an uniform distribution.

Parameters
startThe beginning of the range
endThe end of the range
Returns
An expression generating numbers from the uniform distribution

◆ uniform_generator() [2/2]

template<typename T = double, typename G >
auto etl::uniform_generator ( G &  g,
start,
end 
)

Create an expression generating numbers from an uniform distribution using the given custom random engine.

Parameters
gThe random engine
startThe beginning of the range
endThe end of the range
Returns
An expression generating numbers from the uniform distribution

◆ uniform_noise() [1/2]

template<etl_expr E>
auto etl::uniform_noise ( E &&  value)

Add some uniform noise (0, 1.0) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ uniform_noise() [2/2]

template<etl_expr E, typename G >
auto etl::uniform_noise ( G &  g,
E &&  value 
)

Add some uniform noise (0, 1.0) to the given expression.

Parameters
valueThe input ETL expression
Returns
an expression representing the input expression plus noise

◆ upsample_2d() [1/3]

template<etl_expr E>
dyn_upsample_2d_expr<detail::build_type<E> > etl::upsample_2d ( E &&  value,
size_t  c1,
size_t  c2 
)

Upsample the given 2D matrix expression.

Parameters
valueThe input expression
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Upsampling of the given expression

◆ upsample_2d() [2/3]

template<etl_expr E>
dyn_upsample_2d_expr<detail::build_type<E> > etl::upsample_2d ( E &&  value,
size_t  c1,
size_t  c2,
size_t  s1,
size_t  s2,
size_t  p1 = 0,
size_t  p2 = 0 
)

Upsample the given 2D matrix expression.

Parameters
valueThe input expression
c1The first pooling ratio
c2The second pooling ratio
Returns
A expression representing the Upsampling of the given expression

◆ upsample_2d() [3/3]

template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, typename E >
upsample_2d_expr<detail::build_type<E>, C1, C2, S1, S2, P1, P2> etl::upsample_2d ( E &&  value)

Upsample the given 2D matrix expression.

Parameters
valueThe input expression
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
Returns
A expression representing the Upsampling of the given expression

◆ upsample_3d() [1/2]

template<etl_expr E>
dyn_upsample_3d_expr<detail::build_type<E> > etl::upsample_3d ( E &&  value,
size_t  c1,
size_t  c2,
size_t  c3 
)

Upsample the given 3D matrix expression.

Parameters
valueThe input expression
c1The first pooling ratio
c2The second pooling ratio
c3The third pooling ratio
Returns
A expression representing the Upsampling of the given expression

◆ upsample_3d() [2/2]

template<size_t C1, size_t C2, size_t C3, etl_expr E>
upsample_3d_expr<detail::build_type<E>, C1, C2, C3> etl::upsample_3d ( E &&  value)

Upsample the given 3D matrix expression.

Parameters
valueThe input expression
Template Parameters
C1The first pooling ratio
C2The second pooling ratio
C3The third pooling ratio
Returns
A expression representing the Upsampling of the given expression

◆ validate_expression_impl()

template<typename LE , typename RE >
void etl::validate_expression_impl ( [[maybe_unused] ] const LE &  lhs,
[[maybe_unused] ] const RE &  rhs 
)
noexcept

Make sure the two expressions have the same size.

This function uses assertion to validate the condition. If possible, the assertion is done at compile time.

Parameters
lhsThe left hand side expression
rhsThe right hand side expression

◆ validate_pmax_pooling() [1/2]

template<size_t C1, size_t C2, dimensions_between< 2, 4 > E>
void etl::validate_pmax_pooling ( const E &  expr)

Make sure that the pooling ratios are correct and that the expression can be pooled from.

This function uses assertion to validate the condition. If possible, the assertion is done at compile time.

Template Parameters
C1The pooling ratio of the first dimension
C2The pooling ratio of the second dimension
Parameters
exprThe expression to assert

◆ validate_pmax_pooling() [2/2]

template<dimensions_between< 2, 4 > E>
void etl::validate_pmax_pooling ( const E &  expr,
size_t  c1,
size_t  c2 
)

Make sure that the pooling ratios are correct and that the expression can be pooled from.

This function uses assertion to validate the condition. If possible, the assertion is done at compile time.

Parameters
c1The pooling ratio of the first dimension
c2The pooling ratio of the second dimension
exprThe expression to assert

◆ vflip()

template<mat_or_vec E>
auto etl::vflip ( const E &  value)

Returns the vertical flipping of the given expression.

Parameters
valueThe expression
Returns
The vertical flipping of the given expression.

◆ visit()

void etl::visit ( detail::evaluator_visitor visitor) const

Apply the given visitor to this expression and its descendants.

Parameters
visitorThe visitor to apply

Variable Documentation

◆ advanced_padding

constexpr bool etl::advanced_padding = ETL_ADVANCED_PADDING_BOOL

Indicates if ETL is allowed to pad matrices and vectors.

Warning: this flag is still highly experimental

◆ aligned

constexpr bool etl::aligned = false

Alignment flag to aligned expressions.

This can be used to make expressions more clear.

◆ all_1d

template<typename... T>
constexpr bool etl::all_1d = (is_1d<T> && ...)

Traits to test if all the given expression types are 1D.

Template Parameters
TThe ETL expression type

◆ all_2d

template<typename... T>
constexpr bool etl::all_2d = (is_2d<T> && ...)

Traits to test if all the given expression types are 2D.

Template Parameters
TThe ETL expression type

◆ all_3d

template<typename... T>
constexpr bool etl::all_3d = (is_3d<T> && ...)

Traits to test if all the given expression types are 3D.

Template Parameters
TThe ETL expression type

◆ all_4d

template<typename... T>
constexpr bool etl::all_4d = (is_4d<T> && ...)

Traits to test if all the given expression types are 4D.

Template Parameters
TThe ETL expression type

◆ all_column_major

template<typename... E>
constexpr bool etl::all_column_major = (is_column_major<E> && ...)

Traits to test if all the given ETL expresion types are column-major.

Template Parameters
EThe ETL expression types.

◆ all_complex

template<typename... E>
constexpr bool etl::all_complex = (is_complex<E> && ...)

Traits to test if all the given ETL expresion types contains complex numbers.

Template Parameters
EThe ETL expression types.

◆ all_complex_double_precision

template<typename... E>
constexpr bool etl::all_complex_double_precision = (is_complex_double_precision<E> && ...)

Traits to test if all the given ETL expresion types contains double precision complex numbers.

Template Parameters
EThe ETL expression types.

◆ all_complex_single_precision

template<typename... E>
constexpr bool etl::all_complex_single_precision = (is_complex_single_precision<E> && ...)

Traits to test if all the given ETL expresion types contains single precision complex numbers.

Template Parameters
EThe ETL expression types.

◆ all_dma

template<typename... E>
constexpr bool etl::all_dma = (is_dma<E> && ...)

Traits to test if all the given ETL expresion types have direct memory access (DMA).

Template Parameters
EThe ETL expression types.

◆ all_double_precision

template<typename... E>
constexpr bool etl::all_double_precision = (is_double_precision<E> && ...)

Traits to test if all the given ETL expresion types contains double precision numbers.

Template Parameters
EThe ETL expression types.

◆ all_etl_expr

template<typename... E>
constexpr bool etl::all_etl_expr = (is_etl_expr<E> && ...)

Traits to test if all the given types are ETL types.

Template Parameters
EThe ETL expression types.

◆ all_fast

template<typename... E>
constexpr bool etl::all_fast = (decay_traits<E>::is_fast && ...)

Traits to test if all the given ETL expresion types are fast (sizes known at compile-time)

Template Parameters
EThe ETL expression types.

◆ all_floating

template<typename... E>
constexpr bool etl::all_floating = (is_floating<E> && ...)

Traits to test if all the given ETL expresion types contains floating point numbers.

Template Parameters
EThe ETL expression types.

◆ all_floating_t

template<typename... E>
constexpr bool etl::all_floating_t = (is_floating_t<E> && ...)

Traits to test if all the given types are floating point numbers.

Template Parameters
EThe types.

◆ all_gpu_computable

template<typename... E>
constexpr bool etl::all_gpu_computable = (decay_traits<E>::gpu_computable && ...)

Traits indicating if all the given ETL expresion types are computable on GPU.

Template Parameters
EThe ETL expression types.

◆ all_homogeneous

template<typename... E>
constexpr bool etl::all_homogeneous = cpp::is_homogeneous_v<value_t<E>...>

Traits to test if all the given ETL expresion types are padded.

Template Parameters
EThe ETL expression types.

◆ all_padded

template<typename... E>
constexpr bool etl::all_padded = (decay_traits<E>::is_padded && ...)

Traits to test if all the given ETL expresion types are padded.

Template Parameters
EThe ETL expression types.

◆ all_row_major

template<typename... E>
constexpr bool etl::all_row_major = (is_row_major<E> & ...)

Traits to test if all the given ETL expresion types are row-major.

Template Parameters
EThe ETL expression types.

◆ all_single_precision

template<typename... E>
constexpr bool etl::all_single_precision = (is_single_precision<E> && ...)

Traits to test if all the given ETL expresion types contains single precision numbers.

Template Parameters
EThe ETL expression types.

◆ all_thread_safe

template<typename... E>
constexpr bool etl::all_thread_safe = (decay_traits<E>::is_thread_safe && ...)

Traits to test if all the given ETL expresion types are thread safe.

Template Parameters
EThe ETL expression types.

◆ all_vectorizable

template<vector_mode_t V, typename... E>
constexpr bool etl::all_vectorizable = (decay_traits<E>::template vectorizable<V> && ...)

Traits to test if all the given ETL expresion types are vectorizable.

Template Parameters
EThe ETL expression types.

◆ all_vectorizable_t

template<vector_mode_t V, typename... E>
constexpr bool etl::all_vectorizable_t = (vectorizable_t<V, E> & ...)

Traits to test if all the given types are vectorizable types.

Template Parameters
EThe types.

◆ assignable< dyn_matrix_view< T, D >, value_t< T > >

Initial value:
{
using this_type = dyn_matrix_view<T, D>
sub_view< T, Aligned > this_type
The type of this expression.
Definition: sub_view.hpp:314

The type of this expression.

◆ D

D etl::D
Initial value:
{
static constexpr size_t n_dimensions = D
D D
The number of dimensions.
Definition: dyn_matrix_view.hpp:24

The number of dimensions.

◆ direct_assign_compatible

template<typename Expr , typename Result >
constexpr bool etl::direct_assign_compatible
Initial value:
= decay_traits<Expr>::is_generator
|| decay_traits<Expr>::storage_order == decay_traits<Result>::storage_order
|| all_1d<Expr, Result>

Traits indicating if a direct assign is possible.

A direct assign is a standard assign without any transposition

Template Parameters
ExprThe type of expression (RHS)
ResultThe type of result (LHS)

◆ etl_value_class

template<typename T >
concept etl::etl_value_class
Initial value:
=
detail::fast_matrix_impl<T> || detail::custom_fast_matrix_impl<T> || detail::dyn_matrix_impl<T> || detail::custom_dyn_matrix_impl<T> || detail::sparse_matrix_impl<T> || detail::gpu_dyn_matrix_impl<T>

◆ gpu_inc

template<typename T >
constexpr size_t etl::gpu_inc = is_scalar<T> ? 0 : 1

The space between two elements in GPU for the given type.

This is 1 for every type but for scalar which are 0.

◆ has_fast_fft

constexpr bool etl::has_fast_fft = ETL_MKL_MODE_BOOL || ETL_CUFFT_MODE_BOOL

Indicates if there is a fast FFT routine available.

This flag is currently only set to true if MKL or CUFFT is available

◆ inplace_assignable< sub_view< T, Aligned > >

Aligned etl::inplace_assignable< sub_view< T, Aligned > >
Initial value:
{
using this_type = sub_view<T, Aligned>
sub_view< T, Aligned > this_type
The type of this expression.
Definition: sub_view.hpp:314

The type of this expression.

◆ inplace_sub_transpose_able

template<typename T >
constexpr bool etl::inplace_sub_transpose_able = traits_detail::inplace_sub_transpose_able_impl<T>()

Traits to test if an expression is inplace sub transpose-able.

Sub-transpose able means that the last two dimensions can be transposed in place.

Template Parameters
TThe type to test

◆ inplace_transpose_able

template<typename T >
constexpr bool etl::inplace_transpose_able = traits_detail::inplace_transpose_able_impl<T>()

Traits to test if an expression is inplace transpose-able.

Template Parameters
TThe type to test

◆ is_1d

template<typename T >
constexpr bool etl::is_1d = decay_traits<T>::dimensions() == 1

Traits to test if the given expression type is 1D.

Template Parameters
TThe ETL expression type

◆ is_2d

template<typename T >
constexpr bool etl::is_2d = decay_traits<T>::dimensions() == 2

Traits to test if the given expression type is 2D.

Template Parameters
TThe ETL expression type

◆ is_3d

template<typename T >
constexpr bool etl::is_3d = decay_traits<T>::dimensions() == 3

Traits to test if the given expression type is 3D.

Template Parameters
TThe ETL expression type

◆ is_4d

template<typename T >
constexpr bool etl::is_4d = decay_traits<T>::dimensions() == 4

Traits to test if the given expression type is 4D.

Template Parameters
TThe ETL expression type

◆ is_aligned_value

template<typename T >
constexpr bool etl::is_aligned_value = is_dyn_matrix<T> || is_fast_matrix<T>

Traits to test if the givn ETL expression is an aligned value class.

Template Parameters
TThe ETL expression type.

◆ is_binary_expr

template<typename T >
constexpr bool etl::is_binary_expr = cpp::specialization_of<etl::binary_expr, T>

Traits indicating if the given ETL type is a binary expression.

Template Parameters
TThe type to test

◆ is_blas_parallel_config

constexpr bool etl::is_blas_parallel_config = is_blas_parallel && mkl_enabled

Indicates if the BLAS library is parallel and we are able to disable the parallel.

Currently, this only works for MKL

◆ is_bool_t

template<typename T >
constexpr bool etl::is_bool_t = std::is_same_v<T, bool>

Traits to test if the type is boolean.

Template Parameters
TThe type.

◆ is_column_major

template<typename E >
constexpr bool etl::is_column_major = decay_traits<E>::storage_order == order::ColumnMajor

Traits to test if all the given ETL expresion types are column-major.

Template Parameters
EThe ETL expression types.

◆ is_complex

template<typename T >
constexpr bool etl::is_complex = is_complex_single_precision<T> || is_complex_double_precision<T>

Traits to test if the given ETL expresion type contains complex numbers.

Template Parameters
TThe ETL expression type.

◆ is_complex_double_precision

template<typename T >
constexpr bool etl::is_complex_double_precision = is_complex_double_t<value_t<T>>

Traits to test if the given ETL expresion type contains double precision complex numbers.

Template Parameters
TThe ETL expression type.

◆ is_complex_double_t

template<typename T >
constexpr bool etl::is_complex_double_t = std::is_same_v<T, std::complex<double>> || std::is_same_v<T, etl::complex<double>>

Traits to test if a type is a double precision complex number type.

Template Parameters
TThe type to test.

◆ is_complex_single_precision

template<typename T >
constexpr bool etl::is_complex_single_precision = is_complex_single_t<value_t<T>>

Traits to test if the given ETL expresion type contains single precision complex numbers.

Template Parameters
TThe ETL expression type.

◆ is_complex_single_t

template<typename T >
constexpr bool etl::is_complex_single_t = std::is_same_v<T, std::complex<float>> || std::is_same_v<T, etl::complex<float>>

Traits to test if a type is a single precision complex number type.

Template Parameters
TThe type to test.

◆ is_complex_t

template<typename T >
constexpr bool etl::is_complex_t = cpp::specialization_of<std::complex, T> || cpp::specialization_of<etl::complex, T>

Traits to test if a type is a complex number type.

Template Parameters
TThe type to test.

◆ is_custom_dyn_matrix

template<typename T >
constexpr bool etl::is_custom_dyn_matrix = traits_detail::is_custom_dyn_matrix_impl<std::decay_t<T>>::value

Traits indicating if the given ETL type is a custom dyn matrix.

Template Parameters
TThe type to test

◆ is_custom_fast_matrix

template<typename T >
constexpr bool etl::is_custom_fast_matrix = traits_detail::is_custom_fast_matrix_impl<std::decay_t<T>>::value

Traits indicating if the given ETL type is a fast matrix.

Template Parameters
TThe type to test

◆ is_deep_double_precision

template<typename T >
constexpr bool etl::is_deep_double_precision = is_complex_double_precision<T> || is_double_precision<T>

Traits to test if the given ETL expresion type contains double precision floating point or double precision complex numbers.

Template Parameters
TThe ETL expression type.

◆ is_deep_single_precision

template<typename T >
constexpr bool etl::is_deep_single_precision = is_complex_single_precision<T> || is_single_precision<T>

Traits to test if the given ETL expresion type contains single precision floating point or single precision complex numbers.

Template Parameters
TThe ETL expression type.

◆ is_diagonal_matrix

template<typename T >
constexpr bool etl::is_diagonal_matrix = cpp::specialization_of<etl::diagonal_matrix, T>

Traits indicating if the given ETL type is a diagonal matrix.

Template Parameters
TThe type to test

◆ is_dma

template<typename T >
constexpr bool etl::is_dma = decay_traits<T>::is_direct

Traits indicating if the given ETL type has direct memory access.

Template Parameters
TThe type to test

◆ is_double_precision

template<typename T >
constexpr bool etl::is_double_precision = is_double_precision_t<value_t<T>>

Traits to test if the given ETL expresion contains double precision numbers.

Template Parameters
TThe ETL expression type.

◆ is_double_precision_t

template<typename T >
constexpr bool etl::is_double_precision_t = std::is_same_v<T, double>

Traits to test if the given type is double precision type.

Template Parameters
TThe type

◆ is_dyn_matrix

template<typename T >
constexpr bool etl::is_dyn_matrix = traits_detail::is_dyn_matrix_impl<std::decay_t<T>>::value

Traits indicating if the given ETL type is a dyn matrix.

Template Parameters
TThe type to test

◆ is_etl_expr

template<typename T >
constexpr bool etl::is_etl_expr = decay_traits<T>::is_etl

Traits indicating if the given type is an ETL type.

Template Parameters
TThe type to test

◆ is_etl_value

template<typename T >
constexpr bool etl::is_etl_value = decay_traits<T>::is_value

Traits indicating if the given ETL type is a value type.

Template Parameters
TThe type to test

◆ is_etl_value_class

template<typename T >
constexpr bool etl::is_etl_value_class
Initial value:
=
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>

Traits indicating if the given ETL type is from a value class.

Template Parameters
TThe type to test

◆ is_fast

template<typename E >
constexpr bool etl::is_fast = decay_traits<E>::is_fast

Traits to test if the given ETL expresion type is fast (sizes known at compile-time)

Template Parameters
EThe ETL expression type.

◆ is_fast_matrix

template<typename T >
constexpr bool etl::is_fast_matrix = traits_detail::is_fast_matrix_impl<std::decay_t<T>>::value

Traits indicating if the given ETL type is a fast matrix.

Template Parameters
TThe type to test

◆ is_floating

template<typename T >
constexpr bool etl::is_floating = is_single_precision<T> || is_double_precision<T>

Traits to test if the given ETL expresion contains floating point numbers.

Template Parameters
TThe ETL expression type.

◆ is_floating_t

template<typename T >
constexpr bool etl::is_floating_t = is_single_precision_t<T> || is_double_precision_t<T>

Traits to test if the type is floating point numbers.

Template Parameters
TThe type.

◆ is_generator_expr

template<typename T >
constexpr bool etl::is_generator_expr = cpp::specialization_of<etl::generator_expr, T>

Traits indicating if the given ETL type is a generator expression.

Template Parameters
TThe type to test

◆ is_gpu_computable

template<typename T >
constexpr bool etl::is_gpu_computable = decay_traits<T>::gpu_computable

Traits indicating if the given ETL expression's type is computable on GPU.

Template Parameters
TThe type to test

◆ is_gpu_dyn_matrix

template<typename T >
constexpr bool etl::is_gpu_dyn_matrix = traits_detail::is_gpu_dyn_matrix_impl<std::decay_t<T>>::value

Traits indicating if the given ETL type is a GPU dyn matrix.

Template Parameters
TThe type to test

◆ is_gpu_t

template<typename T >
constexpr bool etl::is_gpu_t = is_floating_t<T> || is_complex_t<T> || is_bool_t<T>

Traits to test if the given type contains a type that can be computed on a GPU.

Currently, GPU on ETL only supports floating points and complex numbers.

Template Parameters
TThe type.

◆ is_hermitian_matrix

template<typename T >
constexpr bool etl::is_hermitian_matrix = cpp::specialization_of<etl::hermitian_matrix, T>

Traits indicating if the given ETL type is a hermitian matrix.

Template Parameters
TThe type to test

◆ is_lhs

template<typename T >
constexpr bool etl::is_lhs = is_etl_value<T> || is_unary_expr<T>

Traits indicating if the given ETL type can be left hand side type.

Template Parameters
TThe type to test

◆ is_lower_matrix

template<typename T >
constexpr bool etl::is_lower_matrix = cpp::specialization_of<etl::lower_matrix, T>

Traits indicating if the given ETL type is a lower triangular matrix.

Template Parameters
TThe type to test

◆ is_magic_view

template<typename T >
constexpr bool etl::is_magic_view = decay_traits<T>::is_magic_view

Traits indicating if the given ETL type is a magic view expression.

Template Parameters
TThe type to test

◆ is_mangle_able

template<typename T >
concept etl::is_mangle_able
Initial value:
= std::same_as<std::decay_t<T>, float> || std::same_as<std::decay_t<T>, double>
|| cpp::specialization_of<std::complex, T> || cpp::specialization_of<etl::complex, T>

Test if the given type can be mangled correctly.

◆ is_optimized_expr

template<typename T >
constexpr bool etl::is_optimized_expr = cpp::specialization_of<etl::optimized_expr, T>

Traits indicating if the given ETL type is an optimized expression.

Template Parameters
TThe type to test

◆ is_padded_value

template<typename T >
constexpr bool etl::is_padded_value = is_dyn_matrix<T> || is_fast_matrix<T>

Traits to test if the givn ETL expression is a padded value class.

Template Parameters
TThe ETL expression type.

◆ is_parallel

constexpr bool etl::is_parallel = ETL_PARALLEL_BOOL

Indicates if the expressions and implementations can be automaticallly parallelized.

Note: It is generally a good idea to enable this flag.

◆ is_parallel_expr

template<typename T >
constexpr bool etl::is_parallel_expr = cpp::specialization_of<etl::parallel_expr, T>

Traits indicating if the given ETL type is a parallel expression.

Template Parameters
TThe type to test

◆ is_row_major

template<typename E >
constexpr bool etl::is_row_major = decay_traits<E>::storage_order == order::RowMajor

Traits to test if all the given ETL expresion types are row-major.

Template Parameters
EThe ETL expression types.

◆ is_scalar

template<typename T >
constexpr bool etl::is_scalar = cpp::specialization_of<etl::scalar, T>

Traits to test if a type is a scalar type.

Template Parameters
TThe type to test.

◆ is_selected_expr

template<typename T >
constexpr bool etl::is_selected_expr = traits_detail::is_selected_expr_impl<std::decay_t<T>>::value

Traits indicating if the given ETL type is a selector expression.

Template Parameters
TThe type to test

◆ is_serial_expr

template<typename T >
constexpr bool etl::is_serial_expr = cpp::specialization_of<etl::serial_expr, T>

Traits indicating if the given ETL type is a serial expression.

Template Parameters
TThe type to test

◆ is_simple_lhs

template<typename T >
constexpr bool etl::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>

Traits indicating if the given ETL type is a simple left hand side type. Adapter types are not taken from this because they do more operations.

Template Parameters
TThe type to test

◆ is_single_precision

template<typename T >
constexpr bool etl::is_single_precision = is_single_precision_t<value_t<T>>

Traits to test if the given ETL expresion contains single precision numbers.

Template Parameters
TThe ETL expression type.

◆ is_single_precision_t

template<typename T >
constexpr bool etl::is_single_precision_t = std::is_same_v<T, float>

Traits to test if the given type is single precision type.

Template Parameters
TThe type

◆ is_sparse_matrix

template<typename T >
constexpr bool etl::is_sparse_matrix = traits_detail::is_sparse_matrix_impl<std::decay_t<T>>::value

Traits indicating if the given ETL type is a sparse matrix.

Template Parameters
TThe type to test

◆ is_strictly_lower_matrix

template<typename T >
constexpr bool etl::is_strictly_lower_matrix = cpp::specialization_of<etl::strictly_lower_matrix, T>

Traits indicating if the given ETL type is a strictly lower triangular matrix.

Template Parameters
TThe type to test

◆ is_strictly_upper_matrix

template<typename T >
constexpr bool etl::is_strictly_upper_matrix = cpp::specialization_of<etl::strictly_upper_matrix, T>

Traits indicating if the given ETL type is a strictly upper triangular matrix.

Template Parameters
TThe type to test

◆ is_symmetric_matrix

template<typename T >
constexpr bool etl::is_symmetric_matrix = cpp::specialization_of<etl::symmetric_matrix, T>

Traits indicating if the given ETL type is a symmetric matrix.

Template Parameters
TThe type to test

◆ is_temporary_expr

template<typename T >
constexpr bool etl::is_temporary_expr = traits_detail::is_base_of_template_tb<std::decay_t<T>, etl::base_temporary_expr>

Traits indicating if the given type is a temporary expression.

Template Parameters
TThe type to test

◆ is_thread_safe

template<typename E >
constexpr bool etl::is_thread_safe = decay_traits<E>::is_thread_safe

Traits to test if the given ETL expresion type is thread safe.

Template Parameters
EThe ETL expression type

◆ is_timed_expr

template<typename T >
constexpr bool etl::is_timed_expr = cpp::specialization_of<etl::timed_expr, T>

Traits indicating if the given ETL type is a timed expression.

Template Parameters
TThe type to test

◆ is_transformer

template<typename T >
constexpr bool etl::is_transformer = decay_traits<T>::is_transformer

Traits indicating if the given ETL type is a transformer expression.

Template Parameters
TThe type to test

◆ is_transpose_expr

template<typename T >
constexpr bool etl::is_transpose_expr = cpp::specialization_of<etl::transpose_expr, T>

Traits indicating if the given type is a transpose expr.

Template Parameters
TThe type to test

◆ is_unary_expr

template<typename T >
constexpr bool etl::is_unary_expr = cpp::specialization_of<etl::unary_expr, T>

Traits indicating if the given ETL type is a unary expression.

Template Parameters
TThe type to test

◆ is_uni_lower_matrix

template<typename T >
constexpr bool etl::is_uni_lower_matrix = cpp::specialization_of<etl::uni_lower_matrix, T>

Traits indicating if the given ETL type is a uni lower triangular matrix.

Template Parameters
TThe type to test

◆ is_uni_upper_matrix

template<typename T >
constexpr bool etl::is_uni_upper_matrix = cpp::specialization_of<etl::uni_upper_matrix, T>

Traits indicating if the given ETL type is a uni upper triangular matrix.

Template Parameters
TThe type to test

◆ is_upper_matrix

template<typename T >
constexpr bool etl::is_upper_matrix = cpp::specialization_of<etl::upper_matrix, T>

Traits indicating if the given ETL type is an upper triangular matrix.

Template Parameters
TThe type to test

◆ is_view

template<typename T >
constexpr bool etl::is_view = decay_traits<T>::is_view

Traits indicating if the given ETL type is a view expression.

Template Parameters
TThe type to test

◆ is_wrapper_expr

template<typename T >
constexpr bool etl::is_wrapper_expr = is_optimized_expr<T> || is_selected_expr<T> || is_serial_expr<T> || is_parallel_expr<T> || is_timed_expr<T>

Traits indicating if the given ETL type is a wrapper expression (optimized, serial, ...).

Template Parameters
TThe type to test

◆ size

constexpr size_t etl::size
Initial value:
{
return N & (size_t(-size))

◆ std_container

template<typename T >
concept etl::std_container
Initial value:
= requires(T a) {
requires !etl_expr<T>;
typename T::value_type;
{ a.begin() };
{ a.end() };
}
value_t< sub_type > value_type
The value contained in the expression.
Definition: dyn_matrix_view.hpp:31
requires(D > 0) struct dyn_base
Matrix with run-time fixed dimensions.
Definition: dyn_base.hpp:113

◆ unaligned

constexpr bool etl::unaligned = false

Alignment flag to unaligned expressions.

This can be used to make expressions more clear.

◆ vectorize_expr

constexpr bool etl::vectorize_expr = ETL_VECTORIZE_EXPR_BOOL

Indicates if the expressions can be automatically vectorized by ETL.

Warning: Disabling this flag can incur a very significant slowdown.

◆ vectorize_impl

constexpr bool etl::vectorize_impl = ETL_VECTORIZE_IMPL_BOOL

Indicates if the implementations can be automatically vectorized by ETL.

Warning: Disabling this flag can incur a very significant slowdown.