Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions rbc/externals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@


def gen_codegen(fn_name):
def codegen(context, builder, sig, args):
# Need to retrieve the function name again
fndesc = funcdesc.ExternalFunctionDescriptor(fn_name, sig.return_type, sig.args)
func = context.declare_external_function(builder.module, fndesc)
return builder.call(func, args)
if fn_name.startswith('llvm.'):
def codegen(context, builder, sig, args):
func = builder.module.declare_intrinsic(fn_name, [a.type for a in args])
return builder.call(func, args)
else:
def codegen(context, builder, sig, args):
fndesc = funcdesc.ExternalFunctionDescriptor(fn_name, sig.return_type, sig.args)
func = context.declare_external_function(builder.module, fndesc)
return builder.call(func, args)

return codegen

Expand Down
1 change: 1 addition & 0 deletions rbc/heavydb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from .day_time_interval import * # noqa: F401, F403
from .year_month_time_interval import * # noqa: F401, F403
from .remoteheavydb import * # noqa: F401, F403
from .heavydb_compiler import * # noqa: F401, F403

from . import mathimpl as math # noqa: F401
from . import npyimpl as np # noqa: F401
Expand Down
2 changes: 1 addition & 1 deletion rbc/heavydb/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import numpy as np
from rbc import typesystem
from rbc.targetinfo import TargetInfo
from numba.core import datamodel, cgutils, extending, types, imputils
from numba.core import datamodel, cgutils, types, imputils, extending

int8_t = ir.IntType(8)
int32_t = ir.IntType(32)
Expand Down
Loading