20.11
Fill.cpp
Go to the documentation of this file.
1
//
2
// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
6
#include "
Fill.hpp
"
7
8
#include "
RefWorkloadUtils.hpp
"
9
10
namespace
armnn
11
{
12
13
void
Fill
(
Encoder<float>
& output,
14
const
TensorShape
& desiredOutputShape,
15
const
float
value)
16
{
17
for
(
unsigned
int
i = 0; i < desiredOutputShape.
GetNumElements
(); ++i)
18
{
19
output[i];
20
output.
Set
(value);
21
}
22
}
23
24
}
//namespace armnn
armnn::TensorShape::GetNumElements
unsigned int GetNumElements() const
Function that calculates the tensor elements by multiplying all dimension size which are Specified...
Definition:
Tensor.cpp:181
RefWorkloadUtils.hpp
armnn::Fill
void Fill(Encoder< float > &output, const TensorShape &desiredOutputShape, const float value)
Creates a tensor and fills it with a scalar value.
Definition:
Fill.cpp:13
armnn::Encoder::Set
virtual void Set(IType right)=0
armnn::Encoder< float >
armnn
Copyright (c) 2020 ARM Limited.
Definition:
00_introduction.dox:25
armnn::TensorShape
Definition:
Tensor.hpp:20
Fill.hpp
src
backends
reference
workloads
Fill.cpp
Generated on Wed Nov 25 2020 09:59:14 for ArmNN by
1.8.13