def codegen(context, builder, signature, args): data, index, value = args ptr = irutils.get_member_value(builder, data, 0) value = truncate_or_extend(builder, nb_value, eltype, value, ptr.type.pointee) builder.store(value, builder.gep(ptr, [index]))
def codegen(context, builder, signature, args): data, index = args ptr = irutils.get_member_value(builder, data, 0) res = builder.load(builder.gep(ptr, [index])) if isinstance(T, types.Float): res = builder.bitcast(res, nv.type) return builder.icmp_signed('==', res, nv)
def codegen(context, builder, signature, args): data, index = args ptr = irutils.get_member_value(builder, data, 0) ty = ptr.type.pointee nv = ir.Constant(ir.IntType(T.bitwidth), null_value) if isinstance(T, types.Float): nv = builder.bitcast(nv, ty) builder.store(nv, builder.gep(ptr, [index]))
def StructureNumbaType_getattr_impl(context, builder, sig, struct, attr): model = datamodel.default_manager.lookup(sig) index = model.get_field_position(attr) return get_member_value(builder, struct, index)
def codegen(context, builder, signature, args): data, index = args ptr = irutils.get_member_value(builder, data, 0) res = builder.load(builder.gep(ptr, [index])) return res
def codegen(context, builder, signature, args): data, = args return irutils.get_member_value(builder, data, 1)