<commit_before>// Copyright (C) 2012 <NAME>
#ifndef RANDOM_H
#define RANDOM_H

#include <glm/glm.hpp>

#if defined(USE_SSE2)
#    include <pmmintrin.h>
#else
#    include <stdint.h>
#endif

class Random
{
public:
    Random(unsigned seed = 0715517);

    void setSeed(unsigned seed);

    /**
     *  Generates a vector of random numbers with approximately uniform
     *  distribution [-1..1]
     */
    glm::vec4 generate();

    glm::vec3 generateSpherical();
private:
#if defined(USE_SSE2)
    __m128i m_state;
#else
    uint32_t m_high;
    uint32_t m_low;
#endif
} __attribute__((aligned(16)));

#endif // RANDOM_H
<commit_msg>alignas() isn't widely supported yet<commit_after>// Copyright (C) 2012 <NAME>
#ifndef RANDOM_H
#define RANDOM_H

#include <glm/glm.hpp>

#if defined(USE_SSE2)
#    include <pmmintrin.h>
#else
#    include <stdint.h>
#endif

// TODO: Use alignas(__m128i) once the compilers support it
class Random
{
public:
    Random(unsigned seed = 0715517);

    void setSeed(unsigned seed);

    /**
     *  Generates a vector of random numbers with approximately uniform
     *  distribution [-1..1]
     */
    glm::vec4 generate();

    glm::vec3 generateSpherical();
private:
#if defined(USE_SSE2)
    __m128i m_state;
#else
    uint32_t m_high;
    uint32_t m_low;
#endif
} __attribute__((aligned(16)));

#endif // RANDOM_H

{'fraction_non_alphanumeric': 0.12435233160621761, 'fraction_numerical': 0.04071058475203553, 'mean_word_length': 3.506666666666667, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '7511990', 'n_tokens_mistral': 539, 'n_tokens_neox': 499, 'n_words': 126}