From af2e69ae407c456e24bb7e0596a2754bc6832f46 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 16 Jul 2011 21:19:05 -0400 Subject: [PATCH] First steps towards isl. --- examples/matrix-ops.py | 23 +++++++--------- loopy/__init__.py | 62 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 60 insertions(+), 25 deletions(-) diff --git a/examples/matrix-ops.py b/examples/matrix-ops.py index 30f01f6c5..abfa7c0c1 100644 --- a/examples/matrix-ops.py +++ b/examples/matrix-ops.py @@ -26,19 +26,16 @@ def plain_matrix_mul(ctx_factory=cl.create_some_context): a, b, c, i, j, k, n_sym = [var(s) for s in "abcijkn"] knl = lp.LoopKernel(ctx.devices[0], - [ - lp.LoopDimension("i", n), - lp.LoopDimension("j", n), - lp.LoopDimension("k", n), - ], [ - (c[i, j], a[i, k]*b[k, j]) - ], - [ - lp.ArrayArg("a", dtype, shape=(n, n)), - lp.ArrayArg("b", dtype, shape=(n, n)), - lp.ArrayArg("c", dtype, shape=(n, n)), - ], - name="matmul") + "[n] -> {[i,j,k]: 0<=i,j,k