Example #1
0
def decl_sparse_matrix(dtype):
    value_type = cook_dtype(dtype)
    ptr_type = cook_dtype(u64)
    # Treat the sparse matrix argument as a scalar since we only need to pass in the base pointer
    arg_id = impl.get_runtime().prog.decl_arg(ptr_type, False)
    return SparseMatrixProxy(
        _ti_core.make_arg_load_expr(arg_id, ptr_type, False), value_type)
Example #2
0
def decl_scalar_arg(dtype):
    is_ref = False
    if isinstance(dtype, RefType):
        is_ref = True
        dtype = dtype.tp
    dtype = cook_dtype(dtype)
    arg_id = impl.get_runtime().prog.decl_arg(dtype, False)
    return Expr(_ti_core.make_arg_load_expr(arg_id, dtype, is_ref))
Example #3
0
def decl_sparse_matrix():
    ptr_type = cook_dtype(u64)
    # Treat the sparse matrix argument as a scalar since we only need to pass in the base pointer
    arg_id = _ti_core.decl_arg(ptr_type, False)
    return SparseMatrixProxy(_ti_core.make_arg_load_expr(arg_id, ptr_type))
Example #4
0
def decl_scalar_arg(dtype):
    dtype = cook_dtype(dtype)
    arg_id = _ti_core.decl_arg(dtype, False)
    return Expr(_ti_core.make_arg_load_expr(arg_id, dtype))
Example #5
0
def decl_scalar_arg(dtype):
    dtype = cook_dtype(dtype)
    arg_id = impl.get_runtime().prog.decl_arg(dtype, False)
    return Expr(_ti_core.make_arg_load_expr(arg_id, dtype))