class_docstr: Class surrounding CURAND kernels from CUDA 3.2.
  It allows for generating quasi-random numbers with uniform
  and normal probability function of type int, float, and double.
class_docstr_tok: ["Class","surrounding","CURAND","kernels","from","CUDA","3.2",".","It","allows","for","generating","quasi-random","numbers","with","uniform","and","normal","probability","function","of","type","int",",","float",",","and","double","."]
code: def __init__(
      self,
      dir_vector,
      dir_vector_dtype,
      dir_vector_size,
      dir_vector_set,
      offset,
      state_type,
      vector_type,
      generator_bits,
      sobol_random_source,
  ):
      super().__init__(
          state_type, vector_type, generator_bits, sobol_random_source
      )
  
      if dir_vector is None:
          dir_vector = generate_direction_vectors(
              self.block_count * self.generators_per_block,
              dir_vector_set,
          )
  
      if not (
          isinstance(dir_vector, pycuda.gpuarray.GPUArray)
          and dir_vector.dtype == dir_vector_dtype
          and dir_vector.shape
          == (
              self.block_count * self.generators_per_block,
              dir_vector_size,
          )
      ):
          raise TypeError(
              "seed must be GPUArray of integers of right length"
          )
  
      p = self.module.get_function("prepare")
      p.prepare("PnPn")
  
      from pycuda.characterize import has_stack
  
      has_stack = has_stack()
  
      if has_stack:
          prev_stack_size = drv.Context.get_limit(drv.limit.STACK_SIZE)
  
      try:
          if has_stack:
              drv.Context.set_limit(
                  drv.limit.STACK_SIZE, 1 << 14
              )  # 16k
          try:
              p.prepared_call(
                  (self.block_count, 1),
                  (self.generators_per_block, 1, 1),
                  self.state,
                  self.block_count * self.generators_per_block,
                  dir_vector.gpudata,
                  offset,
              )
          except drv.LaunchError:
              raise ValueError(
                  "Initialisation failed. Decrease number of threads."
              )
  
      finally:
          if has_stack:
              drv.Context.set_limit(
                  drv.limit.STACK_SIZE, prev_stack_size
              )
  
imports: import numpy
  import pycuda.compiler
  import pycuda.driver
  import pycuda.gpuarray
  from pytools import memoize_method
label_desc: Use image node_id 1 to create a new _SobolRandomNumberGeneratorBase object from inherited base classes: _RandomNumberGeneratorBase with example: obj = _SobolRandomNumberGeneratorBase(dir_vector, dir_vector_dtype, dir_vector_size, dir_vector_set, offset, state_type, vector_type, generator_bits, sobol_random_source)