24.04
ScatterInfo.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 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 ACL_ARM_COMPUTE_FUNCTION_INFO_SCATTERINFO_H
26
#define ACL_ARM_COMPUTE_FUNCTION_INFO_SCATTERINFO_H
27
28
#include "
arm_compute/core/Error.h
"
29
30
namespace
arm_compute
31
{
32
/** Scatter Function */
33
enum class
ScatterFunction
34
{
35
Update
= 0,
36
Add
= 1,
37
Sub
= 2,
38
Max
= 3,
39
Min
= 4
40
};
41
/** Scatter operator information */
42
struct
ScatterInfo
43
{
44
ScatterInfo
(
ScatterFunction
f,
bool
zero) :
func
(f),
zero_initialization
(zero)
45
{
46
ARM_COMPUTE_ERROR_ON_MSG
(f !=
ScatterFunction::Add
&& zero,
47
"Zero initialisation is only supported with Add Scatter Function."
);
48
}
49
ScatterFunction
func
;
/**< Type of scatter function to use with scatter operator*/
50
bool
zero_initialization
{
false
};
/**< Fill output tensors with 0. Only available with add scatter function. */
51
};
52
}
// namespace arm_compute
53
54
#endif // ACL_ARM_COMPUTE_FUNCTION_INFO_SCATTERINFO_H
arm_compute::ScatterFunction
ScatterFunction
Scatter Function.
Definition:
ScatterInfo.h:33
Error.h
arm_compute::ScatterFunction::Max
@ Max
arm_compute::ScatterFunction::Sub
@ Sub
arm_compute::ScatterInfo::zero_initialization
bool zero_initialization
Fill output tensors with 0.
Definition:
ScatterInfo.h:50
ARM_COMPUTE_ERROR_ON_MSG
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Definition:
Error.h:456
arm_compute::ScatterInfo::ScatterInfo
ScatterInfo(ScatterFunction f, bool zero)
Definition:
ScatterInfo.h:44
arm_compute::ScatterInfo::func
ScatterFunction func
Type of scatter function to use with scatter operator.
Definition:
ScatterInfo.h:49
arm_compute::ScatterFunction::Add
@ Add
arm_compute::ScatterInfo
Scatter operator information.
Definition:
ScatterInfo.h:42
arm_compute::ScatterFunction::Min
@ Min
arm_compute::ScatterFunction::Update
@ Update
arm_compute
Copyright (c) 2017-2024 Arm Limited.
Definition:
introduction.dox:24
arm_compute
function_info
ScatterInfo.h
Generated on Mon Apr 29 2024 10:53:52 for Compute Library by
1.8.17