15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/*
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * This file derives from SFMT 1.3.3
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html), which was
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * released under the terms of the following license:
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   Copyright (c) 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
73551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) *   University. All rights reserved.
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   Redistribution and use in source and binary forms, with or without
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   modification, are permitted provided that the following conditions are
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   met:
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *       * Redistributions of source code must retain the above copyright
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *         notice, this list of conditions and the following disclaimer.
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *       * Redistributions in binary form must reproduce the above
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *         copyright notice, this list of conditions and the following
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *         disclaimer in the documentation and/or other materials provided
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *         with the distribution.
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *       * Neither the name of the Hiroshima University nor the names of
202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) *         its contributors may be used to endorse or promote products
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *         derived from this software without specific prior written
222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) *         permission.
232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) *
242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef SFMT_PARAMS2281_H
377d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#define SFMT_PARAMS2281_H
38c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
39c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define POS1	12
40c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define SL1	19
41c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define SL2	1
42c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define SR1	5
43c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define SR2	1
44c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define MSK1	0xbff7ffbfU
45c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define MSK2	0xfdfffffeU
46c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define MSK3	0xf7ffef7fU
47c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define MSK4	0xf2f7cbbfU
48c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define PARITY1	0x00000001U
49c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define PARITY2	0x00000000U
50c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define PARITY3	0x00000000U
51c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#define PARITY4	0x41dfa600U
52c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
533551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)
54/* PARAMETERS FOR ALTIVEC */
55#if defined(__APPLE__)	/* For OSX */
56    #define ALTI_SL1	(vector unsigned int)(SL1, SL1, SL1, SL1)
57    #define ALTI_SR1	(vector unsigned int)(SR1, SR1, SR1, SR1)
58    #define ALTI_MSK	(vector unsigned int)(MSK1, MSK2, MSK3, MSK4)
59    #define ALTI_MSK64 \
60	(vector unsigned int)(MSK2, MSK1, MSK4, MSK3)
61    #define ALTI_SL2_PERM \
62	(vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8)
63    #define ALTI_SL2_PERM64 \
64	(vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0)
65    #define ALTI_SR2_PERM \
66	(vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
67    #define ALTI_SR2_PERM64 \
68	(vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
69#else	/* For OTHER OSs(Linux?) */
70    #define ALTI_SL1	{SL1, SL1, SL1, SL1}
71    #define ALTI_SR1	{SR1, SR1, SR1, SR1}
72    #define ALTI_MSK	{MSK1, MSK2, MSK3, MSK4}
73    #define ALTI_MSK64	{MSK2, MSK1, MSK4, MSK3}
74    #define ALTI_SL2_PERM	{1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8}
75    #define ALTI_SL2_PERM64	{1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0}
76    #define ALTI_SR2_PERM	{7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
77    #define ALTI_SR2_PERM64	{15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
78#endif	/* For OSX */
79#define IDSTR	"SFMT-2281:12-19-1-5-1:bff7ffbf-fdfffffe-f7ffef7f-f2f7cbbf"
80
81#endif /* SFMT_PARAMS2281_H */
82