X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/prng_gpu.git/blobdiff_plain/b21f8a014461c2e21ea80c2620286f1fe4c8dec2..89f2b73477c095e438e82ef0293b50414bda6cf7:/prng_gpu.tex

diff --git a/prng_gpu.tex b/prng_gpu.tex
index 3c6e281..27702e8 100644
--- a/prng_gpu.tex
+++ b/prng_gpu.tex
@@ -18,6 +18,8 @@
 \usepackage{tabularx}
 \usepackage{multirow}
 
+\usepackage{color}
+
 % Pour mathds : les ensembles IR, IN, etc.
 \usepackage{dsfont}
 
@@ -191,7 +193,11 @@ view, experiments point out a very good statistical behavior. An optimized
 original implementation of this PRNG is also proposed and experimented.
 Pseudorandom numbers are generated at a rate of 20GSamples/s, which is faster
 than in~\cite{conf/fpga/ThomasHL09,Marsaglia2003} (and with a better
-statistical behavior). Experiments are also provided using BBS as the initial
+statistical behavior). Experiments are also provided using 
+\begin{color}{red} the well-known Blum-Blum-Shub
+(BBS) 
+\end{color}
+as the initial
 random generator. The generation speed is significantly weaker.
 %Note also that an original qualitative comparison between topological chaotic
 %properties and statistical tests is also proposed.
@@ -718,6 +724,11 @@ the list of cells to update in the state $x^n$ of the system (represented
 as an integer having $\mathsf{N}$ bits too). More precisely, the $k-$th 
 component of this state (a binary digit) changes if and only if the $k-$th 
 digit in the binary decomposition of $S^n$ is 1.
+\begin{color}{red} 
+Obviously, when $S$ is periodic of period $p$, then $x$ is periodic too of
+period either $p$ or $2p$, depending of the fact that, after $p$ iterations,
+the state of the system may or not be the same than before these iterations.
+\end{color}
 
 The single basic component presented in Eq.~\ref{equation Oplus} is of 
 ordinary use as a good elementary brick in various PRNGs. It corresponds
@@ -1483,6 +1494,13 @@ then   the  memory   required   to  store all of the  internals   variables  of
 PRNGs\footnote{we multiply this number by $2$ in order to count 32-bits numbers}
 and  the pseudorandom  numbers generated by  our  PRNG,  is  equal to  $100,000\times  ((4+5+6)\times
 2+(1+100))=1,310,000$ 32-bits numbers, that is, approximately $52$Mb.
+\begin{color}{red}
+Remark that the only requirement regarding the seed regarding the security of our PRNG is
+that it must be randomly picked. Indeed, the asymptotic security of BBS guarantees
+that, as the seed length increases, no polynomial time statistical test can 
+distinguish the pseudorandom sequences from truly random sequences with non-negligible probability,
+see, \emph{e.g.},~\cite{Sidorenko:2005:CSB:2179218.2179250}.
+\end{color}
 
 This generator is able to pass the whole BigCrush battery of tests, for all
 the versions that have been tested depending on their number of threads 
@@ -1526,20 +1544,20 @@ NumThreads: Number of threads\;
 array\_comb1, array\_comb2: Arrays containing combinations of size combination\_size\;}
 
 \KwOut{NewNb: array containing random numbers in global memory}
-\If{threadId is concerned} {
-  retrieve data from InternalVarXorLikeArray[threadId] in local variables including shared memory and x\;
+\If{threadIdx is concerned} {
+  retrieve data from InternalVarXorLikeArray[threadIdx] in local variables including shared memory and x\;
   offset = threadIdx\%combination\_size\;
   o1 = threadIdx-offset+array\_comb1[offset]\;
   o2 = threadIdx-offset+array\_comb2[offset]\;
   \For{i=1 to n} {
     t=xor-like()\;
     t=t\textasciicircum shmem[o1]\textasciicircum shmem[o2]\;
-    shared\_mem[threadId]=t\;
+    shared\_mem[threadIdx]=t\;
     x = x\textasciicircum t\;
 
-    store the new PRNG in NewNb[NumThreads*threadId+i]\;
+    store the new PRNG in NewNb[NumThreads*threadIdx+i]\;
   }
-  store internal variables in InternalVarXorLikeArray[threadId]\;
+  store internal variables in InternalVarXorLikeArray[threadIdx]\;
 }
 \end{small}
 \caption{Main kernel for the chaotic iterations based PRNG GPU efficient
@@ -1929,8 +1947,8 @@ array\_shift[4]=\{0,1,3,7\}\;
 }
 
 \KwOut{NewNb: array containing random numbers in global memory}
-\If{threadId is concerned} {
-  retrieve data from InternalVarBBSArray[threadId] in local variables including shared memory and x\;
+\If{threadIdx is concerned} {
+  retrieve data from InternalVarBBSArray[threadIdx] in local variables including shared memory and x\;
   we consider that bbs1 ... bbs8 represent the internal states of the 8 BBS numbers\;
   offset = threadIdx\%combination\_size\;
   o1 = threadIdx-offset+array\_comb[bbs1\&7][offset]\;
@@ -1949,12 +1967,12 @@ array\_shift[4]=\{0,1,3,7\}\;
     t$<<$=shift\;
     t|=BBS2(bbs2)\&array\_shift[shift]\;
     t=t\textasciicircum  shmem[o1]\textasciicircum     shmem[o2]\;
-    shared\_mem[threadId]=t\;
+    shared\_mem[threadIdx]=t\;
     x = x\textasciicircum   t\;
 
-    store the new PRNG in NewNb[NumThreads*threadId+i]\;
+    store the new PRNG in NewNb[NumThreads*threadIdx+i]\;
   }
-  store internal variables in InternalVarXorLikeArray[threadId] using a rotation\;
+  store internal variables in InternalVarXorLikeArray[threadIdx] using a rotation\;
 }
 \end{small}
 \caption{main kernel for the BBS based PRNG GPU}
@@ -2104,7 +2122,14 @@ behave chaotically, has finally been proposed.
 In future  work we plan to extend this research, building a parallel PRNG for  clusters or
 grid computing. Topological properties of the various proposed generators will be investigated,
 and the use of other categories of PRNGs as input will be studied too. The improvement
-of Blum-Goldwasser will be deepened. Finally, we
+of Blum-Goldwasser will be deepened.
+\begin{color}{red}
+Another aspect to consider might be different accelerator-based systems like 
+Intel Xeon Phi cards and speed measurements using such cards: as heterogeneity of
+supercomputers tends to increase using other accelerators than GPGPUs,
+a Xeon Phi solution might be interesting to investigate.
+\end{color}
+ Finally, we
 will try to enlarge the quantity of pseudorandom numbers generated per second either
 in a simulation context or in a cryptographic one.
 
