Click here to Skip to main content
15,885,141 members
Articles / Programming Languages / C#

SFMT in Action: Part II – Object oriented implementation of SIMD-oriented Fast Mersenne Twister (SFMT) in C#

Rate me:
Please Sign up or sign in to vote.
4.71/5 (5 votes)
31 Oct 2009CPOL18 min read 46.9K   620   9  
The new SIMD-oriented Fast Mersenne Twister (SFMT) library was developed using object oriented technologies such as UML, composition, aggregation, generalization, multiplicity, and Design Patterns.
/** 
 * 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_PARAMS19937_H
#define SFMT_PARAMS19937_H

#define POS1	122
#define SL1	18
#define SL2	1
#define SR1	11
#define SR2	1
#define MSK1	0xdfffffefU
#define MSK2	0xddfecb7fU
#define MSK3	0xbffaffffU
#define MSK4	0xbffffff6U
#define PARITY1	0x00000001U
#define PARITY2	0x00000000U
#define PARITY3	0x00000000U
#define PARITY4	0x13c9e684U

#define IDSTR	"SFMT-19937:122-18-1-11-1:dfffffef-ddfecb7f-bffaffff-bffffff6"

#endif /* SFMT_PARAMS19937_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