.TH "std::philox_engine< _UIntType, __w, __n, __r, __consts >" 3 "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::philox_engine< _UIntType, __w, __n, __r, __consts > \- A discrete pseudorandom number generator with weak cryptographic properties\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .SS "Public Types" .in +1c .ti -1c .RI "using \fBresult_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "template \fBphilox_engine\fP (_Sseq &__q)" .br .RI "seed sequence constructor for philox_engine " .ti -1c .RI "\fBphilox_engine\fP (result_type __value)" .br .ti -1c .RI "void \fBdiscard\fP (unsigned long long __z)" .br .RI "discards __z numbers " .ti -1c .RI "result_type \fBoperator()\fP ()" .br .RI "outputs a single w-bit number and handles state advancement " .ti -1c .RI "template .br requires __is_seed_seq<_Sseq>void \fBseed\fP (_Sseq &__q)" .br .RI "seeds philox_engine by seed sequence " .ti -1c .RI "void \fBseed\fP (result_type __value=default_seed)" .br .ti -1c .RI "void \fBset_counter\fP (const \fBarray\fP< result_type, __n > &__counter)" .br .RI "sets the internal counter "cleartext" " .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static constexpr result_type \fBmax\fP ()" .br .RI "The maximum value that this engine can return\&. " .ti -1c .RI "static constexpr result_type \fBmin\fP ()" .br .RI "The minimum value that this engine can return\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static constexpr result_type \fBdefault_seed\fP" .br .ti -1c .RI "static constexpr \fBarray\fP< result_type, __n/2 > \fBmultipliers\fP" .br .ti -1c .RI "static constexpr \fBarray\fP< result_type, __n/2 > \fBround_consts\fP" .br .ti -1c .RI "static constexpr size_t \fBround_count\fP" .br .ti -1c .RI "static constexpr size_t \fBword_count\fP" .br .ti -1c .RI "static constexpr size_t \fBword_size\fP" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "template \fBbasic_ostream\fP< _CharT, _Traits > & \fBoperator<<\fP (\fBbasic_ostream\fP< _CharT, _Traits > &__os, const philox_engine &__x)" .br .RI "outputs the state of the generator " .ti -1c .RI "bool \fBoperator==\fP (const philox_engine &, const philox_engine &)=default" .br .RI "compares two philox_engine objects " .ti -1c .RI "template \fBbasic_istream\fP< _CharT, _Traits > & \fBoperator>>\fP (\fBbasic_istream\fP< _CharT, _Traits > &__is, philox_engine &__x)" .br .RI "takes input to set the state of the philox_engine object " .in -1c .SH "Detailed Description" .PP .SS "template .br class std::philox_engine< _UIntType, __w, __n, __r, __consts >"A discrete pseudorandom number generator with weak cryptographic properties\&. This algorithm was designed to be used for highly parallel random number generation, and is capable of immensely long periods\&. It provides "Crush-resistance", denoting an ability to pass the TestU01 Suite's "Big Crush" test, demonstrating significant apparent entropy\&. .PP It is not intended for cryptographic use and should not be used for such, despite being based on cryptographic primitives\&. .PP The typedefs \fRphilox4x32\fP and \fRphilox4x64\fP are provided as suitable defaults for most use cases, providing high-quality random numbers with reasonable performance\&. .PP This algorithm was created by John Salmon, Mark Moraes, Ron Dror, and David Shaw as a product of D\&.E\&. Shaw Research\&. .PP \fBTemplate Parameters\fP .RS 4 \fI__w\fP Word size .br \fI__n\fP Buffer size .br \fI__r\fP Rounds .br \fI__consts\fP Multiplication and round constant pack, ordered as M_{0}, C_{0}, M_{1}, C_{1}, \&.\&.\&. , M_{N/2-1}, C_{N/2-1} .RE .PP \fBSince\fP .RS 4 C++26 .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "template template \fBstd::philox_engine\fP< _UIntType, __w, __n, __r, __consts >::philox_engine (_Sseq & __q)\fR [inline]\fP, \fR [explicit]\fP" .PP seed sequence constructor for philox_engine .PP \fBParameters\fP .RS 4 \fI__q\fP the seed sequence .RE .PP .SH "Member Function Documentation" .PP .SS "template void \fBstd::philox_engine\fP< _UIntType, __w, __n, __r, __consts >::discard (unsigned long long __z)\fR [inline]\fP" .PP discards __z numbers .PP \fBParameters\fP .RS 4 \fI__z\fP number of iterations to discard .RE .PP .SS "template constexpr result_type \fBstd::philox_engine\fP< _UIntType, __w, __n, __r, __consts >::max ()\fR [inline]\fP, \fR [static]\fP, \fR [constexpr]\fP" .PP The maximum value that this engine can return\&. .PP Referenced by \fBstd::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator>>\fP, and \fBstd::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::set_counter()\fP\&. .SS "template constexpr result_type \fBstd::philox_engine\fP< _UIntType, __w, __n, __r, __consts >::min ()\fR [inline]\fP, \fR [static]\fP, \fR [constexpr]\fP" .PP The minimum value that this engine can return\&. .SS "template result_type \fBstd::philox_engine\fP< _UIntType, __w, __n, __r, __consts >::operator() ()\fR [inline]\fP" .PP outputs a single w-bit number and handles state advancement .PP \fBReturns\fP .RS 4 return_type .RE .PP .SS "template .br requires __is_seed_seq<_Sseq>template .br requires __is_seed_seq<_Sseq>void \fBstd::philox_engine\fP< _UIntType, __w, __n, __r, __consts >::seed (_Sseq & __q)" .PP seeds philox_engine by seed sequence .PP \fBParameters\fP .RS 4 \fI__q\fP the seed sequence .RE .PP .PP References \fBstd::max()\fP\&. .SS "template void \fBstd::philox_engine\fP< _UIntType, __w, __n, __r, __consts >::set_counter (const \fBarray\fP< result_type, __n > & __counter)\fR [inline]\fP" .PP sets the internal counter "cleartext" .PP \fBParameters\fP .RS 4 \fI__counter\fP std::array of len N .RE .PP .SH "Friends And Related Symbol Documentation" .PP .SS "template template \fBbasic_ostream\fP< _CharT, _Traits > & operator<< (\fBbasic_ostream\fP< _CharT, _Traits > & __os, const philox_engine< _UIntType, __w, __n, __r, __consts > & __x)\fR [friend]\fP" .PP outputs the state of the generator .PP \fBParameters\fP .RS 4 \fI__os\fP An output stream\&. .br \fI__x\fP A philox_engine object reference .RE .PP \fBReturns\fP .RS 4 the state of the Philox Engine in __os .RE .PP .SS "template bool operator== (const philox_engine< _UIntType, __w, __n, __r, __consts > & , const philox_engine< _UIntType, __w, __n, __r, __consts > & )\fR [friend]\fP" .PP compares two philox_engine objects .PP \fBReturns\fP .RS 4 true if the objects will produce an identical stream, false otherwise .RE .PP .SS "template template \fBbasic_istream\fP< _CharT, _Traits > & operator>> (\fBbasic_istream\fP< _CharT, _Traits > & __is, philox_engine< _UIntType, __w, __n, __r, __consts > & __x)\fR [friend]\fP" .PP takes input to set the state of the philox_engine object .PP \fBParameters\fP .RS 4 \fI__is\fP An input stream\&. .br \fI__x\fP A philox_engine object reference .RE .PP \fBReturns\fP .RS 4 philox_engine object is set with values from instream .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.