<commit_before>/* snoise3.c
 *
 * This header comment added by <NAME> <<EMAIL>> on 2012-03-25.
 *
 * This is a smooth noise generation routine developed by "FeepingCreature"
 * and released on GitHub under the BSD license, with modifications by
 * <NAME>.
 *
 * The full text of the license which was included with the code has been
 * included below. The original source code is available on GitHub at:
 * <http://github.com/FeepingCreature/SimplexNoise>
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain this list of conditions
 *       and the following disclaimer.
 *     * Redistributions in binary form must reproduce this list of conditions
 *       and the following disclaimer in the documentation and/or other
 *       materials provided with the distribution.
 *     * The names of its contributors may not be used to endorse or
 *       promote products derived from this software without specific
 *       prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include <xmmintrin.h>
#include <emmintrin.h>
#include "snoise3.h"

typedef float v4sf __attribute__ ((vector_size (16)));
typedef int v4si __attribute__ ((vector_size (16)));

struct NoiseContext {
    int offsets[8][2][4];
    unsigned char *perm, *mperm; // perm mod 12
};

#define LET(A, B) typeof(B) A = B


static v4sf vec4f(float a, float b, float c, float d) {
    return (v4sf) _mm_set_ps(d, c, b, a);
}

static v4sf vec1_4f(float f) {
    return (v4sf) _mm_set1_ps(f);
}<commit_msg>Suppress warning about loss of precision in snoise3.c.<commit_after>/* snoise3.c
 *
 * This header comment added by <NAME> <<EMAIL>> on 2012-03-25.
 *
 * This is a smooth noise generation routine developed by "FeepingCreature"
 * and released on GitHub under the BSD license, with modifications by
 * <NAME>.
 *
 * The full text of the license which was included with the code has been
 * included below. The original source code is available on GitHub at:
 * <http://github.com/FeepingCreature/SimplexNoise>
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain this list of conditions
 *       and the following disclaimer.
 *     * Redistributions in binary form must reproduce this list of conditions
 *       and the following disclaimer in the documentation and/or other
 *       materials provided with the distribution.
 *     * The names of its contributors may not be used to endorse or
 *       promote products derived from this software without specific
 *       prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#pragma GCC diagnostic ignored "-Wconversion"

#include <xmmintrin.h>
#include <emmintrin.h>
#include "snoise3.h"

typedef float v4sf __attribute__ ((vector_size (16)));
typedef int v4si __attribute__ ((vector_size (16)));

struct NoiseContext {
    int offsets[8][2][4];
    unsigned char *perm, *mperm; // perm mod 12
};

#define LET(A, B) typeof(B) A = B


static v4sf vec4f(float a, float b, float c, float d) {
    return (v4sf) _mm_set_ps(d, c, b, a);
}

static v4sf vec1_4f(float f) {
    return (v4sf) _mm_set1_ps(f);
}
{'fraction_non_alphanumeric': 0.07326158940397351, 'fraction_numerical': 0.012210264900662252, 'mean_word_length': 3.946775844421699, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '192582', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1280, 'n_words': 638}