From 35dcb957aee28ea57b03fe9dfacb791f47120ae5 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Mon, 20 May 2024 18:10:58 +0200 Subject: Use __attribute__((noinline)) instead of glibc macro __attribute_noinline__ --- .../tensor/distance_functions/distance_functions_benchmark.cpp | 6 +++--- searchlib/src/vespa/searchlib/tensor/temporary_vector_store.cpp | 2 +- vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/searchlib/src/tests/tensor/distance_functions/distance_functions_benchmark.cpp b/searchlib/src/tests/tensor/distance_functions/distance_functions_benchmark.cpp index 7717f91cd9d..14a0adac651 100644 --- a/searchlib/src/tests/tensor/distance_functions/distance_functions_benchmark.cpp +++ b/searchlib/src/tests/tensor/distance_functions/distance_functions_benchmark.cpp @@ -16,8 +16,8 @@ using search::attribute::DistanceMetric; size_t npos = std::string::npos; -double run_calc(size_t iterations, TypedCells b, const BoundDistanceFunction & df) __attribute_noinline__; -double run_calc_with_limit(size_t iterations, TypedCells b, const BoundDistanceFunction & df) __attribute_noinline__; +double run_calc(size_t iterations, TypedCells b, const BoundDistanceFunction & df) __attribute__((noinline)); +double run_calc_with_limit(size_t iterations, TypedCells b, const BoundDistanceFunction & df) __attribute__((noinline)); double run_calc(size_t iterations, TypedCells b, const BoundDistanceFunction & df) { @@ -53,7 +53,7 @@ run_calc_with_limit(size_t iterations, TypedCells b, const BoundDistanceFunction } template -void benchmark(size_t iterations, size_t elems) __attribute_noinline__; +void benchmark(size_t iterations, size_t elems) __attribute__((noinline)); template void benchmark(size_t iterations, size_t elems, const DistanceFunctionFactory & df) { diff --git a/searchlib/src/vespa/searchlib/tensor/temporary_vector_store.cpp b/searchlib/src/vespa/searchlib/tensor/temporary_vector_store.cpp index a48614bd9ef..097ea67cc9e 100644 --- a/searchlib/src/vespa/searchlib/tensor/temporary_vector_store.cpp +++ b/searchlib/src/vespa/searchlib/tensor/temporary_vector_store.cpp @@ -15,7 +15,7 @@ namespace { template ConstArrayRef -convert_cells(ArrayRef space, TypedCells cells) noexcept __attribute_noinline__; +convert_cells(ArrayRef space, TypedCells cells) noexcept __attribute__((noinline)); template ConstArrayRef diff --git a/vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp b/vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp index fbcf3dff526..236d2a135a5 100644 --- a/vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp +++ b/vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp @@ -123,7 +123,7 @@ convert_bfloat16_to_float(const uint16_t *src, float *dest, size_t sz) noexcept template ACCUM -multiplyAddT(const int8_t *a, const int8_t *b, size_t sz) noexcept __attribute_noinline__; +multiplyAddT(const int8_t *a, const int8_t *b, size_t sz) noexcept __attribute__((noinline)); template ACCUM -- cgit v1.2.3