hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject hadoop git commit: MAPREDUCE-6435. MapReduce client assumes the world is x86 (Alan Burlison via aw)
Date Tue, 27 Oct 2015 19:29:48 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 5c24fe7f9 -> 68ce93c32


MAPREDUCE-6435. MapReduce client assumes the world is x86 (Alan Burlison via aw)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/68ce93c3
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/68ce93c3
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/68ce93c3

Branch: refs/heads/trunk
Commit: 68ce93c32e1cf4344929b26597780ec387efa107
Parents: 5c24fe7
Author: Allen Wittenauer <aw@apache.org>
Authored: Tue Oct 27 12:29:41 2015 -0700
Committer: Allen Wittenauer <aw@apache.org>
Committed: Tue Oct 27 12:29:41 2015 -0700

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                 |  3 +++
 .../src/main/native/src/util/Checksum.cc             | 15 ++++++---------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/68ce93c3/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index 49244d3..51e2cf7 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -217,6 +217,9 @@ Trunk (Unreleased)
     MAPREDUCE-6416. Not all platforms have d_type in struct dirent
     (Alan Burlison via aw)
 
+    MAPREDUCE-6435. MapReduce client assumes the world is x86
+    (Alan Burlison via aw)
+
   BREAKDOWN OF MAPREDUCE-2841 (NATIVE TASK) SUBTASKS
 
     MAPREDUCE-5985. native-task: Fix build on macosx. Contributed by

http://git-wip-us.apache.org/repos/asf/hadoop/blob/68ce93c3/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
index be800c5..f427350 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
@@ -579,16 +579,13 @@ const uint32_t CRC32C_T8_7[256] = {0x00000000, 0x493C7D27, 0x9278FA4E,
0xDB44876
     0xCF56CE31, 0x14124958, 0x5D2E347F, 0xE54C35A1, 0xAC704886, 0x7734CFEF, 0x3E08B2C8, 0xC451B7CC,
     0x8D6DCAEB, 0x56294D82, 0x1F1530A5};
 
-#ifdef __aarch64__
-// Awaiting HW implementation
-#define SOFTWARE_CRC
-#endif
 
-#ifndef SOFTWARE_CRC
-#define USE_HARDWARE_CRC32C 1
+/* Use CRC32 intrinsics on x86 */
+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86)
+#define USE_X86_CRC32
 #endif
 
-#ifdef USE_HARDWARE_CRC32C
+#ifdef USE_X86_CRC32
 
 static int cached_cpu_supports_crc32; // initialized by constructor below
 static uint32_t crc32c_hardware(uint32_t crc, const uint8_t* data, size_t length);
@@ -644,7 +641,7 @@ inline uint32_t _mm_crc32_u8(uint32_t crc, uint8_t value) {
 }
 
 /**
- * Hardware-accelerated CRC32C calculation using the 64-bit instructions.
+ * Hardware-accelerated x86 CRC32C calculation using the 64-bit instructions.
  */
 static uint32_t crc32c_hardware(uint32_t crc, const uint8_t* p_buf, size_t length) {
   // start directly at p_buf, even if it's an unaligned address. According
@@ -739,7 +736,7 @@ uint32_t crc32c_sb8_software(uint32_t crc, const uint8_t *buf, size_t
length) {
 #endif
 
 uint32_t crc32c_sb8(uint32_t crc, const uint8_t *buf, size_t length) {
-#ifdef USE_HARDWARE_CRC32C
+#ifdef USE_X86_CRC32
   if (likely(cached_cpu_supports_crc32)) {
     return crc32c_hardware(crc, buf, length);
   } else {


Mime
View raw message