Пример #1
0
def test_simple_unify():
    A = NDArray([0], dshape('s, t, int'))
    B = NDArray([0], dshape('u, v, int'))

    C = NDArray([0], dshape('w, x, int'))
    D = NDArray([0], dshape('y, z, int'))

    # ==============
    g = (A*B+C*D)**2
    # ==============

    compile(g)
Пример #2
0
from blaze import ones
from blaze.rts import execute
from blaze.compile import compile, explain

A = ones('100, 100, int32')
B = ones('100, 100, int32')

expr = (A + B) * B

# Normally we just use expr.eval() but to demonstrate the compile
# pipeline...

plan = compile(expr)

print explain(plan)
print execute(plan)