<commit_before>#pragma once

#include "immintrin.h"
#include <array>

// Basic support for bitsets
typedef std::array<uint64_t, 2>  bitset128_t;
//typedef __m128  bitset128_t;

// Set to true i-th bit of bitset sets bs
inline void set_bit(bitset128_t& bs, uint64_t i) {
   if (i < 64)
      bs[0] |= (uint64_t)1 << i; // _mm_slli_si128 (r := a << (imm * 8)) // _mm_sll_epi64 ??
   else
      bs[1] |= (uint64_t)1 << (i - 64);
   // branchless
//  bool b = (i > 64);
   // bs[b] |= (uint64_t)1 << (i - 64 * b);
}

// Reset to true i-th bit of bitsetsets bs
inline void reset_bit(bitset128_t& bs, uint64_t i) {
   if (i < 64)
      bs[0] &= ~(uint64_t)1 << i; // _mm_slli_si128 (r := a << (imm * 8)) // _mm_sll_epi64 ??
   else
      bs[1] &= ~(uint64_t)1 << (i - 64);
}

// Set to true all bits of bitset bs
inline void set_bits(bitset128_t& bs) {
   bs[0] = (uint64_t)~0; // Complement of 000....00
   bs[1] = (uint64_t)~0;
}

// Set to false all bits of bitset bs
inline void reset_bits(bitset128_t& bs) {
   //bs = _mm_setzero_ps();
   bs[0] = (uint64_t)0; // Complement of 000....00
   bs[1] = (uint64_t)0;
}
<commit_msg>Compatibility solved with KNL server<commit_after>#pragma once

#include "immintrin.h"
#include <array>

// Basic support for bitsets
typedef std::array<uint64_t, 2>  bitset128_t;
//typedef __m128  bitset128_t;

// Set to true i-th bit of bitset sets bs
inline void set_bit(bitset128_t& bs, uint64_t i) {
	if(true) {
		if (i < 64)
			bs[0] |= (uint64_t)1 << i; // _mm_slli_si128 (r := a << (imm * 8)) // _mm_sll_epi64 ??
		else
			bs[1] |= (uint64_t)1 << (i - 64);
		// branchless
		//  bool b = (i > 64);
		// bs[b] |= (uint64_t)1 << (i - 64 * b);
		//
	} else {
		// branchless
		int idx = i / 64;
		int v = i % 64;
		bs[idx] |= (uint64_t)1 << v;
	}
}

// Reset to true i-th bit of bitsetsets bs
inline void reset_bit(bitset128_t& bs, uint64_t i) {
	if(true) {
		if (i < 64)
			bs[0] &= ~(uint64_t)1 << i; // _mm_slli_si128 (r := a << (imm * 8)) // _mm_sll_epi64 ??
		else
			bs[1] &= ~(uint64_t)1 << (i - 64);
	} else {
		int idx = i / 64;
		int v = i % 64;
		bs[idx] &= ~(uint64_t)1 << v;
	}
}

// Set to true all bits of bitset bs
inline void set_bits(bitset128_t& bs) {
   bs[0] = (uint64_t)~0; // Complement of 000....00
   bs[1] = (uint64_t)~0;
}

// Set to false all bits of bitset bs
inline void reset_bits(bitset128_t& bs) {
   //bs = _mm_setzero_ps();
   bs[0] = (uint64_t)0; // Complement of 000....00
   bs[1] = (uint64_t)0;
}

{'fraction_non_alphanumeric': 0.18296146044624748, 'fraction_numerical': 0.08438133874239351, 'mean_word_length': 2.7591463414634148, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 9, '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': '4472926', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1096, 'n_words': 291}