diff --git a/benchmark/bench_ondemand.cpp b/benchmark/bench_ondemand.cpp index 429407faa..bb1a2c428 100644 --- a/benchmark/bench_ondemand.cpp +++ b/benchmark/bench_ondemand.cpp @@ -7,10 +7,6 @@ SIMDJSON_PUSH_DISABLE_ALL_WARNINGS #include SIMDJSON_POP_DISABLE_WARNINGS -#if SIMDJSON_IMPLEMENTATION_HASWELL -#include "simdjson/haswell/begin.h" -#endif // SIMDJSON_IMPLEMENTATION_HASWELL - #include "partial_tweets/ondemand.h" #include "partial_tweets/iter.h" #include "partial_tweets/dom.h" @@ -24,7 +20,3 @@ SIMDJSON_POP_DISABLE_WARNINGS #include "kostya/dom.h" BENCHMARK_MAIN(); - -#if SIMDJSON_IMPLEMENTATION_HASWELL -#include "simdjson/haswell/end.h" -#endif // SIMDJSON_IMPLEMENTATION_HASWELL diff --git a/benchmark/bench_sax.cpp b/benchmark/bench_sax.cpp index e1434172c..2a40898ab 100644 --- a/benchmark/bench_sax.cpp +++ b/benchmark/bench_sax.cpp @@ -8,16 +8,7 @@ SIMDJSON_PUSH_DISABLE_ALL_WARNINGS #include SIMDJSON_POP_DISABLE_WARNINGS - -#if SIMDJSON_IMPLEMENTATION_HASWELL -#include "simdjson/haswell/begin.h" -#endif // SIMDJSON_IMPLEMENTATION_HASWELL - #include "partial_tweets/sax.h" #include "largerandom/sax.h" BENCHMARK_MAIN(); - -#if SIMDJSON_IMPLEMENTATION_HASWELL -#include "simdjson/haswell/end.h" -#endif // SIMDJSON_IMPLEMENTATION_HASWELL diff --git a/benchmark/kostya/iter.h b/benchmark/kostya/iter.h index cacf1b478..92ad5048d 100644 --- a/benchmark/kostya/iter.h +++ b/benchmark/kostya/iter.h @@ -1,6 +1,5 @@ #pragma once -#ifdef SIMDJSON_IMPLEMENTATION #if SIMDJSON_EXCEPTIONS #include "kostya.h" @@ -8,7 +7,7 @@ namespace kostya { using namespace simdjson; -using namespace simdjson::SIMDJSON_IMPLEMENTATION; +using namespace simdjson::builtin; class Iter { public: @@ -21,12 +20,12 @@ private: ondemand::parser parser{}; std::vector container{}; - simdjson_really_inline simdjson_result first_double(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter, const char *key) { + simdjson_really_inline simdjson_result first_double(ondemand::json_iterator &iter, const char *key) { if (!iter.start_object() || ondemand::raw_json_string(iter.field_key()) != key || iter.field_value()) { throw "Invalid field"; } return iter.get_double(); } - simdjson_really_inline simdjson_result next_double(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter, const char *key) { + simdjson_really_inline simdjson_result next_double(ondemand::json_iterator &iter, const char *key) { if (!iter.has_next_field() || ondemand::raw_json_string(iter.field_key()) != key || iter.field_value()) { throw "Invalid field"; } return iter.get_double(); } @@ -95,4 +94,3 @@ BENCHMARK_TEMPLATE(KostyaSum, Iter); } // namespace kostya #endif // SIMDJSON_EXCEPTIONS -#endif // SIMDJSON_IMPLEMENTATION diff --git a/benchmark/kostya/ondemand.h b/benchmark/kostya/ondemand.h index b9ebbdecb..b0fce18d5 100644 --- a/benchmark/kostya/ondemand.h +++ b/benchmark/kostya/ondemand.h @@ -1,6 +1,5 @@ #pragma once -#ifdef SIMDJSON_IMPLEMENTATION #if SIMDJSON_EXCEPTIONS #include "kostya.h" @@ -8,7 +7,7 @@ namespace kostya { using namespace simdjson; -using namespace simdjson::SIMDJSON_IMPLEMENTATION; +using namespace simdjson::builtin; class OnDemand { public: @@ -75,4 +74,3 @@ BENCHMARK_TEMPLATE(KostyaSum, OnDemand); } // namespace kostya #endif // SIMDJSON_EXCEPTIONS -#endif // SIMDJSON_IMPLEMENTATION diff --git a/benchmark/largerandom/iter.h b/benchmark/largerandom/iter.h index 5c81bac2b..58580999e 100644 --- a/benchmark/largerandom/iter.h +++ b/benchmark/largerandom/iter.h @@ -1,6 +1,5 @@ #pragma once -#ifdef SIMDJSON_IMPLEMENTATION #if SIMDJSON_EXCEPTIONS #include "largerandom.h" @@ -8,7 +7,7 @@ namespace largerandom { using namespace simdjson; -using namespace simdjson::SIMDJSON_IMPLEMENTATION; +using namespace simdjson::builtin; class Iter { public: @@ -21,12 +20,12 @@ private: ondemand::parser parser{}; std::vector container{}; - simdjson_really_inline double first_double(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter) { + simdjson_really_inline double first_double(ondemand::json_iterator &iter) { if (iter.start_object().error() || iter.field_key().error() || iter.field_value()) { throw "Invalid field"; } return iter.get_double(); } - simdjson_really_inline double next_double(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter) { + simdjson_really_inline double next_double(ondemand::json_iterator &iter) { if (!iter.has_next_field() || iter.field_key().error() || iter.field_value()) { throw "Invalid field"; } return iter.get_double(); } @@ -91,4 +90,3 @@ BENCHMARK_TEMPLATE(LargeRandomSum, Iter); } // namespace largerandom #endif // SIMDJSON_EXCEPTIONS -#endif // SIMDJSON_IMPLEMENTATION diff --git a/benchmark/largerandom/ondemand.h b/benchmark/largerandom/ondemand.h index c228fa53d..12dfa5473 100644 --- a/benchmark/largerandom/ondemand.h +++ b/benchmark/largerandom/ondemand.h @@ -1,6 +1,5 @@ #pragma once -#ifdef SIMDJSON_IMPLEMENTATION #if SIMDJSON_EXCEPTIONS #include "largerandom.h" @@ -8,7 +7,7 @@ namespace largerandom { using namespace simdjson; -using namespace simdjson::SIMDJSON_IMPLEMENTATION; +using namespace simdjson::builtin; class OnDemand { public: @@ -72,4 +71,3 @@ BENCHMARK_TEMPLATE(LargeRandomSum, OnDemand); } // namespace largerandom #endif // SIMDJSON_EXCEPTIONS -#endif // SIMDJSON_IMPLEMENTATION diff --git a/benchmark/largerandom/sax.h b/benchmark/largerandom/sax.h index 49f3d3a8f..b9653a0c5 100644 --- a/benchmark/largerandom/sax.h +++ b/benchmark/largerandom/sax.h @@ -1,6 +1,5 @@ #pragma once -#ifdef SIMDJSON_IMPLEMENTATION #if SIMDJSON_EXCEPTIONS #include "largerandom.h" @@ -8,8 +7,8 @@ namespace largerandom { using namespace simdjson; -using namespace SIMDJSON_IMPLEMENTATION; -using namespace SIMDJSON_IMPLEMENTATION::stage2; +using namespace simdjson::builtin; +using namespace simdjson::builtin::stage2; class Sax { public: @@ -28,8 +27,8 @@ private: }; using namespace simdjson; -using namespace SIMDJSON_IMPLEMENTATION; -using namespace SIMDJSON_IMPLEMENTATION::stage2; +using namespace simdjson::builtin; +using namespace simdjson::builtin::stage2; struct sax_point_reader_visitor { public: std::vector &points; @@ -123,4 +122,3 @@ BENCHMARK_TEMPLATE(LargeRandom, Sax); } // namespace largerandom #endif // SIMDJSON_EXCEPTIONS -#endif // SIMDJSON_IMPLEMENTATION diff --git a/benchmark/partial_tweets/iter.h b/benchmark/partial_tweets/iter.h index 780c3a2d8..5b69b44f2 100644 --- a/benchmark/partial_tweets/iter.h +++ b/benchmark/partial_tweets/iter.h @@ -1,6 +1,5 @@ #pragma once -#ifdef SIMDJSON_IMPLEMENTATION #if SIMDJSON_EXCEPTIONS #include "partial_tweets.h" @@ -8,7 +7,7 @@ namespace partial_tweets { using namespace simdjson; -using namespace simdjson::SIMDJSON_IMPLEMENTATION; +using namespace simdjson::builtin; class Iter { public: @@ -92,4 +91,3 @@ BENCHMARK_TEMPLATE(PartialTweets, Iter); } // namespace partial_tweets #endif // SIMDJSON_EXCEPTIONS -#endif // SIMDJSON_IMPLEMENTATION diff --git a/benchmark/partial_tweets/ondemand.h b/benchmark/partial_tweets/ondemand.h index 08d8c1501..8003c42cc 100644 --- a/benchmark/partial_tweets/ondemand.h +++ b/benchmark/partial_tweets/ondemand.h @@ -1,6 +1,5 @@ #pragma once -#ifdef SIMDJSON_IMPLEMENTATION #if SIMDJSON_EXCEPTIONS #include "partial_tweets.h" @@ -8,7 +7,7 @@ namespace partial_tweets { using namespace simdjson; -using namespace simdjson::SIMDJSON_IMPLEMENTATION; +using namespace simdjson::builtin; class OnDemand { public: @@ -57,4 +56,3 @@ BENCHMARK_TEMPLATE(PartialTweets, OnDemand); } // namespace partial_tweets #endif // SIMDJSON_EXCEPTIONS -#endif // SIMDJSON_IMPLEMENTATION diff --git a/benchmark/partial_tweets/sax.h b/benchmark/partial_tweets/sax.h index e3dde8aab..a5e8af3a7 100644 --- a/benchmark/partial_tweets/sax.h +++ b/benchmark/partial_tweets/sax.h @@ -1,6 +1,5 @@ #pragma once -#ifdef SIMDJSON_IMPLEMENTATION #include "partial_tweets.h" #include "sax_tweet_reader_visitor.h" @@ -8,8 +7,8 @@ namespace partial_tweets { using namespace simdjson; -using namespace SIMDJSON_IMPLEMENTATION; -using namespace SIMDJSON_IMPLEMENTATION::stage2; +using namespace simdjson::builtin; +using namespace simdjson::builtin::stage2; class Sax { public: @@ -68,4 +67,3 @@ BENCHMARK_TEMPLATE(PartialTweets, Sax); } // namespace partial_tweets -#endif // SIMDJSON_IMPLEMENTATION diff --git a/benchmark/partial_tweets/sax_tweet_reader_visitor.h b/benchmark/partial_tweets/sax_tweet_reader_visitor.h index ca99795cb..ea1148448 100644 --- a/benchmark/partial_tweets/sax_tweet_reader_visitor.h +++ b/benchmark/partial_tweets/sax_tweet_reader_visitor.h @@ -7,8 +7,8 @@ namespace partial_tweets { using namespace simdjson; -using namespace SIMDJSON_IMPLEMENTATION; -using namespace SIMDJSON_IMPLEMENTATION::stage2; +using namespace simdjson::builtin; +using namespace simdjson::builtin::stage2; struct sax_tweet_reader_visitor { public: