diff options
Diffstat (limited to 'arm_compute/runtime/FunctionDescriptors.h')
-rw-r--r-- | arm_compute/runtime/FunctionDescriptors.h | 79 |
1 files changed, 70 insertions, 9 deletions
diff --git a/arm_compute/runtime/FunctionDescriptors.h b/arm_compute/runtime/FunctionDescriptors.h index 3706d0859f..c3af17d6f2 100644 --- a/arm_compute/runtime/FunctionDescriptors.h +++ b/arm_compute/runtime/FunctionDescriptors.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 ARM Limited. + * Copyright (c) 2019-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -21,8 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_RUNTIME_FUNCTION_DESCRIPTORS_H -#define ARM_COMPUTE_RUNTIME_FUNCTION_DESCRIPTORS_H +#ifndef ACL_ARM_COMPUTE_RUNTIME_FUNCTIONDESCRIPTORS_H +#define ACL_ARM_COMPUTE_RUNTIME_FUNCTIONDESCRIPTORS_H + +#include "arm_compute/core/Types.h" +#include "arm_compute/function_info/ActivationLayerInfo.h" + #include <utility> namespace arm_compute @@ -37,16 +41,73 @@ enum class FFTDirection /** Descriptor used by the FFT1D function */ struct FFT1DInfo { - unsigned int axis{ 0 }; /**< Axis to run the FFT on. */ - FFTDirection direction{ FFTDirection::Forward }; /**< Direction of the FFT. */ + unsigned int axis{0}; /**< Axis to run the FFT on. */ + FFTDirection direction{FFTDirection::Forward}; /**< Direction of the FFT. */ }; /** Descriptor used by the FFT2D function */ struct FFT2DInfo { - unsigned int axis0{ 0 }; /**< Axis to run first pass on. If same, multiple transforms are performed on single axis*/ - unsigned int axis1{ 1 }; /**< Axis to run second pass on. If same, multiple transforms are performed on single axis*/ - FFTDirection direction{ FFTDirection::Forward }; /**< Direction of the FFT. */ + unsigned int axis0{0}; /**< Axis to run first pass on. If same, multiple transforms are performed on single axis*/ + unsigned int axis1{1}; /**< Axis to run second pass on. If same, multiple transforms are performed on single axis*/ + FFTDirection direction{FFTDirection::Forward}; /**< Direction of the FFT. */ +}; + +/** Descriptor used by the 2d Convolution function */ +struct Conv2dInfo +{ + Conv2dInfo() = default; + + Conv2dInfo(const PadStrideInfo &conv_info, + const Size2D &dilation, + const ActivationLayerInfo &act_info, + bool enable_fast_math, + unsigned int num_groups, + const WeightsInfo &weights_info = WeightsInfo()) + : conv_info(conv_info), + dilation(dilation), + act_info(act_info), + enable_fast_math(enable_fast_math), + num_groups(num_groups), + weights_info(weights_info) + { + } + + PadStrideInfo conv_info{}; + Size2D dilation{1U, 1U}; + ActivationLayerInfo act_info{}; + bool enable_fast_math{false}; + unsigned int num_groups{1}; + WeightsInfo weights_info{}; }; + +/** Descriptor used by the 3d Convolution function */ +struct Conv3dInfo +{ + Conv3dInfo() = default; + + Conv3dInfo(const Size3D &stride, + const Padding3D &padding, + const ActivationLayerInfo &act_info, + const Size3D &dilation, + const DimensionRoundingType &round_type, + bool enable_fast_math) + : stride(stride), + padding(padding), + act_info(act_info), + dilation(dilation), + round_type(round_type), + enable_fast_math(enable_fast_math) + { + } + + Size3D stride{1U, 1U, 1U}; + Padding3D padding{}; + ActivationLayerInfo act_info{}; + Size3D dilation{1U, 1U, 1U}; + DimensionRoundingType round_type{}; + bool enable_fast_math{false}; +}; + } // namespace arm_compute -#endif /* ARM_COMPUTE_RUNTIME_FUNCTION_DESCRIPTORS_H */ +#endif // ACL_ARM_COMPUTE_RUNTIME_FUNCTIONDESCRIPTORS_H |