<commit_before>#pragma once
//  bitblock.hpp : bitblock class
//
// Copyright (C) 2017-2018 Stillwater Supercomputing, Inc.
//
// This file is part of the universal numbers project, which is released under an MIT Open Source license.

#include <sstream>

// this should be removed when we have made the transition away from std::bitset to sw::unum::bitblock
#include <cassert>
#include "ubb.h"


namespace sw {
	namespace unum {

		/**
		 @brief templated class implementing efficient multi-precision binary arithmetic and logic
		 */
		template<size_t nbits>
		class bitblock : public universal_bitset::bitset<nbits> {
		public:
			bitblock() {
				setzero();
			}

			bitblock(const bitblock&) = default;
			bitblock(bitblock&&) = default;
			bitblock& operator=(const bitblock&) = default;
			bitblock& operator=(bitblock&&) = default;

			// assignment operators for native types
			bitblock& operator=(const signed char rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const short rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const int rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const long rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const long long rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const char rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const unsigned short rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const unsigned int rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const unsigned long rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }
			bitblock& operator=(const unsigned long long rhs) { return (bitblock&)universal_bitset::bitset<nbits>::operator=(rhs); }

			unsigned long long to_ullong() const {
				return this->M_do_to_ullong();
			}

			void setzero() {
				universal_bitset::bitset<nbits>::reset();<commit_msg>code hygiene<commit_after>#pragma once
//  bitblock.hpp : bitblock class
//
// Copyright (C) 2017-2018 Stillwater Supercomputing, Inc.
//
// This file is part of the universal numbers project, which is released under an MIT Open Source license.

#include <sstream>

// this should be removed when we have made the transition away from std::bitset to sw::unum::bitblock
#include <cassert>
#include "ubb.h"


namespace sw {
	namespace unum {

		/**
		 @brief templated class implementing efficient multi-precision binary arithmetic and logic
		 */
		template<size_t nbits>
		class bitblock : public universal_bitset::bitset<nbits> {
		public:
			bitblock() {
				setzero();
			}

			bitblock(const bitblock&) = default;
			bitblock(bitblock&&) = default;
			bitblock& operator=(const bitblock&) = default;
			bitblock& operator=(bitblock&&) = default;

			// assignment operators for native types
			bitblock& operator=(signed char rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this; }
			bitblock& operator=(short rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this;	}
			bitblock& operator=(int rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this; }
			bitblock& operator=(long rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this; }
			bitblock& operator=(long long rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this;	}
			bitblock& operator=(char rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this; }
			bitblock& operator=(unsigned short rhs) {universal_bitset::bitset<nbits>::operator=(rhs); return *this; }
			bitblock& operator=(unsigned int rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this; }
			bitblock& operator=(unsigned long rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this;	}
			bitblock& operator=(unsigned long long rhs) { universal_bitset::bitset<nbits>::operator=(rhs); return *this; }

			unsigned long long to_ullong() const {
				return this->M_do_to_ullong();
			}

			void setzero() {
				universal_bitset::bitset<nbits>::reset();
{'fraction_non_alphanumeric': 0.13972985561248252, 'fraction_numerical': 0.0037261294829995344, 'mean_word_length': 5.517450682852807, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, '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': '3005713', 'n_tokens_mistral': 1444, 'n_tokens_neox': 1304, 'n_words': 334}