24.04
ResizeAttributes.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Arm Limited.
3
*
4
* SPDX-License-Identifier: MIT
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to
8
* deal in the Software without restriction, including without limitation the
9
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
* sell copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in all
14
* copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
* SOFTWARE.
23
*/
24
25
#ifndef ARM_COMPUTE_DYNAMIC_FUSION_SKETCH_ATTRIBUTES_RESIZEATTRIBUTES
26
#define ARM_COMPUTE_DYNAMIC_FUSION_SKETCH_ATTRIBUTES_RESIZEATTRIBUTES
27
28
#include "
arm_compute/core/PixelValue.h
"
29
#include "
arm_compute/core/Types.h
"
30
31
#include <cstdint>
32
33
namespace
arm_compute
34
{
35
namespace
experimental
36
{
37
namespace
dynamic_fusion
38
{
39
/** Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
40
*/
41
42
/** Resize attributes */
43
class
ResizeAttributes
44
{
45
public
:
46
/** Set output width */
47
ResizeAttributes
&
output_width
(int32_t
output_width
);
48
49
/** Get output width */
50
int32_t
output_width
()
const
;
51
52
/** Set output height */
53
ResizeAttributes
&
output_height
(int32_t
output_height
);
54
55
/** Get output height */
56
int32_t
output_height
()
const
;
57
58
/** Set interpolation policy */
59
ResizeAttributes
&
interpolation_policy
(
InterpolationPolicy
interpolation_policy
);
60
61
/** Get interpolation policy */
62
InterpolationPolicy
interpolation_policy
()
const
;
63
64
/** Set sampling policy */
65
ResizeAttributes
&
sampling_policy
(
SamplingPolicy
sampling_policy
);
66
67
/** Get sampling policy */
68
SamplingPolicy
sampling_policy
()
const
;
69
70
/** Set align corners */
71
ResizeAttributes
&
align_corners
(
bool
align_corners
);
72
73
/** Get align corners */
74
bool
align_corners
()
const
;
75
76
private
:
77
int32_t _output_width{};
78
int32_t _output_height{};
79
InterpolationPolicy
_interpolation_policy{
InterpolationPolicy::BILINEAR
};
80
SamplingPolicy
_sampling_policy{
SamplingPolicy::CENTER
};
81
bool
_align_corners{
false
};
82
};
83
84
}
// namespace dynamic_fusion
85
}
// namespace experimental
86
}
// namespace arm_compute
87
88
#endif
/* ARM_COMPUTE_DYNAMIC_FUSION_SKETCH_ATTRIBUTES_RESIZEATTRIBUTES */
arm_compute::experimental::dynamic_fusion::ResizeAttributes::output_width
int32_t output_width() const
Get output width.
Definition:
ResizeAttributes.cpp:39
arm_compute::SamplingPolicy
SamplingPolicy
Available Sampling Policies.
Definition:
Types.h:84
Types.h
arm_compute::InterpolationPolicy
InterpolationPolicy
Interpolation method.
Definition:
Types.h:360
arm_compute::experimental::dynamic_fusion::ResizeAttributes
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
Definition:
ResizeAttributes.h:43
arm_compute::experimental::dynamic_fusion::ResizeAttributes::interpolation_policy
InterpolationPolicy interpolation_policy() const
Get interpolation policy.
Definition:
ResizeAttributes.cpp:61
arm_compute::experimental::dynamic_fusion::ResizeAttributes::output_height
int32_t output_height() const
Get output height.
Definition:
ResizeAttributes.cpp:50
arm_compute::experimental::dynamic_fusion::ResizeAttributes::sampling_policy
SamplingPolicy sampling_policy() const
Get sampling policy.
Definition:
ResizeAttributes.cpp:72
PixelValue.h
arm_compute::InterpolationPolicy::BILINEAR
@ BILINEAR
Output values are defined by bilinear interpolation between the pixels.
arm_compute
Copyright (c) 2017-2024 Arm Limited.
Definition:
introduction.dox:24
arm_compute::SamplingPolicy::CENTER
@ CENTER
Samples are taken at pixel center.
arm_compute::experimental::dynamic_fusion::ResizeAttributes::align_corners
bool align_corners() const
Get align corners.
Definition:
ResizeAttributes.cpp:83
arm_compute
dynamic_fusion
sketch
attributes
ResizeAttributes.h
Generated on Mon Apr 29 2024 10:53:52 for Compute Library by
1.8.17