Blender  V3.3
Namespaces | Macros | Variables
RandGen.cpp File Reference

Pseudo-random number generator. More...

#include "RandGen.h"

Go to the source code of this file.

Namespaces

 Freestyle
 inherits from class Rep
 

Macros

#define N   16
 
#define MASK   ((unsigned)(1 << (N - 1)) + (1 << (N - 1)) - 1)
 
#define X0   0x330E
 
#define X1   0xABCD
 
#define X2   0x1234
 
#define A0   0xE66D
 
#define A1   0xDEEC
 
#define A2   0x5
 
#define C   0xB
 
#define LOW(x)   ((unsigned)(x)&MASK)
 
#define HIGH(x)   LOW((x) >> N)
 
#define MUL(x, y, z)
 
#define CARRY(x, y)   ((unsigned long)((long)(x) + (long)(y)) > MASK)
 
#define ADDEQU(x, y, z)   (z = CARRY(x, (y)), x = LOW(x + (y)))
 
#define SET3(x, x0, x1, x2)   ((x)[0] = (x0), (x)[1] = (x1), (x)[2] = (x2))
 
#define SEED(x0, x1, x2)   (SET3(x, x0, x1, x2), SET3(a, A0, A1, A2), c = C)
 

Variables

static unsigned Freestyle::x [3]
 
static unsigned Freestyle::a [3]
 
static unsigned Freestyle::c = C
 

Detailed Description

Pseudo-random number generator.

Definition in file RandGen.cpp.

Macro Definition Documentation

◆ A0

#define A0   0xE66D

Definition at line 22 of file RandGen.cpp.

◆ A1

#define A1   0xDEEC

Definition at line 23 of file RandGen.cpp.

◆ A2

#define A2   0x5

Definition at line 24 of file RandGen.cpp.

◆ ADDEQU

#define ADDEQU (   x,
  y,
  z 
)    (z = CARRY(x, (y)), x = LOW(x + (y)))

Definition at line 42 of file RandGen.cpp.

◆ C

#define C   0xB

Definition at line 25 of file RandGen.cpp.

◆ CARRY

#define CARRY (   x,
  y 
)    ((unsigned long)((long)(x) + (long)(y)) > MASK)

Definition at line 41 of file RandGen.cpp.

◆ HIGH

#define HIGH (   x)    LOW((x) >> N)

Definition at line 31 of file RandGen.cpp.

◆ LOW

#define LOW (   x)    ((unsigned)(x)&MASK)

Definition at line 30 of file RandGen.cpp.

◆ MASK

#define MASK   ((unsigned)(1 << (N - 1)) + (1 << (N - 1)) - 1)

Definition at line 18 of file RandGen.cpp.

◆ MUL

#define MUL (   x,
  y,
  z 
)
Value:
{ \
long l = (long)(x) * (long)(y); \
(z)[0] = LOW(l); \
(z)[1] = HIGH(l); \
} \
((void)0)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define LOW(x)
Definition: RandGen.cpp:30
#define HIGH(x)
Definition: RandGen.cpp:31
ATTR_WARN_UNUSED_RESULT const BMLoop * l
SyclQueue void void size_t num_bytes void
static unsigned x[3]
Definition: RandGen.cpp:73

Definition at line 33 of file RandGen.cpp.

◆ N

#define N   16

Definition at line 17 of file RandGen.cpp.

◆ SEED

#define SEED (   x0,
  x1,
  x2 
)    (SET3(x, x0, x1, x2), SET3(a, A0, A1, A2), c = C)

Definition at line 47 of file RandGen.cpp.

◆ SET3

#define SET3 (   x,
  x0,
  x1,
  x2 
)    ((x)[0] = (x0), (x)[1] = (x1), (x)[2] = (x2))

Definition at line 43 of file RandGen.cpp.

◆ X0

#define X0   0x330E

Definition at line 19 of file RandGen.cpp.

◆ X1

#define X1   0xABCD

Definition at line 20 of file RandGen.cpp.

◆ X2

#define X2   0x1234

Definition at line 21 of file RandGen.cpp.