diff options
author | Jerry Ge <jerry.ge@arm.com> | 2023-03-06 13:07:36 -0800 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-03-17 18:47:04 +0000 |
commit | cf305dbb7f3e3be7c4e6c71174e1183eb489ec03 (patch) | |
tree | a542921c739be36ff3133a20017e500b5405cb91 /reference_model/src/ops/template_types.h | |
parent | 2eb3d63318c139eda94775730878c6c2168ac148 (diff) | |
download | reference_model-cf305dbb7f3e3be7c4e6c71174e1183eb489ec03.tar.gz |
Refactor 1L to INT64_C()
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: If3f8c5a1f2dffac36448101959557f86b6ab6c7f
Diffstat (limited to 'reference_model/src/ops/template_types.h')
-rw-r--r-- | reference_model/src/ops/template_types.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/reference_model/src/ops/template_types.h b/reference_model/src/ops/template_types.h index 6b28502..ece14b1 100644 --- a/reference_model/src/ops/template_types.h +++ b/reference_model/src/ops/template_types.h @@ -1,5 +1,5 @@ -// Copyright (c) 2020-2022, ARM Limited. +// Copyright (c) 2020-2023, ARM Limited. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -196,83 +196,83 @@ struct GetNumBits<DType_FP16> template <DType T> struct GetQMin { - static constexpr int64_t value = 0L; + static constexpr int64_t value = INT64_C(0); }; template <> struct GetQMin<DType_UINT8> { - static constexpr int64_t value = 0L; + static constexpr int64_t value = INT64_C(0); }; template <> struct GetQMin<DType_UINT16> { - static constexpr int64_t value = 0L; + static constexpr int64_t value = INT64_C(0); }; template <> struct GetQMin<DType_INT4> { - static constexpr int64_t value = -8L; + static constexpr int64_t value = INT64_C(-8); }; template <> struct GetQMin<DType_INT8> { - static constexpr int64_t value = -128L; + static constexpr int64_t value = INT64_C(-128); }; template <> struct GetQMin<DType_INT16> { - static constexpr int64_t value = -32768L; + static constexpr int64_t value = INT64_C(-32768); }; template <> struct GetQMin<DType_INT32> { - static constexpr int64_t value = -(1L << 31); + static constexpr int64_t value = -(INT64_C(1) << 31); }; template <> struct GetQMin<DType_INT48> { - static constexpr int64_t value = -(1L << 47); + static constexpr int64_t value = -(INT64_C(1) << 47); }; template <DType T> struct GetQMax { - static constexpr int64_t value = 0L; + static constexpr int64_t value = INT64_C(0); }; template <> struct GetQMax<DType_UINT8> { - static constexpr int64_t value = 255L; + static constexpr int64_t value = INT64_C(255); }; template <> struct GetQMax<DType_UINT16> { - static constexpr int64_t value = 65535L; + static constexpr int64_t value = INT64_C(65535); }; template <> struct GetQMax<DType_INT4> { - static constexpr int64_t value = 7L; + static constexpr int64_t value = INT64_C(7); }; template <> struct GetQMax<DType_INT8> { - static constexpr int64_t value = 127L; + static constexpr int64_t value = INT64_C(127); }; template <> struct GetQMax<DType_INT16> { - static constexpr int64_t value = 32767L; + static constexpr int64_t value = INT64_C(32767); }; template <> struct GetQMax<DType_INT32> { - static constexpr int64_t value = (1L << 31) - 1; + static constexpr int64_t value = (INT64_C(1) << 31) - 1; }; template <> struct GetQMax<DType_INT48> { - static constexpr int64_t value = (1L << 47) - 1; + static constexpr int64_t value = (INT64_C(1) << 47) - 1; }; }; // namespace TosaReference |