Click here to Skip to main content
15,886,110 members
Articles / Programming Languages / Visual C++ 9.0

SFMT in Action: Part I – Generating a DLL Including SSE2 Support

Rate me:
Please Sign up or sign in to vote.
4.45/5 (4 votes)
28 Apr 2009CPOL22 min read 68.5K   741   21  
An approach for using the SFMT (SIMD-oriented Fast Mersenne Twister) random number generator algorithm.
/** 
 * modified by Emre �zg�r �nce (emre_lineus@yahoo.com)
 *
 * Original implementation: 	
 * Mutsuo Saito (Hiroshima University) and Makoto Matsumoto (Hiroshima University)
 * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
 * University. All rights reserved.
 * The (modified) BSD License is applied to this software, see Original License/LICENSE.txt
 */

#ifndef SFMT_PARAMS216091_H
#define SFMT_PARAMS216091_H

#define POS1	627
#define SL1	11
#define SL2	3
#define SR1	10
#define SR2	1
#define MSK1	0xbff7bff7U
#define MSK2	0xbfffffffU
#define MSK3	0xbffffa7fU
#define MSK4	0xffddfbfbU
#define PARITY1	0xf8000001U
#define PARITY2	0x89e80709U
#define PARITY3	0x3bd2b64bU
#define PARITY4	0x0c64b1e4U

#define IDSTR	"SFMT-216091:627-11-3-10-1:bff7bff7-bfffffff-bffffa7f-ffddfbfb"

#endif /* SFMT_PARAMS216091_H */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Parola Bilgi Teknolojileri Ltd.
Turkey Turkey
He was born in Bursa, Turkey in 1979, and still lives in this fascinating place.

He started programming with Fortran when he was at university and then has experienced with MS Visual Basic, Borland Delphi, Java, C++ and C#.

He developed database based several client-server and multi-tier applications using OO concepts and OOP. He worked with Oracle, MySQL, MSSQL and Firebird RDBMS.

In the past, he worked on freetime image processing projects using OpenGL, DirectX, SDL technologies. He's interested in encryption/decryption and compression/decompression algorithms, random number generators and computational algorithms such as Monte Carlo Methods.

In 2011, he founded Parola Information Technology Ltd.

http://www.markanabak.com.tr is serviced by Parola Information Technology Ltd. It's a SAAS model for Intellectual Property sector.

Comments and Discussions