<commit_before>#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>

#include <cpuinfo.h>
#include <x86/api.h>
#include <cpuinfo/internal-api.h>
#include <cpuinfo/log.h>

#include <Windows.h>

#ifdef __GNUC__
  #define CPUINFO_ALLOCA __builtin_alloca
#else
  #define CPUINFO_ALLOCA _alloca
#endif


static inline uint32_t bit_mask(uint32_t bits) {
	return (UINT32_C(1) << bits) - UINT32_C(1);
}

static inline uint32_t low_index_from_kaffinity(KAFFINITY kaffinity) {
	#if defined(_M_X64) || defined(_M_AMD64)
		unsigned long index;
		_BitScanForward64(&index, (unsigned __int64) kaffinity);
		return (uint32_t) index;
	#elif defined(_M_IX86)
		unsigned long index;
		_BitScanForward(&index, (unsigned long) kaffinity);
		return (uint32_t) index;
	#else
		#error Platform-specific implementation required<commit_msg>Fix build on MinGW + Linux cross-compile<commit_after>#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>

#include <cpuinfo.h>
#include <x86/api.h>
#include <cpuinfo/internal-api.h>
#include <cpuinfo/log.h>

#if defined(__MINGW32__)
// Windows header filename must be all lower case on MinGW
#include <windows.h>
#else
#include <Windows.h>
#endif

#ifdef __GNUC__
  #define CPUINFO_ALLOCA __builtin_alloca
#else
  #define CPUINFO_ALLOCA _alloca
#endif


static inline uint32_t bit_mask(uint32_t bits) {
	return (UINT32_C(1) << bits) - UINT32_C(1);
}

static inline uint32_t low_index_from_kaffinity(KAFFINITY kaffinity) {
	#if defined(_M_X64) || defined(_M_AMD64)
		unsigned long index;
		_BitScanForward64(&index, (unsigned __int64) kaffinity);
		return (uint32_t) index;
	#elif defined(_M_IX86)
		unsigned long index;
		_BitScanForward(&index, (unsigned long) kaffinity);
		return (uint32_t) index;
	#else
		#error Platform-specific implementation required
{'fraction_non_alphanumeric': 0.11645708037178787, 'fraction_numerical': 0.03171131765992345, 'mean_word_length': 5.8283582089552235, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1643922', 'n_tokens_mistral': 742, 'n_tokens_neox': 678, 'n_words': 164}