Markopy
Utilizing Markov Models for brute forcing attacks
cudarandom.h File Reference

Extension of Markov::Random::Marsaglia for CUDA. More...

Include dependency graph for cudarandom.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Markov::API::CUDA::Random::Marsaglia
 Extension of Markov::Random::Marsaglia which is capable o working on device space. More...
 

Namespaces

 Markov
 Namespace for the markov-model related classes. Contains Model, Node and Edge classes.
 
 Markov::API
 Namespace for the MarkovPasswords API.
 
 Markov::API::CUDA
 Namespace for objects requiring CUDA libraries.
 
 Markov::API::CUDA::Random
 Namespace for Random engines operable under device space.
 

Functions

__device__ unsigned long Markov::API::CUDA::Random::devrandom (unsigned long &x, unsigned long &y, unsigned long &z)
 Marsaglia Random Generation function operable in device space. More...
 

Detailed Description

Extension of Markov::Random::Marsaglia for CUDA.

Authors
Ata Hakçıl

Implementation of Marsaglia Random Engine. This is an implementation of Marsaglia Random engine, which for most use cases is a better fit than other solutions. Very simple mathematical formula to generate pseudorandom integer, so its crazy fast.

This implementation of the Marsaglia Engine is seeded by random.h default random engine. RandomEngine is only seeded once so its not a performance issue.

Example Use: Using Marsaglia Engine with RandomWalk

Model.import("model.mdl");
char* res = new char[11];
Markov::Random::Marsaglia MarsagliaRandomEngine;
for (int i = 0; i < 10; i++) {
this->RandomWalk(&MarsagliaRandomEngine, 5, 10, res);
std::cout << res << "\n";
}
Implementation of Marsaglia Random Engine.
Definition: random.h:125

Example Use: Generating a random number with Marsaglia Engine

std::cout << me.random();
unsigned long random()
Generate Random Number.
Definition: random.h:140

Definition in file cudarandom.h.