diff options
Diffstat (limited to 'arm_compute/graph/LayerDescriptors.h')
-rw-r--r-- | arm_compute/graph/LayerDescriptors.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/arm_compute/graph/LayerDescriptors.h b/arm_compute/graph/LayerDescriptors.h index 94074e550e..af69682fa3 100644 --- a/arm_compute/graph/LayerDescriptors.h +++ b/arm_compute/graph/LayerDescriptors.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 ARM Limited. + * Copyright (c) 2019-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -21,10 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_CONCAT_DESCRIPTOR_H -#define ARM_COMPUTE_CONCAT_DESCRIPTOR_H +#ifndef ARM_COMPUTE_LAYER_DESCRIPTORS_H +#define ARM_COMPUTE_LAYER_DESCRIPTORS_H #include "arm_compute/core/Types.h" +#include "arm_compute/graph/Types.h" namespace arm_compute { @@ -63,7 +64,29 @@ struct ConcatLayerDescriptor const DataLayoutDimension axis; /**< Concatenation Axis */ const QuantizationInfo output_qinfo; /**< Output quantizazion info */ }; + +/** Elementwise layer descriptor */ +struct EltwiseLayerDescriptor +{ + /** Constructor + * + * @param[in] op Element-wise operation to perform + * @param[in] out_quant_info (Optional) Output quantization information. Defaults to empty @ref QuantizationInfo + * @param[in] c_policy (Optional) Convert policy used for the operation. Defaults to @ref ConvertPolicy::SATURATE + * @param[in] r_policy (Optional) Rounding policy used for the operation. Defaults to @ref RoundingPolicy::TO_ZERO + */ + EltwiseLayerDescriptor(EltwiseOperation op, QuantizationInfo out_quant_info = QuantizationInfo(), ConvertPolicy c_policy = ConvertPolicy::SATURATE, RoundingPolicy r_policy = RoundingPolicy::TO_ZERO) + : op(op), out_quant_info(out_quant_info), c_policy(c_policy), r_policy(r_policy) + { + } + + EltwiseOperation op; /**< Element-wise operation to perform */ + QuantizationInfo out_quant_info; /**< Output quantization information */ + ConvertPolicy c_policy; /**< Convert policy */ + RoundingPolicy r_policy; /**< Rounding policy */ +}; + } // namespace descriptor } // namespace graph } // namespace arm_compute -#endif /* ARM_COMPUTE_CONCAT_DESCRIPTOR_H */
\ No newline at end of file +#endif /* ARM_COMPUTE_LAYER_DESCRIPTORS_H */
\ No newline at end of file |