parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject parquet-cpp git commit: PARQUET-889: Fix compilation when SSE is enabled
Date Wed, 22 Feb 2017 18:57:45 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master 18fab9984 -> a3554f92d


PARQUET-889: Fix compilation when SSE is enabled

bit-util.h was missing a couple of include. cpu-util.h was including
parquet/logging.h which is an internal header so the implementations of
the static functions have been moved in the source file.

Author: Thomas Sanchez <thomas.sanchz@gmail.com>

Closes #257 from daedric/PARQUET-889 and squashes the following commits:

5b929fb [Thomas Sanchez] PARQUET-889: Fix compilation when SSE is enabled


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/a3554f92
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/a3554f92
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/a3554f92

Branch: refs/heads/master
Commit: a3554f92da6b290738c7e926eff03d26fc549d8a
Parents: 18fab99
Author: Thomas Sanchez <thomas.sanchz@gmail.com>
Authored: Wed Feb 22 13:57:37 2017 -0500
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Wed Feb 22 13:57:37 2017 -0500

----------------------------------------------------------------------
 src/parquet/util/bit-util.h  |  5 +++++
 src/parquet/util/cpu-info.cc | 26 ++++++++++++++++++++++++++
 src/parquet/util/cpu-info.h  | 28 +++++-----------------------
 3 files changed, 36 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/a3554f92/src/parquet/util/bit-util.h
----------------------------------------------------------------------
diff --git a/src/parquet/util/bit-util.h b/src/parquet/util/bit-util.h
index 56d6c03..3a0f587 100644
--- a/src/parquet/util/bit-util.h
+++ b/src/parquet/util/bit-util.h
@@ -30,6 +30,11 @@
 
 #include "parquet/util/compiler-util.h"
 
+#ifdef PARQUET_USE_SSE
+#include "parquet/util/cpu-info.h"
+#include "parquet/util/sse-util.h"
+#endif
+
 namespace parquet {
 
 #define INIT_BITSET(valid_bits_vector, valid_bits_index)        \

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/a3554f92/src/parquet/util/cpu-info.cc
----------------------------------------------------------------------
diff --git a/src/parquet/util/cpu-info.cc b/src/parquet/util/cpu-info.cc
index ba0d146..06304c1 100644
--- a/src/parquet/util/cpu-info.cc
+++ b/src/parquet/util/cpu-info.cc
@@ -39,6 +39,7 @@
 #include <string>
 
 #include "parquet/exception.h"
+#include "parquet/util/logging.h"
 
 using boost::algorithm::contains;
 using boost::algorithm::trim;
@@ -176,4 +177,29 @@ void CpuInfo::EnableFeature(int64_t flag, bool enable) {
   }
 }
 
+int64_t CpuInfo::hardware_flags() {
+  DCHECK(initialized_);
+  return hardware_flags_;
+}
+
+int64_t CpuInfo::CacheSize(CacheLevel level) {
+  DCHECK(initialized_);
+  return cache_sizes_[level];
+}
+
+int64_t CpuInfo::cycles_per_ms() {
+  DCHECK(initialized_);
+  return cycles_per_ms_;
+}
+
+int CpuInfo::num_cores() {
+  DCHECK(initialized_);
+  return num_cores_;
+}
+
+std::string CpuInfo::model_name() {
+  DCHECK(initialized_);
+  return model_name_;
+}
+
 }  // namespace parquet

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/a3554f92/src/parquet/util/cpu-info.h
----------------------------------------------------------------------
diff --git a/src/parquet/util/cpu-info.h b/src/parquet/util/cpu-info.h
index a2fd5de..0becc20 100644
--- a/src/parquet/util/cpu-info.h
+++ b/src/parquet/util/cpu-info.h
@@ -24,8 +24,6 @@
 #include <cstdint>
 #include <string>
 
-#include "parquet/util/logging.h"
-
 namespace parquet {
 
 /// CpuInfo is an interface to query for cpu information at runtime.  The caller can
@@ -54,14 +52,10 @@ class CpuInfo {
   static void VerifyCpuRequirements();
 
   /// Returns all the flags for this cpu
-  static int64_t hardware_flags() {
-    DCHECK(initialized_);
-    return hardware_flags_;
-  }
+  static int64_t hardware_flags();
 
   /// Returns whether of not the cpu supports this flag
   inline static bool IsSupported(int64_t flag) {
-    DCHECK(initialized_);
     return (hardware_flags_ & flag) != 0;
   }
 
@@ -70,28 +64,16 @@ class CpuInfo {
   static void EnableFeature(int64_t flag, bool enable);
 
   /// Returns the size of the cache in KB at this cache level
-  static int64_t CacheSize(CacheLevel level) {
-    DCHECK(initialized_);
-    return cache_sizes_[level];
-  }
+  static int64_t CacheSize(CacheLevel level);
 
   /// Returns the number of cpu cycles per millisecond
-  static int64_t cycles_per_ms() {
-    DCHECK(initialized_);
-    return cycles_per_ms_;
-  }
+  static int64_t cycles_per_ms();
 
   /// Returns the number of cores (including hyper-threaded) on this machine.
-  static int num_cores() {
-    DCHECK(initialized_);
-    return num_cores_;
-  }
+  static int num_cores();
 
   /// Returns the model name of the cpu (e.g. Intel i7-2600)
-  static std::string model_name() {
-    DCHECK(initialized_);
-    return model_name_;
-  }
+  static std::string model_name();
 
   static bool initialized() { return initialized_; }
 


Mime
View raw message