Skip to content

Commit

Permalink
Fix the coding style
Browse files Browse the repository at this point in the history
Change-Id: I02e8a52935376b4ecc700cd17edaeb871b2bd487
  • Loading branch information
guyuqi committed Nov 29, 2018
1 parent 1cf378a commit d86aee1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions cpp/src/arrow/util/armce-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ namespace arrow {

#if defined(__GNUC__) && defined(__linux__) && defined(ARROW_HAVE_ARM_CRC)

#include <sys/auxv.h>
#include <asm/hwcap.h>
#include <sys/auxv.h>
#ifndef HWCAP_CRC32
#define HWCAP_CRC32 (1 << 7)
#endif
static inline uint32_t crc32c_runtime_check(void)
{
unsigned long auxv = getauxval(AT_HWCAP);
static inline uint32_t crc32c_runtime_check(void) {
uint64_t auxv = getauxval(AT_HWCAP);
return (auxv & HWCAP_CRC32) != 0;
}

Expand Down
6 changes: 3 additions & 3 deletions cpp/src/arrow/util/hash-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#include <cassert>
#include <cstdint>

#include "arrow/util/armce-util.h"
#include "arrow/util/logging.h"
#include "arrow/util/macros.h"
#include "arrow/util/sse-util.h"
#include "arrow/util/armce-util.h"

static inline uint32_t HW_crc32_u8(uint32_t crc, uint8_t v) {
DCHECK(false) << "Hardware CRC support is not enabled";
Expand All @@ -49,12 +49,12 @@ static inline uint32_t HW_crc32_u64(uint32_t crc, uint64_t v) {
}

#ifdef ARROW_HAVE_SSE4_2
#define HW_crc32_u8 SSE4_crc32_u8
#define HW_crc32_u8 SSE4_crc32_u8
#define HW_crc32_u16 SSE4_crc32_u16
#define HW_crc32_u32 SSE4_crc32_u32
#define HW_crc32_u64 SSE4_crc32_u64
#elif defined(ARROW_HAVE_ARM_CRC)
#define HW_crc32_u8 ARMCE_crc32_u8
#define HW_crc32_u8 ARMCE_crc32_u8
#define HW_crc32_u16 ARMCE_crc32_u16
#define HW_crc32_u32 ARMCE_crc32_u32
#define HW_crc32_u64 ARMCE_crc32_u64
Expand Down

0 comments on commit d86aee1

Please sign in to comment.