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 6b99d20
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cpp/src/arrow/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

# Headers: top level
install(FILES
armce-util.h
bit-stream-utils.h
bit-util.h
bpacking.h
Expand All @@ -45,6 +44,7 @@ install(FILES
logging.h
macros.h
memory.h
neon-util.h
parallel.h
rle-encoding.h
sse-util.h
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 @@ -25,8 +25,8 @@

#include "arrow/util/logging.h"
#include "arrow/util/macros.h"
#include "arrow/util/neon-util.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
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
// specific language governing permissions and limitations
// under the License.

#ifndef ARROW_UTIL_ARMCE_UTIL_H
#define ARROW_UTIL_ARMCE_UTIL_H
#ifndef ARROW_UTIL_NEON_UTIL_H
#define ARROW_UTIL_NEON_UTIL_H

namespace arrow {

Expand All @@ -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 Expand Up @@ -87,4 +86,4 @@ static inline uint32_t ARMCE_crc32_u64(uint32_t, uint64_t) {

} // namespace arrow

#endif // ARROW_UTIL_ARMCE_UTIL_H
#endif // ARROW_UTIL_NEON_UTIL_H

0 comments on commit 6b99d20

Please sign in to comment.