parameters: (options)
return_statement: return (TmpClass, test_mem_mode, CPUClass)
docstring: Returns two cpu classes and the initial mode of operation.
  
         Restoring from a checkpoint or fast forwarding through a benchmark
         can be done using one type of cpu, and then the actual
         simulation can be carried out using another type. This function
         returns these two types of cpus and the initial mode of operation
         depending on the options provided.
docstring_summary: Returns two cpu classes and the initial mode of operation.
docstring_tokens: Returns two cpu classes and the initial mode of operation .
function: def setCPUClass(options):
      """Returns two cpu classes and the initial mode of operation.
  
         Restoring from a checkpoint or fast forwarding through a benchmark
         can be done using one type of cpu, and then the actual
         simulation can be carried out using another type. This function
         returns these two types of cpus and the initial mode of operation
         depending on the options provided.
      """
  
      TmpClass, test_mem_mode = getCPUClass(options.cpu_type)
      CPUClass = None
      if TmpClass.require_caches() and \
              not options.caches and not options.ruby:
          fatal("%s must be used with caches" % options.cpu_type)
  
      if options.checkpoint_restore != None:
          if options.restore_with_cpu != options.cpu_type:
              CPUClass = TmpClass
              TmpClass, test_mem_mode = getCPUClass(options.restore_with_cpu)
      elif options.fast_forward:
          CPUClass = TmpClass
          TmpClass = AtomicSimpleCPU
          test_mem_mode = 'atomic'
  
      # Ruby only supports atomic accesses in noncaching mode
      if test_mem_mode == 'atomic' and options.ruby:
          warn("Memory mode will be changed to atomic_noncaching")
          test_mem_mode = 'atomic_noncaching'
  
      return (TmpClass, test_mem_mode, CPUClass)
function_tokens: def setCPUClass ( options ) : TmpClass , test_mem_mode = getCPUClass ( options . cpu_type ) CPUClass = None if TmpClass . require_caches ( ) and not options . caches and not options . ruby : fatal ( "%s must be used with caches" % options . cpu_type ) if options . checkpoint_restore != None : if options . restore_with_cpu != options . cpu_type : CPUClass = TmpClass TmpClass , test_mem_mode = getCPUClass ( options . restore_with_cpu ) elif options . fast_forward : CPUClass = TmpClass TmpClass = AtomicSimpleCPU test_mem_mode = 'atomic' # Ruby only supports atomic accesses in noncaching mode if test_mem_mode == 'atomic' and options . ruby : warn ( "Memory mode will be changed to atomic_noncaching" ) test_mem_mode = 'atomic_noncaching' return ( TmpClass , test_mem_mode , CPUClass )