<commit_before>//..............................................................................
//
//  This file is part of the AXL library.
//
//  AXL is distributed under the MIT license.
//  For details see accompanying license.txt file,
//  the public copy of which is also available at:
//  http://tibbo.com/downloads/archive/axl/license.txt
//
//..............................................................................

#pragma once

#define _AXL_G_PCH_H

#ifndef __cplusplus
#	error AXL library requires a C++ compiler
#endif

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

// 1) detect build/target environment section

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

// detect C++ compiler

#ifdef _MSC_VER
#	define _AXL_CPP_MSC 1
#	define _AXL_CPP_MSC_VERSION_MAJOR (_MSC_VER / 100)
#	define _AXL_CPP_MSC_VERSION_MINOR (_MSC_VER % 100)
#	define _AXL_CPP_MSC_VERSION (((_MSC_VER / 100) << 8) | (_MSC_VER % 100))
#	define AXL_CPP_STRING "Microsoft Visual C++"
#elif (defined __GNUC__)
#	define _AXL_CPP_GCC 1
#	define _AXL_CPP_GCC_VERSION_MAJOR __GNUC__
#	define _AXL_CPP_GCC_VERSION_MINOR __GNUC_MINOR__
#	define _AXL_CPP_GCC_VERSION ((__GNUC__ << 8) | __GNUC_MINOR__)
#	ifdef __clang__
#		define _AXL_CPP_CLANG 1
#		define _AXL_CPP_CLANG_VERSION_MAJOR __clang_major__
#		define _AXL_CPP_CLANG_VERSION_MINOR __clang_minor__
#		define _AXL_CPP_CLANG_VERSION ((__clang_major__ << 8) | __clang_minor__)
#		define AXL_CPP_STRING "Clang/LLVM"
#	elif (defined __ICC)
#		define _AXL_CPP_ICC 1
#		define _AXL_CPP_ICC_VERSION_MAJOR (__ICC / 100)
#		define _AXL_CPP_ICC_VERSION_MINOR (__ICC % 100)
#		define _AXL_CPP_ICC_VERSION (((__ICC / 100) << 8) | (__ICC % 100))
#		define AXL_CPP_STRING "Intel C++"
#	else
#		define AXL_CPP_STRING "GNU C++"
#	endif
#else
#	error unsupported C++ compiler
#endif

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

// detect CPU architecture

#if (_AXL_CPP_MSC)
#	if (defined _M_IX86)
#		define _AXL_CPU_X86 1
#	elif (defined _M_AMD64)
#		define _AXL_CPU_AMD64 1
#	endif
#elif (_AXL_CPP_GCC)
#	if defined __i386__
#		define _AXL_CPU_X86 1
#	elif (defined __amd64__)
#		define _AXL_CPU_AMD64 1
#	endif
#endif

#if (_AXL_CPU_X86)
#	define AXL_CPU_STRING  "x86"
#	define AXL_PTR_SIZE    4
#elif (_AXL_CPU_AMD64)
#	define AXL_CPU_STRING  "amd64"
#	define AXL_PTR_SIZE    8
#else
#	error unsupported CPU architecture
#endif

#define AXL_PTR_BITS (AXL_PTR_SIZE * 8) // often times it's more natural to use bit size

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

// detect OS
<commit_msg>[axl_g] added defines and detection for ARM32/64<commit_after>//..............................................................................
//
//  This file is part of the AXL library.
//
//  AXL is distributed under the MIT license.
//  For details see accompanying license.txt file,
//  the public copy of which is also available at:
//  http://tibbo.com/downloads/archive/axl/license.txt
//
//..............................................................................

#pragma once

#define _AXL_G_PCH_H

#ifndef __cplusplus
#	error AXL library requires a C++ compiler
#endif

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

// 1) detect build/target environment section

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

// detect C++ compiler

#ifdef _MSC_VER
#	define _AXL_CPP_MSC 1
#	define _AXL_CPP_MSC_VERSION_MAJOR (_MSC_VER / 100)
#	define _AXL_CPP_MSC_VERSION_MINOR (_MSC_VER % 100)
#	define _AXL_CPP_MSC_VERSION (((_MSC_VER / 100) << 8) | (_MSC_VER % 100))
#	define AXL_CPP_STRING "Microsoft Visual C++"
#elif (defined __GNUC__)
#	define _AXL_CPP_GCC 1
#	define _AXL_CPP_GCC_VERSION_MAJOR __GNUC__
#	define _AXL_CPP_GCC_VERSION_MINOR __GNUC_MINOR__
#	define _AXL_CPP_GCC_VERSION ((__GNUC__ << 8) | __GNUC_MINOR__)
#	ifdef __clang__
#		define _AXL_CPP_CLANG 1
#		define _AXL_CPP_CLANG_VERSION_MAJOR __clang_major__
#		define _AXL_CPP_CLANG_VERSION_MINOR __clang_minor__
#		define _AXL_CPP_CLANG_VERSION ((__clang_major__ << 8) | __clang_minor__)
#		define AXL_CPP_STRING "Clang/LLVM"
#	elif (defined __ICC)
#		define _AXL_CPP_ICC 1
#		define _AXL_CPP_ICC_VERSION_MAJOR (__ICC / 100)
#		define _AXL_CPP_ICC_VERSION_MINOR (__ICC % 100)
#		define _AXL_CPP_ICC_VERSION (((__ICC / 100) << 8) | (__ICC % 100))
#		define AXL_CPP_STRING "Intel C++"
#	else
#		define AXL_CPP_STRING "GNU C++"
#	endif
#else
#	error unsupported C++ compiler
#endif

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

// detect CPU architecture

#if (_AXL_CPP_MSC)
#	if (defined _M_IX86)
#		define _AXL_CPU_X86 1
#	elif (defined _M_AMD64)
#		define _AXL_CPU_AMD64 1
#	elif (defined _M_ARM)
#		define _AXL_CPU_ARM32 1
#	elif (defined _M_ARM64)
#		define _AXL_CPU_ARM64 1
#	endif
#elif (_AXL_CPP_GCC)
#	if defined __i386__
#		define _AXL_CPU_X86 1
#	elif (defined __amd64__)
#		define _AXL_CPU_AMD64 1
#	elif (defined __arm__)
#		define _AXL_CPU_ARM32 1
#	elif (defined __aarch64__)
#		define _AXL_CPU_ARM64 1
#	endif
#endif

#if (_AXL_CPU_X86)
#	define AXL_CPU_STRING  "x86"
#	define AXL_PTR_SIZE    4
#elif (_AXL_CPU_AMD64)
#	define AXL_CPU_STRING  "amd64"
#	define AXL_PTR_SIZE    8
#elif (_AXL_CPU_ARM32)
#	define AXL_CPU_STRING  "arm32"
#	define AXL_PTR_SIZE    4
#elif (_AXL_CPU_ARM64)
#	define AXL_CPU_STRING  "arm64"
#	define AXL_PTR_SIZE    8
#else
#	error unsupported CPU architecture
#endif

#define AXL_PTR_BITS (AXL_PTR_SIZE * 8) // often times it's more natural to use bit size

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

// detect OS

{'fraction_non_alphanumeric': 0.20251177394034536, 'fraction_numerical': 0.027908599337170766, 'mean_word_length': 2.4835965978128796, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7627066', 'n_tokens_mistral': 2476, 'n_tokens_neox': 2250, 'n_words': 492}