예제 #1
0
파일: base.py 프로젝트: meawoppl/numba
 def imp(context, builder, sig, args):
     valty = sig.args[1]
     [target, val] = args
     dptr = cgutils.get_record_member(builder, target, offset,
                                      self.get_data_type(elemty))
     val = context.cast(builder, val, valty, elemty)
     self.pack_value(builder, elemty, val, dptr)
예제 #2
0
 def imp(context, builder, sig, args):
     valty = sig.args[1]
     [target, val] = args
     dptr = cgutils.get_record_member(builder, target, offset,
                                      self.get_data_type(elemty))
     val = context.cast(builder, val, valty, elemty)
     self.pack_value(builder, elemty, val, dptr)
예제 #3
0
파일: base.py 프로젝트: molodiuc/numba
 def imp(context, builder, typ, val):
     ary = aryty(context, builder)
     dtype = elemty.dtype
     newshape = [self.get_constant(types.intp, s) for s in
                 elemty.shape]
     newstrides = [self.get_constant(types.intp, s) for s in
                   elemty.strides]
     newdata = cgutils.get_record_member(builder, val, offset,
                                     self.get_data_type(dtype))
     arrayobj.populate_array(
         ary,
         data=newdata,
         shape=cgutils.pack_array(builder, newshape),
         strides=cgutils.pack_array(builder, newstrides),
         itemsize=context.get_constant(types.intp, elemty.size),
         parent=ary.parent
     )
     
     return ary._getvalue()
예제 #4
0
                def imp(context, builder, typ, val):
                    ary = aryty(context, builder)
                    dtype = elemty.dtype
                    newshape = [self.get_constant(types.intp, s) for s in
                                elemty.shape]
                    newstrides = [self.get_constant(types.intp, s) for s in
                                  elemty.strides]
                    newdata = cgutils.get_record_member(builder, val, offset,
                                                    self.get_data_type(dtype))
                    arrayobj.populate_array(
                        ary,
                        data=newdata,
                        shape=cgutils.pack_array(builder, newshape),
                        strides=cgutils.pack_array(builder, newstrides),
                        itemsize=context.get_constant(types.intp, elemty.size),
                        meminfo=ary.meminfo,
                        parent=ary.parent
                    )

                    return ary._getvalue()
예제 #5
0
 def imp(context, builder, typ, val):
     dptr = cgutils.get_record_member(builder, val, offset,
                                      self.get_data_type(elemty))
     return self.unpack_value(builder, elemty, dptr)
예제 #6
0
파일: base.py 프로젝트: christwell/numba
 def imp(context, builder, typ, val):
     dptr = cgutils.get_record_member(builder, val, offset,
                                      context.get_data_type(elemty))
     align = None if typ.aligned else 1
     res = self.unpack_value(builder, elemty, dptr, align)
     return impl_ret_borrowed(context, builder, typ, res)
예제 #7
0
파일: base.py 프로젝트: gdementen/numba
 def imp(context, builder, typ, val):
     dptr = cgutils.get_record_member(
         builder, val, offset, context.get_data_type(elemty))
     align = None if typ.aligned else 1
     res = self.unpack_value(builder, elemty, dptr, align)
     return impl_ret_borrowed(context, builder, typ, res)