Open squarefk opened 2 years ago
import ctypes
import os
import taichi as ti
ti.init(dynamic_index=True)
source = '''
void foo(int* a, int b[2][2]) {
a[0] = 11;
b[0][0] = 10;
}
'''
ces = ti.CompileExternalSource(source)
@ti.kernel
def call_ext():
b = 0
a = ti.Vector([[0, 0], [0, 0]], ti.i32)
print(a, b)
ti.call_cpp(ces, "foo", b, a)
print(a, b)
call_ext()
We would like to support more functions from third-party libraries to make taichi more powerful in practice. To achieve this goal, we are trying to include common math libraries like LAPACK, BLAS, Eigen,...