aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/utils/FormatUtils.h
diff options
context:
space:
mode:
authorFelix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>2023-09-27 17:46:17 +0100
committerfelixjohnny.thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>2023-09-28 12:08:05 +0000
commitafd38f0c617d6f89b2b4532c6c44f116617e2b6f (patch)
tree03bc7d5a762099989b16a656fa8d397b490ed70e /arm_compute/core/utils/FormatUtils.h
parentbdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 (diff)
downloadComputeLibrary-afd38f0c617d6f89b2b4532c6c44f116617e2b6f.tar.gz
Apply clang-format on repository
Code is formatted as per a revised clang format configuration file(not part of this delivery). Version 14.0.6 is used. Exclusion List: - files with .cl extension - files that are not strictly C/C++ (e.g. Android.bp, Sconscript ...) And the following directories - compute_kernel_writer/validation/ - tests/ - include/ - src/core/NEON/kernels/convolution/ - src/core/NEON/kernels/arm_gemm/ - src/core/NEON/kernels/arm_conv/ - data/ There will be a follow up for formatting of .cl files and the files under tests/ and compute_kernel_writer/validation/. Signed-off-by: Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Diffstat (limited to 'arm_compute/core/utils/FormatUtils.h')
-rw-r--r--arm_compute/core/utils/FormatUtils.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/arm_compute/core/utils/FormatUtils.h b/arm_compute/core/utils/FormatUtils.h
index afb0f78255..a8e96bd361 100644
--- a/arm_compute/core/utils/FormatUtils.h
+++ b/arm_compute/core/utils/FormatUtils.h
@@ -37,7 +37,7 @@ namespace arm_compute
*/
inline size_t pixel_size_from_format(Format format)
{
- switch(format)
+ switch (format)
{
case Format::U8:
return 1;
@@ -77,7 +77,7 @@ inline size_t pixel_size_from_format(Format format)
*/
inline int plane_idx_from_channel(Format format, Channel channel)
{
- switch(format)
+ switch (format)
{
// Single planar formats have a single plane
case Format::U8:
@@ -99,7 +99,7 @@ inline int plane_idx_from_channel(Format format, Channel channel)
case Format::NV21:
{
// Channel U and V share the same plane of format UV88
- switch(channel)
+ switch (channel)
{
case Channel::Y:
return 0;
@@ -114,7 +114,7 @@ inline int plane_idx_from_channel(Format format, Channel channel)
case Format::IYUV:
case Format::YUV444:
{
- switch(channel)
+ switch (channel)
{
case Channel::Y:
return 0;
@@ -142,11 +142,11 @@ inline int plane_idx_from_channel(Format format, Channel channel)
*/
inline int channel_idx_from_format(Format format, Channel channel)
{
- switch(format)
+ switch (format)
{
case Format::RGB888:
{
- switch(channel)
+ switch (channel)
{
case Channel::R:
return 0;
@@ -161,7 +161,7 @@ inline int channel_idx_from_format(Format format, Channel channel)
}
case Format::RGBA8888:
{
- switch(channel)
+ switch (channel)
{
case Channel::R:
return 0;
@@ -178,7 +178,7 @@ inline int channel_idx_from_format(Format format, Channel channel)
}
case Format::YUYV422:
{
- switch(channel)
+ switch (channel)
{
case Channel::Y:
return 0;
@@ -193,7 +193,7 @@ inline int channel_idx_from_format(Format format, Channel channel)
}
case Format::UYVY422:
{
- switch(channel)
+ switch (channel)
{
case Channel::Y:
return 1;
@@ -208,7 +208,7 @@ inline int channel_idx_from_format(Format format, Channel channel)
}
case Format::NV12:
{
- switch(channel)
+ switch (channel)
{
case Channel::Y:
return 0;
@@ -223,7 +223,7 @@ inline int channel_idx_from_format(Format format, Channel channel)
}
case Format::NV21:
{
- switch(channel)
+ switch (channel)
{
case Channel::Y:
return 0;
@@ -239,7 +239,7 @@ inline int channel_idx_from_format(Format format, Channel channel)
case Format::YUV444:
case Format::IYUV:
{
- switch(channel)
+ switch (channel)
{
case Channel::Y:
return 0;
@@ -266,7 +266,7 @@ inline int channel_idx_from_format(Format format, Channel channel)
*/
inline size_t num_planes_from_format(Format format)
{
- switch(format)
+ switch (format)
{
case Format::U8:
case Format::S16:
@@ -301,7 +301,7 @@ inline size_t num_planes_from_format(Format format)
*/
inline size_t num_channels_from_format(Format format)
{
- switch(format)
+ switch (format)
{
case Format::U8:
case Format::U16:
@@ -340,5 +340,5 @@ inline size_t num_channels_from_format(Format format)
* @return The string describing the format.
*/
const std::string &string_from_format(Format format);
-}
+} // namespace arm_compute
#endif /*ARM_COMPUTE_CORE_UTILS_FORMATUTILS_H */