Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(44)  |  Call(20)  |  Derive(0)  |  Import(24)

src/p/a/parakeet-0.23.2/parakeet/transforms/simplify.py   parakeet(Download)
from .. ndtypes import ArrayT,  ClosureT, NoneT, ScalarT, TupleT, ImmutableT, NoneType, SliceT, FnT
 
from .. syntax import (AllocArray, Assign, ExprStmt, Expr, 
                       Const, Var, Tuple, TupleProj, Closure, ClosureElt, Cast,
                       Slice, Index, Array, ArrayView, Attribute, Struct, Select, 
      return expr
    else:
      return Attribute(value = v, name = expr.name, type = expr.type)
 
  def transform_Closure(self, expr):

src/p/a/parakeet-HEAD/parakeet/transforms/simplify.py   parakeet(Download)
                        SliceT, FnT, FloatT)
 
from .. syntax import (AllocArray, Assign, ExprStmt, Expr, 
                       Const, Var, Tuple, TupleProj, Closure, ClosureElt, Cast,
                       Slice, Index, Array, ArrayView, Attribute, Struct, Select, 
      return expr
    else:
      return Attribute(value = v, name = expr.name, type = expr.type)
 
  def transform_Closure(self, expr):

src/p/a/parakeet-0.23.2/parakeet/transforms/shape_elim.py   parakeet(Download)
from .. import syntax
from ..ndtypes import ArrayT, SliceT, ScalarT, TupleT, Int64, StructT, ClosureT, IntT, NoneT 
from ..syntax import Attribute, TupleProj, Var, ClosureElt
from ..shape_inference import shape_env, shape
from ..transforms import Transform
      self.fill_shape_vars_list(elts)
    elif c is ArrayT:
      shape = Attribute(expr, 'shape', t.shape_t)
      dims = [TupleProj(shape,i,type=Int64) for i in xrange(t.rank)]
      self.fill_shape_vars_list(dims)
    elif c is StructT:
      fields = [Attribute(expr, field_name, type = field_type)
      fields = []
      start_t = expr.type.start_type 
      if start_t != NoneT: fields.append(Attribute(expr, 'start', type = start_t))
      stop_t = expr.type.stop_type 
      if stop_t != NoneT: fields.append(Attribute(expr, 'stop', type = stop_t))

src/p/a/parakeet-HEAD/parakeet/transforms/shape_elim.py   parakeet(Download)
from .. import syntax
from ..ndtypes import ArrayT, SliceT, ScalarT, TupleT, Int64, StructT, ClosureT, IntT, NoneT 
from ..syntax import Attribute, TupleProj, Var, ClosureElt
from ..shape_inference import shape_env, shape
from ..transforms import Transform
      self.fill_shape_vars_list(elts)
    elif c is ArrayT:
      shape = Attribute(expr, 'shape', t.shape_t)
      dims = [TupleProj(shape,i,type=Int64) for i in xrange(t.rank)]
      self.fill_shape_vars_list(dims)
    elif c is StructT:
      fields = [Attribute(expr, field_name, type = field_type)
      fields = []
      start_t = expr.type.start_type 
      if start_t != NoneT: fields.append(Attribute(expr, 'start', type = start_t))
      stop_t = expr.type.stop_type 
      if stop_t != NoneT: fields.append(Attribute(expr, 'stop', type = stop_t))

src/p/a/parakeet-0.23.2/parakeet/transforms/lower_structs.py   parakeet(Download)
from .. ndtypes import (ScalarT, ArrayT, make_array_type, TupleT, 
                        Int32, Int64,  ptr_type, PtrT, closure_type)  
from .. syntax import Struct, Assign, Const, Index, Attribute, Var, Tuple, Alloc  
from .. syntax.helpers import const_int, const_tuple, zero
from transform import Transform
    tuple_t = expr.tuple.type
    field_name, field_type  = tuple_t._fields_[expr.index]
    return Attribute(new_tuple, field_name, type = field_type)
 
  def transform_Slice(self, expr):
    # index 1 higher
    field_name, field_type = new_closure.type._fields_[expr.index + 1]
    return Attribute(new_closure, field_name, type = field_type)
 
  def array_view(self, data, shape, strides, offset, nelts):

src/p/a/parakeet-HEAD/parakeet/transforms/lower_structs.py   parakeet(Download)
from .. ndtypes import (ScalarT, ArrayT, make_array_type, TupleT, 
                        Int32, Int64,  ptr_type, PtrT, closure_type)  
from .. syntax import Struct, Assign, Const, Index, Attribute, Var, Tuple, Alloc  
from .. syntax.helpers import const_int, const_tuple, zero
from transform import Transform
    tuple_t = expr.tuple.type
    field_name, field_type  = tuple_t._fields_[expr.index]
    return Attribute(new_tuple, field_name, type = field_type)
 
  def transform_Slice(self, expr):
    # index 1 higher
    field_name, field_type = new_closure.type._fields_[expr.index + 1]
    return Attribute(new_closure, field_name, type = field_type)
 
  def array_view(self, data, shape, strides, offset, nelts):

src/p/a/parakeet-0.23.2/parakeet/lib/array_properties.py   parakeet(Download)
from .. ndtypes import ArrayT, Int64, elt_type, empty_tuple_t, TupleT, TypeValueT 
from .. frontend import macro, jit, typed_macro 
from .. syntax import (Attribute, Tuple, Ravel, Shape, Reshape, TypeValue, Transpose, Const)
from .. syntax.helpers import const_int, zero_i64 
 
  assert axis.value == 0, "Calling 'size' along axes other than 0 not yet supported, given %s" % axis
  if isinstance(xt.type, ArrayT):
    return Attribute(xt, 'size', type = Int64)
  elif isinstance(xt.type, TupleT):
    return const_int(len(xt.type.elt_types))

src/p/a/parakeet-HEAD/parakeet/lib/array_properties.py   parakeet(Download)
from .. ndtypes import ArrayT, Int64, elt_type, empty_tuple_t, TupleT, TypeValueT 
from .. frontend import macro, jit, typed_macro 
from .. syntax import (Attribute, Tuple, Ravel, Shape, Reshape, TypeValue, Transpose, Const)
from .. syntax.helpers import const_int, zero_i64 
 
  assert axis.value == 0, "Calling 'size' along axes other than 0 not yet supported, given %s" % axis
  if isinstance(xt.type, ArrayT):
    return Attribute(xt, 'size', type = Int64)
  elif isinstance(xt.type, TupleT):
    return const_int(len(xt.type.elt_types))

src/p/a/parakeet-0.23.2/parakeet/transforms/clone_function.py   parakeet(Download)
from .. import names 
from .. syntax import (TypedFn, Var, Const, Attribute, Index, PrimCall, 
                       If, Assign, While, ExprStmt, Return, ForLoop, ParFor,  
                       Slice, Struct, Tuple, TupleProj, Cast, Alloc, Closure, 
                       Map, Reduce, Scan, IndexMap, IndexReduce, IndexScan, 
    elif c is Attribute:
      value = self.transform_expr(expr.value)
      return Attribute(value, expr.name)
 
    elif c is Index:

src/p/a/parakeet-HEAD/parakeet/transforms/clone_function.py   parakeet(Download)
from .. import names 
from .. syntax import (TypedFn, Var, Const, Attribute, Index, PrimCall, 
                       If, Assign, While, ExprStmt, Return, ForLoop, ParFor,  
                       Slice, Struct, Tuple, TupleProj, Cast, Alloc, Closure, 
                       Map, Reduce, Scan, IndexMap, IndexReduce, IndexScan, 
    elif c is Attribute:
      value = self.transform_expr(expr.value)
      return Attribute(value, expr.name)
 
    elif c is Index:

  1 | 2 | 3  Next