Expression Templates Library (ETL)
conv_select.hpp
Go to the documentation of this file.
1 //=======================================================================
2 // Copyright (c) 2014-2023 Baptiste Wicht
3 // Distributed under the terms of the MIT License.
4 // (See accompanying file LICENSE or copy at
5 // http://opensource.org/licenses/MIT)
6 //=======================================================================
7 
13 #pragma once
14 
15 namespace etl {
16 
20 enum class conv_type {
21  VALID,
22  VALID_MULTI,
23  SAME,
24  SAME_MULTI,
25  FULL,
26  FULL_MULTI
27 };
28 
29 namespace detail {
30 
38 template <typename I, typename K, typename C>
39 inline bool select_parallel(const I& /*input*/, const K& kernel, C&& conv) {
42  } else {
43  return false;
44  }
45 }
46 
47 } //end of namespace detail
48 
49 } //end of namespace etl
50 
51 #include "conv_normal_select.hpp"
52 #include "conv_multi_select.hpp"
53 #include "conv_4d_select.hpp"
Valid convolution, with multiple kernels.
Same convolution, with multiple kernels.
conv_type
Enumeration describing the different types of convolution.
Definition: conv_select.hpp:20
Same convolution.
Contains selectors for convolution implementations.
constexpr size_t conv1_parallel_threshold_conv
The mimum output size before considering parallel convolution.
Definition: threshold.hpp:71
Valid convolution.
Root namespace for the ETL library.
Definition: adapter.hpp:15
context & local_context()
Return the configuration context of the current thread.
Definition: context.hpp:50
constexpr bool is_parallel
Indicates if the expressions and implementations can be automaticallly parallelized.
Definition: config.hpp:59
auto parallel(Expr &&expr) -> parallel_expr< detail::build_type< Expr >>
Create a parallel expression wrapping the given expression.
Definition: wrapper_expression_builder.hpp:79
Full convolution.
constexpr size_t size(const E &expr) noexcept
Returns the size of the given ETL expression.
Definition: helpers.hpp:108
bool select_parallel(const I &, const K &kernel, C &&conv)
Test if ETL should run in parallel for the conv of I and K in C.
Definition: conv_select.hpp:39
Contains selectors for convolution implementations.
constexpr bool parallel_support
Indicates if support for parallelization is integrated into the framework.
Definition: config.hpp:51
auto serial(Expr &&expr) -> serial_expr< detail::build_type< Expr >>
Create a serial expression wrapping the given expression.
Definition: wrapper_expression_builder.hpp:66
constexpr size_t conv1_parallel_threshold_kernel
The mimum kernel size before considering parallel convolution.
Definition: threshold.hpp:72
Contains selectors for convolution implementations.
Full convolution, with multiple kernels.