<commit_before>﻿/*
 * Copyright 2017 libfpta authors: please see AUTHORS file.
 *
 * This file is part of libfpta, aka "Fast Positive Tables".
 *
 * libfpta is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * libfpta is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with libfpta.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once
#include "fast_positive/config.h"

#include <assert.h>
#if defined(_MSC_VER) && defined(_ASSERTE)
#undef assert
#define assert _ASSERTE
#endif /* _MSC_VER */

/*----------------------------------------------------------------------------*/
/* Compiler's includes for builtins/intrinsics */

#if __GNUC_PREREQ(4, 4) || defined(__clang__)

#if defined(__i386__) || defined(__x86_64__)
#include <cpuid.h>
#include <x86intrin.h>
#endif
#define bswap64(v) __builtin_bswap64(v)
#define bswap32(v) __builtin_bswap32(v)
#if __GNUC_PREREQ(4, 8) || __has_builtin(__builtin_bswap16)
#define bswap16(v) __builtin_bswap16(v)
#endif

#elif defined(_MSC_VER)

#if _MSC_FULL_VER < 190024218
#error At least "Microsoft C/C++ Compiler" version 19.00.24218 (Visual Studio 2015 Update 5) is required.<commit_msg>fpta: relax MSVC minimal version to 19.00.24215 (Visual Studio 2015 Update 3).<commit_after>﻿/*
 * Copyright 2017 libfpta authors: please see AUTHORS file.
 *
 * This file is part of libfpta, aka "Fast Positive Tables".
 *
 * libfpta is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * libfpta is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with libfpta.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once
#include "fast_positive/config.h"

#include <assert.h>
#if defined(_MSC_VER) && defined(_ASSERTE)
#undef assert
#define assert _ASSERTE
#endif /* _MSC_VER */

/*----------------------------------------------------------------------------*/
/* Compiler's includes for builtins/intrinsics */

#if __GNUC_PREREQ(4, 4) || defined(__clang__)

#if defined(__i386__) || defined(__x86_64__)
#include <cpuid.h>
#include <x86intrin.h>
#endif
#define bswap64(v) __builtin_bswap64(v)
#define bswap32(v) __builtin_bswap32(v)
#if __GNUC_PREREQ(4, 8) || __has_builtin(__builtin_bswap16)
#define bswap16(v) __builtin_bswap16(v)
#endif

#elif defined(_MSC_VER)

#if _MSC_FULL_VER < 190024215
#error At least "Microsoft C/C++ Compiler" version 19.00.24215 (Visual Studio 2015 Update 3) is required.
#endif
#if _MSC_FULL_VER < 190024218
#pragma message(                                                               \
    "It is recommended to use \"Microsoft C/C++ Compiler\" version 19.00.24218.1 (Visual Studio 2015 Update 5) or newer.")
{'fraction_non_alphanumeric': 0.1385057471264368, 'fraction_numerical': 0.04252873563218391, 'mean_word_length': 3.3731155778894473, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1585129', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1062, 'n_words': 395}