<commit_before>// Copyright (c) 2016 <NAME>, <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>

#ifdef _MSC_VER
// disable stupid diamond-inheritance warnings (the compiler does not see that there is only a single implementation for each of the functions)
#pragma warning(disable: 4250)
#endif

#include <Util/Test.hpp>
#include <Util/AlignedBlock.hpp>
#include <Util/TestInfo.hpp>
#include <Util/ErrorInfo.hpp>
#include <Util/VFunc.hpp>
#include <Util/Euclidean.hpp>
#include <Util/Intrinsics.hpp>
#include <Util/ComputeNumRuns.hpp>
#include <Util/ExpandTest.hpp>
#include <Util/TestCase.hpp>
#include <Util/Output.hpp>

#include <Copy/CopyTest.hpp>

#include <XOR/XOR_scalar.hpp>
#include <XOR/XOR_simd.hpp>

#include <AN/AN_scalar.hpp>
#include <AN/AN_simd.hpp>

#include <Hamming/Hamming_scalar.hpp>
#include <Hamming/Hamming_simd.hpp>

#ifdef TESTCRC
#include <CRC/CRC_scalar.hpp>
#endif

using namespace coding_benchmark;

#ifdef TEST32
#include <boost/multiprecision/cpp_int.hpp>

using uint128_t = boost::multiprecision::uint128_t;
#endif

int checkArgs(
        int argc,
        char* argv[],
        size_t & AUser1) {
    if (argc == 1) {
        return 0;
    }
    if (argc != 2) {
        printUsage(argv);
        return 1;
    }
    char* endPtr = nullptr;
    AUser1 = strtoull(argv[1], &endPtr, 0);
    if (endPtr == argv[1] || AUser1 == 0 || (AUser1 & 1) == 0) {
        std::cerr << "Error: A is not a valid positive, non-zero, odd integer!\n";
        printUsage(argv);
        return 2;
    }
#ifdef TEST8
    if (AUser1 >= (1ull << 8)) {
        std::cerr << "Error: Given A is too large! Must be at most 2^8-1\n";
        printUsage(argv);
        return 3;
    }
#endif
#ifdef TEST16
    if (AUser1 >= (1ull << 16)) {
        std::cerr << "Error: Given A is too large! Must be at most 2^16-1\n";
        printUsage(argv);
        return 3;
    }
#endif
#ifdef TEST32
    if (AUser1 >= (1ull << 32)) {
        std::cerr << "Error: Given A is too large! Must be at most 2^32-1\n";
        printUsage(argv);
        return 3;
    }
#endif
    return 0;
}

int main(
        int argc,
        char* argv[]) {
    const constexpr size_t numElements = 1001ull;
    const constexpr size_t iterations = 1ull;<commit_msg>benchmark for SIGMOD2018 reproducibility<commit_after>// Copyright (c) 2016 <NAME>, <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>

#ifdef _MSC_VER
// disable stupid diamond-inheritance warnings (the compiler does not see that there is only a single implementation for each of the functions)
#pragma warning(disable: 4250)
#endif

#include <Util/Test.hpp>
#include <Util/AlignedBlock.hpp>
#include <Util/TestInfo.hpp>
#include <Util/ErrorInfo.hpp>
#include <Util/VFunc.hpp>
#include <Util/Euclidean.hpp>
#include <Util/Intrinsics.hpp>
#include <Util/ComputeNumRuns.hpp>
#include <Util/ExpandTest.hpp>
#include <Util/TestCase.hpp>
#include <Util/Output.hpp>

#include <Copy/CopyTest.hpp>

#include <XOR/XOR_scalar.hpp>
#include <XOR/XOR_simd.hpp>

#include <AN/AN_scalar.hpp>
#include <AN/AN_simd.hpp>

#include <Hamming/Hamming_scalar.hpp>
#include <Hamming/Hamming_simd.hpp>

#ifdef TESTCRC
#include <CRC/CRC_scalar.hpp>
#endif

using namespace coding_benchmark;

#ifdef TEST32
#include <boost/multiprecision/cpp_int.hpp>

using uint128_t = boost::multiprecision::uint128_t;
#endif

int checkArgs(
        int argc,
        char* argv[],
        size_t & AUser1) {
    if (argc == 1) {
        return 0;
    }
    if (argc != 2) {
        printUsage(argv);
        return 1;
    }
    char* endPtr = nullptr;
    AUser1 = strtoull(argv[1], &endPtr, 0);
    if (endPtr == argv[1] || AUser1 == 0 || (AUser1 & 1) == 0) {
        std::cerr << "Error: A is not a valid positive, non-zero, odd integer!\n";
        printUsage(argv);
        return 2;
    }
#ifdef TEST8
    if (AUser1 >= (1ull << 8)) {
        std::cerr << "Error: Given A is too large! Must be at most 2^8-1\n";
        printUsage(argv);
        return 3;
    }
#endif
#ifdef TEST16
    if (AUser1 >= (1ull << 16)) {
        std::cerr << "Error: Given A is too large! Must be at most 2^16-1\n";
        printUsage(argv);
        return 3;
    }
#endif
#ifdef TEST32
    if (AUser1 >= (1ull << 32)) {
        std::cerr << "Error: Given A is too large! Must be at most 2^32-1\n";
        printUsage(argv);
        return 3;
    }
#endif
    return 0;
}

int main(
        int argc,
        char* argv[]) {
    const constexpr size_t numElements = 1000001ull;
    const constexpr size_t iterations = 256ull;
{'fraction_non_alphanumeric': 0.1289308176100629, 'fraction_numerical': 0.026380153738644305, 'mean_word_length': 3.1545718432510887, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '858770', 'n_tokens_mistral': 2024, 'n_tokens_neox': 1907, 'n_words': 612}