def _attempt_nocopy_reshape(context, builder, aryty, ary, newnd, newshape, newstrides):
 ll_intp = context.get_value_type(types.intp)
 ll_intp_star = ll_intp.as_pointer()
 ll_intc = context.get_value_type(types.intc)
 fnty = lc.Type.function(ll_intc, [ll_intp, ll_intp_star, ll_intp_star, ll_intp, ll_intp_star, ll_intp_star, ll_intp, ll_intc])
 fn = builder.module.get_or_insert_function(fnty, name='numba_attempt_nocopy_reshape')
 nd = ll_intp(aryty.ndim)
 shape = cgutils.gep_inbounds(builder, ary._get_ptr_by_name('shape'), 0, 0)
 strides = cgutils.gep_inbounds(builder, ary._get_ptr_by_name('strides'), 0, 0)
 newnd = ll_intp(newnd)
 newshape = cgutils.gep_inbounds(builder, newshape, 0, 0)
 newstrides = cgutils.gep_inbounds(builder, newstrides, 0, 0)
 is_f_order = ll_intc(0)
 res = builder.call(fn, [nd, shape, strides, newnd, newshape, newstrides, ary.itemsize, is_f_order])
 return res

def _attempt_nocopy_reshape ( context , builder , aryty , ary , newnd , newshape , newstrides ) : ll_intp = context . get_value_type ( types . intp ) ll_intp_star = ll_intp . as_pointer ( ) ll_intc = context . get_value_type ( types . intc ) fnty = lc . Type . function ( ll_intc , [ ll_intp , ll_intp_star , ll_intp_star , ll_intp , ll_intp_star , ll_intp_star , ll_intp , ll_intc ] ) fn = builder . module . get_or_insert_function ( fnty , name = 'numba_attempt_nocopy_reshape' ) nd = ll_intp ( aryty . ndim ) shape = cgutils . gep_inbounds ( builder , ary . _get_ptr_by_name ( 'shape' ) , 0 , 0 ) strides = cgutils . gep_inbounds ( builder , ary . _get_ptr_by_name ( 'strides' ) , 0 , 0 ) newnd = ll_intp ( newnd ) newshape = cgutils . gep_inbounds ( builder , newshape , 0 , 0 ) newstrides = cgutils . gep_inbounds ( builder , newstrides , 0 , 0 ) is_f_order = ll_intc ( 0 ) res = builder . call ( fn , [ nd , shape , strides , newnd , newshape , newstrides , ary . itemsize , is_f_order ] ) return res
call into numba_attempt_nocopy_reshape() for the given array type and instance .