(self, lhs, func_name, args, array_dists)
analyze distributions of hpat distributed functions
        (sdc.distributed_api.func_name)
analyze distributions of hpat distributed functions
        (sdc.distributed_api.func_name)
analyze distributions of hpat distributed functions ( sdc . distributed_api . func_name )
def _analyze_call_hpat_dist(self, lhs, func_name, args, array_dists):
        """analyze distributions of hpat distributed functions
        (sdc.distributed_api.func_name)
        """
        if func_name == 'local_len':
            return
        if func_name == 'parallel_print':
            return

        if func_name == 'dist_return':
            arr_name = args[0].name
            assert arr_name in array_dists, "array distribution not found"
            if array_dists[arr_name] == Distribution.REP:
                raise ValueError("distributed return of array {} not valid"
                                 " since it is replicated".format(arr_name))
            return

        if func_name == 'threaded_return':
            arr_name = args[0].name
            assert arr_name in array_dists, "array distribution not found"
            if array_dists[arr_name] == Distribution.REP:
                raise ValueError("threaded return of array {} not valid"
                                 " since it is replicated")
            array_dists[arr_name] = Distribution.Thread
            return

        if func_name == 'rebalance_array':
            if lhs not in array_dists:
                array_dists[lhs] = Distribution.OneD
            in_arr = args[0].name
            if array_dists[in_arr] == Distribution.OneD_Var:
                array_dists[lhs] = Distribution.OneD
            else:
                self._meet_array_dists(lhs, in_arr, array_dists)
            return

        # set REP if not found
        self._analyze_call_set_REP(lhs, args, array_dists, 'sdc.distributed_api.' + func_name)
def _analyze_call_hpat_dist ( self , lhs , func_name , args , array_dists ) : if func_name == 'local_len' : return if func_name == 'parallel_print' : return if func_name == 'dist_return' : arr_name = args [ 0 ] . name assert arr_name in array_dists , "array distribution not found" if array_dists [ arr_name ] == Distribution . REP : raise ValueError ( "distributed return of array {} not valid" " since it is replicated" . format ( arr_name ) ) return if func_name == 'threaded_return' : arr_name = args [ 0 ] . name assert arr_name in array_dists , "array distribution not found" if array_dists [ arr_name ] == Distribution . REP : raise ValueError ( "threaded return of array {} not valid" " since it is replicated" ) array_dists [ arr_name ] = Distribution . Thread return if func_name == 'rebalance_array' : if lhs not in array_dists : array_dists [ lhs ] = Distribution . OneD in_arr = args [ 0 ] . name if array_dists [ in_arr ] == Distribution . OneD_Var : array_dists [ lhs ] = Distribution . OneD else : self . _meet_array_dists ( lhs , in_arr , array_dists ) return # set REP if not found self . _analyze_call_set_REP ( lhs , args , array_dists , 'sdc.distributed_api.' + func_name )