<commit_before>/******************************************************************************\
* Project:  Standard Integer Type Definitions                                  *
* Authors:  Iconoclast                                                         *
* Release:  2014.10.17                                                         *
* License:  CC0 Public Domain Dedication                                       *
*                                                                              *
* To the extent possible under law, the author(s) have dedicated all copyright *
* and related and neighboring rights to this software to the public domain     *
* worldwide. This software is distributed without any warranty.                *
*                                                                              *
* You should have received a copy of the CC0 Public Domain Dedication along    *
* with this software.                                                          *
* If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.             *
\******************************************************************************/

#ifndef _MY_TYPES_H_
#define _MY_TYPES_H_

/*
 * Use three procedures for standard integer type definitions from C.
 *     1.  If compiling with MSVC, use Microsoft's LLP64 fixed-size types.
 *         If it's not a Microsoft compiler, it isn't using the LLP64 model.
 *     2.  If C99 or later support is found, attempt to #include <stdint.h>
 *         and to use possible C99 type definitions.  The above method for
 *         MSFT compilers has the pro of not raising subtle C89 warnings.
 *     3.  If C99 support was not found, hope for a LP64 model and the best.
 *         Even C89 regulates that short >= 16b; int >= 16b; long >= 32b.
 *
 * While not specifying [un-]signed for non-char results in signed data types
 * as per current standards, some algorithms are best read with an emphasis
 * on the actual need for sign- or zero-extension, if not indifference.
 */
#ifdef _MSC_VER

typedef __int8                  i8;
typedef signed __int8           s8;
typedef unsigned __int8         u8;

typedef __int16                 i16;
typedef signed __int16          s16;
typedef unsigned __int16        u16;

typedef __int32                 i32;
typedef signed __int32          s32;
typedef unsigned __int32        u32;

typedef __int64                 i64;
typedef signed __int64          s64;
typedef unsigned __int64        u64;

#elif (__STDC_VERSION__ >= 199901L) | !defined(__STDC_VERSION__)

#include <stdint.h>

typedef uint8_t                 u8;
typedef uint16_t                u16;
typedef uint32_t                u32;
typedef uint64_t                u64;

typedef int16_t                 i16;
typedef int32_t                 i32;
typedef int64_t                 i64;

typedef i16                     s16;
typedef i32                     s32;
typedef i64                     s64;

/*
 * Type `i8' should be neutral to signedness and representative of the
 * indifference as to whether implementations or optimizations sign or not.
 */
typedef char                    i8;
typedef int8_t                  s8;

#else

typedef char                    i8;
typedef signed char             s8;
typedef unsigned char           u8;

typedef short                   i16;
typedef signed short            s16;
typedef unsigned short          u16;

typedef int                     i32;
typedef signed int              s32;
typedef unsigned int            u32;

typedef long                    i64;
typedef signed long             s64;
typedef unsigned long           u64;

#endif

/*
 * Optimizing compilers aren't necessarily perfect compilers, but they do
 * have that extra chance of supporting explicit [anti-]inline instructions.
 */
#ifdef _MSC_VER
#define INLINE      __inline
#define NOINLINE    __declspec(noinline)
#define ALIGNED     _declspec(align(16))
#elif defined(__GNUC__)
#define INLINE      inline
#define NOINLINE    __attribute__((noinline))
#define ALIGNED     __attribute__((aligned(16)))
#else
#define INLINE
#define NOINLINE
#define ALIGNED
#endif
<commit_msg>globalize i16/i32/i64 typedef's based on s16/s32/s64<commit_after>/******************************************************************************\
* Project:  Standard Integer Type Definitions                                  *
* Authors:  Iconoclast                                                         *
* Release:  2014.12.08                                                         *
* License:  CC0 Public Domain Dedication                                       *
*                                                                              *
* To the extent possible under law, the author(s) have dedicated all copyright *
* and related and neighboring rights to this software to the public domain     *
* worldwide. This software is distributed without any warranty.                *
*                                                                              *
* You should have received a copy of the CC0 Public Domain Dedication along    *
* with this software.                                                          *
* If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.             *
\******************************************************************************/

#ifndef _MY_TYPES_H_
#define _MY_TYPES_H_

typedef char                    i8;
typedef signed char             s8;
typedef unsigned char           u8;

/*
 * Use three procedures for standard integer type definitions from C.
 *     1.  If compiling with MSVC, use Microsoft's LLP64 fixed-size types.
 *         If it's not a Microsoft compiler, it isn't using the LLP64 model.
 *     2.  If C99 or later support is found, attempt to #include <stdint.h>
 *         and to use possible C99 type definitions.  The above method for
 *         MSFT compilers has the pro of not raising subtle C89 warnings.
 *     3.  If C99 support was not found, hope for a LP64 model and the best.
 *         Even C89 regulates that short >= 16b; int >= 16b; long >= 32b.
 */
#ifdef _MSC_VER

typedef signed __int16          s16;
typedef unsigned __int16        u16;

typedef signed __int32          s32;
typedef unsigned __int32        u32;

typedef signed __int64          s64;
typedef unsigned __int64        u64;

#elif (__STDC_VERSION__ >= 199901L) | !defined(__STDC_VERSION__)

#include <stdint.h>

typedef uint16_t                u16;
typedef uint32_t                u32;
typedef uint64_t                u64;

typedef int16_t                 s16;
typedef int32_t                 s32;
typedef int64_t                 s64;

#else

typedef signed short            s16;
typedef unsigned short          u16;

typedef signed int              s32;
typedef unsigned int            u32;

typedef signed long             s64;
typedef unsigned long           u64;

#endif

/*
 * Although most types are signed by default, using `int' instead of `signed
 * int' and `i32' instead of `s32' can be preferable to denote cases where
 * the signedness of something operated on is irrelevant to the algorithm.
 */
typedef s16                     i16;
typedef s32                     i32;
typedef s64                     i64;

/*
 * Optimizing compilers aren't necessarily perfect compilers, but they do
 * have that extra chance of supporting explicit [anti-]inline instructions.
 */
#ifdef _MSC_VER
#define INLINE      __inline
#define NOINLINE    __declspec(noinline)
#define ALIGNED     _declspec(align(16))
#elif defined(__GNUC__)
#define INLINE      inline
#define NOINLINE    __attribute__((noinline))
#define ALIGNED     __attribute__((aligned(16)))
#else
#define INLINE
#define NOINLINE
#define ALIGNED
#endif

{'fraction_non_alphanumeric': 0.09497929606625259, 'fraction_numerical': 0.037525879917184264, 'mean_word_length': 1.736898016997167, 'pattern_counts': {'":': 0, '<': 9, '<?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': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3649393', 'n_tokens_mistral': 2181, 'n_tokens_neox': 1831, 'n_words': 746}