You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/07/19 22:41:26 UTC
[arrow] branch master updated: ARROW-2822: [C++] Remove the
unneeded const qualifier and clarify the comments
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 7d2fbeb ARROW-2822: [C++] Remove the unneeded const qualifier and clarify the comments
7d2fbeb is described below
commit 7d2fbeba31763c978d260a9771184a13a63aaaf7
Author: Dimitri Vorona <vo...@in.tum.de>
AuthorDate: Thu Jul 19 18:41:21 2018 -0400
ARROW-2822: [C++] Remove the unneeded const qualifier and clarify the comments
Few changes we discussed in the PR #2239.
Author: Dimitri Vorona <vo...@in.tum.de>
Closes #2293 from alendit/zero-padding-addendum and squashes the following commits:
b5f2a8aa <Dimitri Vorona> Revert "Fix type cast"
c0aed06c <Dimitri Vorona> Fix type cast
cb1e8dde <Dimitri Vorona> Remove the unneeded const qualifier and clarify the comments
---
cpp/src/arrow/builder.h | 2 +-
cpp/src/arrow/util/lazy-benchmark.cc | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/cpp/src/arrow/builder.h b/cpp/src/arrow/builder.h
index eeff12b..06093a2 100644
--- a/cpp/src/arrow/builder.h
+++ b/cpp/src/arrow/builder.h
@@ -252,7 +252,7 @@ class ARROW_EXPORT PrimitiveBuilder : public ArrayBuilder {
ARROW_DEPRECATED("Use Finish instead")
std::shared_ptr<Buffer> data() const { return data_; }
- const value_type GetValue(int64_t index) const {
+ value_type GetValue(int64_t index) const {
return reinterpret_cast<const value_type*>(data_->data())[index];
}
diff --git a/cpp/src/arrow/util/lazy-benchmark.cc b/cpp/src/arrow/util/lazy-benchmark.cc
index 9b04c65..4ec1b07 100644
--- a/cpp/src/arrow/util/lazy-benchmark.cc
+++ b/cpp/src/arrow/util/lazy-benchmark.cc
@@ -35,7 +35,7 @@ std::vector<T> generate_junk(int64_t size) {
return v;
}
-// baseline
+// Baseline
void BM_for_loop(benchmark::State& state) {
auto source = generate_junk(kSize);
std::vector<int> target(kSize);
@@ -47,7 +47,7 @@ void BM_for_loop(benchmark::State& state) {
BENCHMARK(BM_for_loop)->Repetitions(3)->Unit(benchmark::kMillisecond);
-// for comparison: pure copy without any changes
+// For comparison: pure copy without any changes
void BM_std_copy(benchmark::State& state) {
auto source = generate_junk(kSize);
std::vector<int> target(kSize);
@@ -59,7 +59,7 @@ void BM_std_copy(benchmark::State& state) {
BENCHMARK(BM_std_copy)->Repetitions(3)->Unit(benchmark::kMillisecond);
-// for comparison: pure copy without any changes
+// For comparison: pure copy with type convesion.
void BM_std_copy_converting(benchmark::State& state) {
auto source = generate_junk<int32_t>(kSize);
// bigger type to avoid warnings
@@ -72,7 +72,7 @@ void BM_std_copy_converting(benchmark::State& state) {
BENCHMARK(BM_std_copy_converting)->Repetitions(3)->Unit(benchmark::kMillisecond);
-// std::copy with a lazy iterator
+// std::copy with a lazy range as a source
void BM_lazy_copy(benchmark::State& state) {
auto source = generate_junk(kSize);
std::vector<int> target(kSize);
@@ -86,8 +86,8 @@ void BM_lazy_copy(benchmark::State& state) {
BENCHMARK(BM_lazy_copy)->Repetitions(3)->Unit(benchmark::kMillisecond);
-// std::copy with a lazy iterator which does static cast
-// should be the same performance as std::copy with differtly typed iterators
+// std::copy with a lazy range which does static cast.
+// Should be the same performance as std::copy with differtly typed iterators
void BM_lazy_copy_converting(benchmark::State& state) {
auto source = generate_junk<int64_t>(kSize);
std::vector<int32_t> target(kSize);
@@ -102,7 +102,7 @@ void BM_lazy_copy_converting(benchmark::State& state) {
BENCHMARK(BM_lazy_copy_converting)->Repetitions(3)->Unit(benchmark::kMillisecond);
-// for loop with a post-increment of a lazy operator
+// For loop with a post-increment of a lazy operator
void BM_lazy_postinc(benchmark::State& state) {
auto source = generate_junk(kSize);
std::vector<int> target(kSize);