Skip to content

Commit

Permalink
add deprecated decor for ti.external_func_call(), ti.bitcode_func_cal…
Browse files Browse the repository at this point in the history
…l() and ti.asm()
  • Loading branch information
squarefk committed Sep 10, 2021
1 parent d9211a8 commit 941aaf3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/taichi/lang/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from taichi.lang.field import Field
from taichi.lang.snode import SNode
from taichi.lang.util import cook_dtype, is_taichi_class, taichi_scope
from taichi.misc.util import deprecated

unary_ops = []

Expand Down Expand Up @@ -885,19 +886,22 @@ def append(l, indices, val):
return a


@deprecated('bitcode_func_call()', 'ti.SourceBuilder(source, \'bc\')')
def bitcode_func_call(filename, funcname, *args):
_ti_core.insert_external_func_call(0, '', filename, funcname,
make_expr_group(args),
make_expr_group([]))


@deprecated('external_func_call()', 'ti.SourceBuilder(source, \'so\')')
def external_func_call(func, args=[], outputs=[]):
func_addr = ctypes.cast(func, ctypes.c_void_p).value
_ti_core.insert_external_func_call(func_addr, '', '', '',
make_expr_group(args),
make_expr_group(outputs))


@deprecated('asm()', 'ti.SourceBuilder(source, \'asm\')')
def asm(source, inputs=[], outputs=[]):
_ti_core.insert_external_func_call(0, source, '', '',
make_expr_group(inputs),
Expand Down

0 comments on commit 941aaf3

Please sign in to comment.