(self)
return self.context_rand_state_map[ctx]
Similar to @context_dependent_memoize, with additional ability to reset
        the random pool by `rng_reset`.

        initialize our common pool of randomness (1/4 MB):
        MAX_THREADS_PER_MULTIPROCESSOR * 32 SMs (32 to be somewhat future proof
        and power of two). This size is currently hardcoded in the kernels,
        to be parameterized ...
Similar to @context_dependent_memoize, with additional ability to reset
        the random pool by `rng_reset`.
Similar to @context_dependent_memoize with additional ability to reset the random pool by rng_reset .
def _get_rand_state_dev(self):
        """
        Similar to @context_dependent_memoize, with additional ability to reset
        the random pool by `rng_reset`.

        initialize our common pool of randomness (1/4 MB):
        MAX_THREADS_PER_MULTIPROCESSOR * 32 SMs (32 to be somewhat future proof
        and power of two). This size is currently hardcoded in the kernels,
        to be parameterized ...
        """
        ctx = drv.Context.get_current()
        if not (ctx in self.context_rand_state_map and self.context_rand_state_alive[ctx]):
            self._set_rand_state_dev()
        return self.context_rand_state_map[ctx]
def _get_rand_state_dev ( self ) : ctx = drv . Context . get_current ( ) if not ( ctx in self . context_rand_state_map and self . context_rand_state_alive [ ctx ] ) : self . _set_rand_state_dev ( ) return self . context_rand_state_map [ ctx ]