Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
SFMT-common.h File Reference

SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom number generator with jump function. This file includes common functions used in random number generation and jump. More...

#include "SFMT.h"
Include dependency graph for SFMT-common.h:

Go to the source code of this file.

Macros

#define SFMT_COMMON_H

Functions

static void do_recursion (w128_t *r, w128_t *a, w128_t *b, w128_t *c, w128_t *d)
static void rshift128 (w128_t *out, w128_t const *in, int shift)
static void lshift128 (w128_t *out, w128_t const *in, int shift)

Detailed Description

SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom number generator with jump function. This file includes common functions used in random number generation and jump.

Author
Mutsuo Saito (Hiroshima University)
Makoto Matsumoto (The University of Tokyo)

Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University and The University of Tokyo. All rights reserved.

The 3-clause BSD License is applied to this software, see LICENSE.txt

Macro Definition Documentation

◆ SFMT_COMMON_H

#define SFMT_COMMON_H

Function Documentation

◆ do_recursion()

void do_recursion ( w128_t * r,
w128_t * a,
w128_t * b,
w128_t * c,
w128_t * d )
inlinestatic

This function represents the recursion formula.

Parameters
routput
aa 128-bit part of the internal state array
ba 128-bit part of the internal state array
ca 128-bit part of the internal state array
da 128-bit part of the internal state array
Here is the call graph for this function:

◆ lshift128()

void lshift128 ( w128_t * out,
w128_t const * in,
int shift )
inlinestatic

This function simulates SIMD 128-bit left shift by the standard C. The 128-bit integer given in in is shifted by (shift * 8) bits. This function simulates the LITTLE ENDIAN SIMD.

Parameters
outthe output of this function
inthe 128-bit data to be shifted
shiftthe shift value
Here is the caller graph for this function:

◆ rshift128()

void rshift128 ( w128_t * out,
w128_t const * in,
int shift )
inlinestatic

This function simulates SIMD 128-bit right shift by the standard C. The 128-bit integer given in in is shifted by (shift * 8) bits. This function simulates the LITTLE ENDIAN SIMD.

Parameters
outthe output of this function
inthe 128-bit data to be shifted
shiftthe shift value
Here is the caller graph for this function: