From 7b4681644523cdac6042a9d0f9c8b473170f9969 Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Thu, 3 Oct 2024 14:33:08 -0400 Subject: [PATCH] use C++ style casts in simd.h --- hal/src/main/native/athena/simd/simd.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hal/src/main/native/athena/simd/simd.h b/hal/src/main/native/athena/simd/simd.h index 11a781c60b6..035874a9405 100644 --- a/hal/src/main/native/athena/simd/simd.h +++ b/hal/src/main/native/athena/simd/simd.h @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -// This file contains snippets from the Simd Library by Ihar Yermalayeu +// This file contains modified snippets from the Simd Library by Ihar Yermalayeu // (http://ermig1979.github.io/Simd). The original source file names are listed // above each section. /* @@ -95,7 +95,7 @@ SIMD_INLINE uint8x8x4_t LoadHalf4(const uint8_t* p) { #if SIMD_NEON_PREFECH_SIZE __builtin_prefetch(p + SIMD_NEON_PREFECH_SIZE); #endif - uint8_t* _p = (uint8_t*)__builtin_assume_aligned(p, 8); + uint8_t* _p = static_cast(__builtin_assume_aligned(p, 8)); return vld4_u8(_p); #elif defined(_MSC_VER) return vld4_u8_ex(p, 64); @@ -121,7 +121,7 @@ SIMD_INLINE uint8x16x4_t Load4(const uint8_t* p) { #if SIMD_NEON_PREFECH_SIZE __builtin_prefetch(p + SIMD_NEON_PREFECH_SIZE); #endif - uint8_t* _p = (uint8_t*)__builtin_assume_aligned(p, 16); + uint8_t* _p = static_cast(__builtin_assume_aligned(p, 16)); return vld4q_u8(_p); #elif defined(_MSC_VER) return vld4q_u8_ex(p, 128); @@ -142,7 +142,7 @@ SIMD_INLINE void Store4(uint8_t* p, uint8x16x4_t a) { template <> SIMD_INLINE void Store4(uint8_t* p, uint8x16x4_t a) { #if defined(__GNUC__) - uint8_t* _p = (uint8_t*)__builtin_assume_aligned(p, 16); + uint8_t* _p = static_cast(__builtin_assume_aligned(p, 16)); vst4q_u8(_p, a); #elif defined(_MSC_VER) vst4q_u8_ex(p, a, 128); @@ -162,7 +162,7 @@ SIMD_INLINE void Store4(uint8_t* p, uint8x8x4_t a) { template <> SIMD_INLINE void Store4(uint8_t* p, uint8x8x4_t a) { #if defined(__GNUC__) - uint8_t* _p = (uint8_t*)__builtin_assume_aligned(p, 8); + uint8_t* _p = static_cast(__builtin_assume_aligned(p, 8)); vst4_u8(_p, a); #elif defined(_MSC_VER) vst4_u8_ex(p, a, 64);