<commit_before>// Libmorton - Methods to encode/decode 64-bit morton codes from/to 32-bit (x,y,z) coordinates
#ifndef MORTON2D_64_H_
#define MORTON2D_64_H_

#include <stdint.h>
#include "morton2D_LUTs.h"

#if _MSC_VER
#include <intrin.h>
#endif

// ENCODE 2D 64-bit morton code : For Loop
inline uint_fast64_t morton2D_64_Encode_for(const uint_fast32_t x, const uint_fast32_t y){
	uint_fast64_t answer = 0;
	for (uint_fast64_t i = 0; i < 32; ++i) {
		answer |= (x & (0x1 << i)) << (2 * i) | (y & (0x1 << i)) << ((2 * i) + 1);
	}
	return answer;
}

// ENCODE 2D 64-bit morton code : Magic bits (helper method)
inline uint_fast64_t morton2D_64_splitby2(const uint_fast32_t a){<commit_msg>folded 2D for<commit_after>// Libmorton - Methods to encode/decode 64-bit morton codes from/to 32-bit (x,y,z) coordinates
#ifndef MORTON2D_64_H_
#define MORTON2D_64_H_

#include <stdint.h>
#include "morton2D_LUTs.h"

#if _MSC_VER
#include <intrin.h>
#endif

template<typename morton, typename coord> inline morton morton2D_Encode_for(const coord x, const coord y);

// ENCODE 2D 64-bit morton code : For Loop
template<typename morton, typename coord>
inline morton morton2D_Encode_for(const coord x, const coord y){
	morton answer = 0;
	unsigned long checkbits = sizeof(coord)*8;
	for (uint_fast64_t i = 0; i < checkbits; ++i) {
		answer |= (x & ((morton)0x1 << i)) << (2 * i) | (y & ((morton)0x1 << i)) << ((2 * i) + 1);
	}
	return answer;
}

// ENCODE 2D 64-bit morton code : Magic bits (helper method)
inline uint_fast64_t morton2D_64_splitby2(const uint_fast32_t a){
{'fraction_non_alphanumeric': 0.13046272493573266, 'fraction_numerical': 0.05719794344473008, 'mean_word_length': 4.641304347826087, 'pattern_counts': {'":': 0, '<': 27, '<?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': '1186836', 'n_tokens_mistral': 697, 'n_tokens_neox': 633, 'n_words': 177}