<commit_before>/*  This file is part of the Vc library.

    Copyright (C) 2009-2012 <NAME> <<EMAIL>>

    Vc is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
    published by the Free Software Foundation, either version 3 of
    the License, or (at your option) any later version.

    Vc is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with Vc.  If not, see <http://www.gnu.org/licenses/>.

*/

/**
 * default constructor
 *
 * Leaves the mask uninitialized.
 */
MASK_TYPE();

/**
 * Constructs a mask with the entries initialized to zero.
 */
explicit MASK_TYPE(Vc::Zero);

/**
 * Constructs a mask with the entries initialized to one.
 */
explicit MASK_TYPE(Vc::One);

/**
 * Constructs a mask with the entries initialized to
 * \li one if \p b is \p true
 * \li zero if \p b is \p false
 *
 * \param b Determines the initial state of the mask.
 */
explicit MASK_TYPE(bool b);

/**
 * Standard copy constructor
 */
MASK_TYPE(const MASK_TYPE &);

/**
 * Constructs a mask object from a mask of different size/type.
 */
template<typename OtherMask> MASK_TYPE(const OtherMask &);

/**
 * Returns whether the two masks are equal in all entries.
 */
bool operator==(const MASK_TYPE &) const;

/**
 * Returns whether the two masks differ in at least one entry.
 */
bool operator!=(const MASK_TYPE &) const;

/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) AND operation.
 */
MASK_TYPE operator&&(const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) AND operation.
 */
MASK_TYPE operator& (const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) OR operation.
 */
MASK_TYPE operator||(const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) OR operation.
 */
MASK_TYPE operator| (const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) XOR operation.
 */
MASK_TYPE operator^ (const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) NOT operation.
 */
MASK_TYPE operator! () const;
/**
 * Modify the mask per-entry using a logical (in this case same as bitwise) AND operation.
 */
MASK_TYPE operator&=(const MASK_TYPE &);
/**
 * Modify the mask per-entry using a logical (in this case same as bitwise) OR operation.
 */
MASK_TYPE operator|=(const MASK_TYPE &);

/**
 * Return whether all entries of the mask are one.
 */
bool isFull() const;
/**
 * Return whether all entries of the mask are zero.
 */
bool isEmpty() const;
/**
 * Return whether the mask is neither full nor empty.
 */
bool isMix() const;

/**
 * Cast to bool operator. Returns the same as isFull().
 *
 * \warning Be careful with the cast to bool. Often it is better to write explicitly whether you
 * want isFull or !isEmpty or something else. If you define VC_NO_AUTOMATIC_BOOL_FROM_MASK this
 * operator will be disabled, requiring you to explicitly reduce masks to bools.
 */
operator bool() const;

/**
 * Read-only access to mask entries.
 *
 * \param i Determines the boolean to be accessed.
 * \return the \p i th entry of the mask as a bool.
 */
bool operator[](int i) const;

/**
 * Return how many entries of the mask are set to one.
 */
int count() const;

/**
 * Returns the index of the first one in the mask.
 */
int firstOne() const;

/**
 * Convert mask to an integer.
 *
 * \return An int where each bit corresponds to the boolean value in the mask.
 *
 * E.g. a mask like [true, false, false, true] would result in a 9 (in binary: 1001).
 */
int toInt() const;
<commit_msg>document Mask::Size, Mask implicit and explicit conversions, and load / store<commit_after>/*  This file is part of the Vc library.

    Copyright (C) 2009-2012 <NAME> <<EMAIL>>

    Vc is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
    published by the Free Software Foundation, either version 3 of
    the License, or (at your option) any later version.

    Vc is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with Vc.  If not, see <http://www.gnu.org/licenses/>.

*/

/**
 * Denotes the size of the mask (the number of entries).
 */
static constexpr size_t Size;

/**
 * default constructor
 *
 * Leaves the mask uninitialized.
 */
MASK_TYPE();

/**
 * Constructs a mask with the entries initialized to zero.
 */
explicit MASK_TYPE(Vc::Zero);

/**
 * Constructs a mask with the entries initialized to one.
 */
explicit MASK_TYPE(Vc::One);

/**
 * Constructs a mask with the entries initialized to
 * \li one if \p b is \p true
 * \li zero if \p b is \p false
 *
 * \param b Determines the initial state of the mask.
 */
explicit MASK_TYPE(bool b);

/**
 * Standard copy constructor
 */
MASK_TYPE(const MASK_TYPE &);

/**
 * Implicit conversion from a compatible mask object.
 */
template<typename OtherMask> MASK_TYPE(const OtherMask &);

/**
 * Explicit conversion (static_cast) from a mask object that potentially has a different \ref Size.
 */
template<typename OtherMask> explicit MASK_TYPE(const OtherMask &);

/**
 * Explicit conversion from an array of bool to a mask object.
 * This corresponds to a vector load.
 */
explicit MASK_TYPE(const bool *mem);

/**
 * Load the values of the mask from an array of bool.
 */
void load(const bool *mem);

/**
 * Store the values of the mask to an array of bool.
 */
void store(bool *) const;

/**
 * Returns whether the two masks are equal in all entries.
 */
bool operator==(const MASK_TYPE &) const;

/**
 * Returns whether the two masks differ in at least one entry.
 */
bool operator!=(const MASK_TYPE &) const;

/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) AND operation.
 */
MASK_TYPE operator&&(const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) AND operation.
 */
MASK_TYPE operator& (const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) OR operation.
 */
MASK_TYPE operator||(const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) OR operation.
 */
MASK_TYPE operator| (const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) XOR operation.
 */
MASK_TYPE operator^ (const MASK_TYPE &) const;
/**
 * Return the per-entry resulting mask of a logical (in this case same as bitwise) NOT operation.
 */
MASK_TYPE operator! () const;
/**
 * Modify the mask per-entry using a logical (in this case same as bitwise) AND operation.
 */
MASK_TYPE operator&=(const MASK_TYPE &);
/**
 * Modify the mask per-entry using a logical (in this case same as bitwise) OR operation.
 */
MASK_TYPE operator|=(const MASK_TYPE &);

/**
 * Return whether all entries of the mask are one.
 */
bool isFull() const;
/**
 * Return whether all entries of the mask are zero.
 */
bool isEmpty() const;
/**
 * Return whether the mask is neither full nor empty.
 */
bool isMix() const;

/**
 * Cast to bool operator. Returns the same as isFull().
 *
 * \warning Be careful with the cast to bool. Often it is better to write explicitly whether you
 * want isFull or !isEmpty or something else. If you define VC_NO_AUTOMATIC_BOOL_FROM_MASK this
 * operator will be disabled, requiring you to explicitly reduce masks to bools.
 */
operator bool() const;

/**
 * Read-only access to mask entries.
 *
 * \param i Determines the boolean to be accessed.
 * \return the \p i th entry of the mask as a bool.
 */
bool operator[](int i) const;

/**
 * Return how many entries of the mask are set to one.
 */
int count() const;

/**
 * Returns the index of the first one in the mask.
 */
int firstOne() const;

/**
 * Convert mask to an integer.
 *
 * \return An int where each bit corresponds to the boolean value in the mask.
 *
 * E.g. a mask like [true, false, false, true] would result in a 9 (in binary: 1001).
 */
int toInt() const;

{'fraction_non_alphanumeric': 0.09705511630571789, 'fraction_numerical': 0.003208433596883236, 'mean_word_length': 3.403632694248234, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4118464', 'n_tokens_mistral': 2535, 'n_tokens_neox': 2498, 'n_words': 1223}