original_docstring: 
          Convert data-parallel computations into Parfor nodes
          
docstring: Convert data-parallel computations into Parfor nodes
docstring_tokens: Convert data - parallel computations into Parfor nodes
code: def run_pass(self, state):
          """
          Convert data-parallel computations into Parfor nodes
          """
          # Ensure we have an IR and type information.
          assert state.func_ir
          parfor_pass = _parfor_ParforPass(state.func_ir,
                                           state.type_annotation.typemap,
                                           state.type_annotation.calltypes,
                                           state.return_type,
                                           state.typingctx,
                                           state.targetctx,
                                           state.flags.auto_parallel,
                                           state.flags,
                                           state.metadata,
                                           state.parfor_diagnostics)
          parfor_pass.run()
  
          # check the parfor pass worked and warn if it didn't
          has_parfor = False
          for blk in state.func_ir.blocks.values():
              for stmnt in blk.body:
                  if isinstance(stmnt, Parfor):
                      has_parfor = True
                      break
              else:
                  continue
              break
  
          if not has_parfor:
              # parfor calls the compiler chain again with a string
              if not (config.DISABLE_PERFORMANCE_WARNINGS or
                      state.func_ir.loc.filename == '<string>'):
                  url = ("https://numba.pydata.org/numba-doc/latest/user/"
                         "parallel.html#diagnostics")
                  msg = ("\nThe keyword argument 'parallel=True' was specified "
                         "but no transformation for parallel execution was "
                         "possible.\n\nTo find out why, try turning on parallel "
                         "diagnostics, see %s for help." % url)
                  warnings.warn(errors.NumbaPerformanceWarning(msg,
                                                               state.func_ir.loc))
  
          # Add reload function to initialize the parallel backend.
          state.reload_init.append(_reload_parfors)
          return True
code_tokens: def run_pass ( self , state ) : assert state . func_ir parfor_pass = _parfor_ParforPass ( state . func_ir , state . type_annotation . typemap , state . type_annotation . calltypes , state . return_type , state . typingctx , state . targetctx , state . flags . auto_parallel , state . flags , state . metadata , state . parfor_diagnostics ) parfor_pass . run ( ) has_parfor = False for blk in state . func_ir . blocks . values ( ) : for stmnt in blk . body : if isinstance ( stmnt , Parfor ) : has_parfor = True break else : continue break if not has_parfor : if not ( config . DISABLE_PERFORMANCE_WARNINGS or state . func_ir . loc . filename == '<string>' ) : url = ( "https://numba.pydata.org/numba-doc/latest/user/" "parallel.html#diagnostics" ) msg = ( "\nThe keyword argument 'parallel=True' was specified " "but no transformation for parallel execution was " "possible.\n\nTo find out why, try turning on parallel " "diagnostics, see %s for help." % url ) warnings . warn ( errors . NumbaPerformanceWarning ( msg , state . func_ir . loc ) ) state . reload_init . append ( _reload_parfors ) return True
short_docstring: Convert data-parallel computations into Parfor nodes
short_docstring_tokens: Convert data - parallel computations into Parfor nodes
comment: """
          Convert data-parallel computations into Parfor nodes
          """$SEP$# Ensure we have an IR and type information.$SEP$# check the parfor pass worked and warn if it didn't$SEP$# parfor calls the compiler chain again with a string$SEP$# Add reload function to initialize the parallel backend.