コード例 #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)