Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions cpp/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
define_option(ARROW_USE_PRECOMPILED_HEADERS "Use precompiled headers when compiling"
OFF)

# Disable this option to exercise non-SIMD fallbacks
define_option(ARROW_USE_SIMD "Build with SIMD optimizations" ON)

define_option_string(ARROW_SIMD_LEVEL
"SIMD compiler optimization level"
"SSE4_2" # default to SSE4.2
Expand Down
8 changes: 3 additions & 5 deletions cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ if(BUILD_WARNING_FLAGS)
endif(BUILD_WARNING_FLAGS)

# Only enable additional instruction sets if they are supported
if(ARROW_CPU_FLAG STREQUAL "x86" AND ARROW_USE_SIMD)
if(ARROW_CPU_FLAG STREQUAL "x86")
if(ARROW_SIMD_LEVEL STREQUAL "AVX512")
if(NOT CXX_SUPPORTS_AVX512)
message(FATAL_ERROR "AVX512 required but compiler doesn't support it.")
Expand All @@ -327,7 +327,7 @@ if(ARROW_CPU_FLAG STREQUAL "x86" AND ARROW_USE_SIMD)
endif()
endif()

if(ARROW_CPU_FLAG STREQUAL "ppc" AND ARROW_USE_SIMD)
if(ARROW_CPU_FLAG STREQUAL "ppc")
if(CXX_SUPPORTS_ALTIVEC AND ARROW_ALTIVEC)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} ${ARROW_ALTIVEC_FLAG}")
endif()
Expand All @@ -342,9 +342,7 @@ if(ARROW_CPU_FLAG STREQUAL "armv8")
endif()
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} ${ARROW_ARMV8_ARCH_FLAG}")

if(ARROW_USE_SIMD)
add_definitions(-DARROW_HAVE_NEON)
endif()
add_definitions(-DARROW_HAVE_NEON)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.4")
Expand Down
13 changes: 6 additions & 7 deletions cpp/src/arrow/io/memory_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/util.h"
#include "arrow/util/cpu_info.h"
#include "arrow/util/neon_util.h"
#include "arrow/util/sse_util.h"
#include "arrow/util/simd.h"

#include "benchmark/benchmark.h"

Expand All @@ -45,7 +44,7 @@ using BufferPtr = std::shared_ptr<Buffer>;

#ifdef ARROW_HAVE_SSE4_2

#ifdef ARROW_AVX512
#ifdef ARROW_HAVE_AVX512

using VectorType = __m512i;
#define VectorSet _mm512_set1_epi32
Expand All @@ -59,7 +58,7 @@ using VectorType = __m512i;

#else

#ifdef ARROW_AVX2
#ifdef ARROW_HAVE_AVX2

using VectorType = __m256i;
#define VectorSet _mm256_set1_epi32
Expand All @@ -71,7 +70,7 @@ using VectorType = __m256i;
asm volatile("vmovntdqa %[src], %[dst]" : [ dst ] "=v"(DST) : [ src ] "m"(SRC) :)
#define VectorStreamWrite _mm256_stream_si256

#else // ARROW_AVX2 not set
#else // ARROW_HAVE_AVX2 not set

using VectorType = __m128i;
#define VectorSet _mm_set1_epi32
Expand All @@ -83,8 +82,8 @@ using VectorType = __m128i;
asm volatile("movntdqa %[src], %[dst]" : [ dst ] "=x"(DST) : [ src ] "m"(SRC) :)
#define VectorStreamWrite _mm_stream_si128

#endif // ARROW_AVX2
#endif // ARROW_AVX512
#endif // ARROW_HAVE_AVX2
#endif // ARROW_HAVE_AVX512

static void Read(void* src, void* dst, size_t size) {
const auto simd = static_cast<VectorType*>(src);
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/arrow/json/rapidjson_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
} \
}

#include "arrow/util/neon_util.h"
#include "arrow/util/sse_util.h"

// enable SIMD whitespace skipping, if available
#if defined(ARROW_HAVE_SSE4_2)
#define RAPIDJSON_SSE2 1
Expand Down
6 changes: 1 addition & 5 deletions cpp/src/arrow/util/byte_stream_split.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@

#pragma once

#include "arrow/util/sse_util.h"
#include "arrow/util/simd.h"
#include "arrow/util/ubsan.h"

#include <stdint.h>
#include <algorithm>

#ifdef ARROW_HAVE_AVX2
#include <immintrin.h>
#endif // ARROW_HAVE_AVX2

#ifdef ARROW_HAVE_SSE4_2
// Enable the SIMD for ByteStreamSplit Encoder/Decoder
#define ARROW_HAVE_SIMD_SPLIT
Expand Down
250 changes: 0 additions & 250 deletions cpp/src/arrow/util/hash_util.h

This file was deleted.

Loading