Skip to content

Commit 2ab7750

Browse files
Arm has specifically defined only the single set of double underscores rather than leading and trailing underscores for macro definitions. Both are still defined for arm32 as well so this change works for both 32-bit arm and aarch64.
PiperOrigin-RevId: 609146591
1 parent 36ec2c6 commit 2ab7750

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tensorflow_lite_support/scann_ondevice/cc/core/index_table_sum.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void IndexTableSum(const uint8_t* indices, size_t num_chunks,
195195
indices, num_chunks, num_outputs, lookup_table, batch_size, num_centers,
196196
min, max, i, output);
197197
#endif
198-
#ifdef __ARM_NEON__
198+
#ifdef __ARM_NEON
199199
i = IndexTableSumSimdBatch<SimdInt16x8, LutType>(
200200
indices, num_chunks, num_outputs, lookup_table, batch_size, num_centers,
201201
min, max, i, output);
@@ -222,7 +222,7 @@ inline void IndexTableSum<float>(const uint8_t* indices, size_t num_chunks,
222222
indices, num_chunks, num_outputs, lookup_table, batch_size, num_centers,
223223
min, max, i, output);
224224
#endif
225-
#ifdef __ARM_NEON__
225+
#ifdef __ARM_NEON
226226
i = IndexTableSumSimdBatch<SimdFloat32x4, float>(
227227
indices, num_chunks, num_outputs, lookup_table, batch_size, num_centers,
228228
min, max, i, output);

tensorflow_lite_support/scann_ondevice/cc/core/searcher_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ TEST_P(SearcherTest, AsymmetricHashNonSimd) {
362362
EXPECT_NEAR(5.79, extracted[2].first, kEps);
363363
}
364364

365-
#if defined(__ARM_NEON__) || defined(__SSE__)
365+
#if defined(__ARM_NEON) || defined(__SSE__)
366366
TEST_P(SearcherTest, AsymmetricHashSimdFloat32x4) {
367367
MatrixXf query(5, 6);
368368
query << 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0,
@@ -414,7 +414,7 @@ TEST_P(SearcherTest, AsymmetricHashSimdFloat32x4) {
414414
}
415415
#endif
416416

417-
#if defined(__ARM_NEON__) || defined(__SSE__)
417+
#if defined(__ARM_NEON) || defined(__SSE__)
418418
TEST_P(SearcherTest, AsymmetricHashSimdInt16x8) {
419419
MatrixXf query(5, 11);
420420
query << 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0,
@@ -496,7 +496,7 @@ TEST_P(SearcherTest, AsymmetricHashSimdInt16x8) {
496496
}
497497
#endif
498498

499-
#if defined(__ARM_NEON__) || defined(__SSE__)
499+
#if defined(__ARM_NEON) || defined(__SSE__)
500500
TEST_P(SearcherTest, AsymmetricHashMiniBatchedSimdFail) {
501501
std::shared_ptr<Matrix8u> database(new Matrix8u(2, 9));
502502
*database << 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2;

tensorflow_lite_support/scann_ondevice/cc/core/simd_utils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020
#ifdef __SSE__
2121
#include <x86intrin.h>
2222
#endif
23-
#ifdef __ARM_NEON__
23+
#ifdef __ARM_NEON
2424
#include <arm_neon.h>
2525
#endif
2626

@@ -101,7 +101,7 @@ class SimdFloat32x8 {
101101
}
102102
};
103103
#endif
104-
#ifdef __ARM_NEON__
104+
#ifdef __ARM_NEON
105105
class SimdFloat32x4 {
106106
float32x4_t value_;
107107

@@ -198,7 +198,7 @@ class SimdInt16x8 {
198198
}
199199
};
200200
#endif
201-
#ifdef __ARM_NEON__
201+
#ifdef __ARM_NEON
202202
class SimdInt16x8 {
203203
uint16x8_t value_;
204204

0 commit comments

Comments
 (0)