technikempire / amprng Goto Github PK
View Code? Open in Web Editor NEWC++ AMP RNG Library is a library of Random Number Generators that C++ AMP developers can freely use in their own projects.
License: Apache License 2.0
C++ AMP RNG Library is a library of Random Number Generators that C++ AMP developers can freely use in their own projects.
License: Apache License 2.0
AMRNG: C++ AMP RNG Library This is a library of Random Number Generarators that C++ AMP developers can freely use in their projects. Adding new random generators: - amp_rand_collection is the base class for making distinct instances of an RNG available for use in parallel_for_each. This means each thread get a distinct RNG object. The instances can be initialized such that different threads do not receive the same random numbers. - Add a new RNG class in its own header file, and make sure it #include's the "amp_rand_collection.h" header. It is suggested to follow the pattern exemplified by the tinymt RNG. - Add a new collection that inherits from amp_rand_collection. Implement the constructor to initialize the thread specific instances of your random number generator. - inc\amp_tinymt_rng.h is a random number generator that implements 'TinyMT', a variant of Mersenne twister tailored to work on accelerators - inc\amp_sobol_rng.h is another random number generator that implements 'Quasi Sobol Sequence Generator' up to 21201 dimensions. Using the library in your app: - #include the desired RNG header file: "inc\amp_tinymt_rng.h" or "inc\amp_sobol_rng.h". - Create a generator collection (pick the amp_rand_collection type corresponding to the random number generator of your choice) - Initialize the generator collection. This can be done either at the time of creation (provide a seed) or inside the parallel_for_each (by calling initialize) - Use the generator in parallel_for_each. Call next_xxx method on the thread specific instance to get the next random number. - test\main.cpp shows different ways of using the tinymt random number generator and Sobol sequence generator in a parallel_for_each test\{tinymt_data.txt, sobol_data.txt} contain the output of running the sample with 10K random number sequences. test\amprng.xlsm is the spreedsheet template displaying the Sobol sequence and tinyMT random number sequence. Hardware requirement: - This sample requires DirectX 11 capable card, if none detected sample will use DirectX 11 Emulator. Software requirement: - Install Visual Studio 2012 from http://msdn.microsoft.com
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.