[pyfr] 53/88: Switch to the native C/OpenMP generator in GiMMiK.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Nov 16 12:05:29 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository pyfr.

commit dbe1bd133628137fed9acda2cb09007ecae28362
Author: Freddie Witherden <freddie at witherden.org>
Date:   Thu Jun 16 13:01:15 2016 -0700

    Switch to the native C/OpenMP generator in GiMMiK.
---
 pyfr/backends/openmp/gimmik.py               | 14 +++++---------
 pyfr/backends/openmp/kernels/par-gimmik.mako | 17 -----------------
 2 files changed, 5 insertions(+), 26 deletions(-)

diff --git a/pyfr/backends/openmp/gimmik.py b/pyfr/backends/openmp/gimmik.py
index edaf89c..30ab965 100644
--- a/pyfr/backends/openmp/gimmik.py
+++ b/pyfr/backends/openmp/gimmik.py
@@ -28,17 +28,13 @@ class OpenMPGiMMiKKernels(OpenMPKernelProvider):
             raise NotSuitableError('Matrix too dense for GiMMiK')
 
         # Generate the GiMMiK kernel
-        gimmik_mm = generate_mm(a.get(), dtype=a.dtype, platform='c',
-                                alpha=alpha, beta=beta)
-
-        # Generate and build the OpenMP-wrapped GiMMiK kernel
-        tpl = self.backend.lookup.get_template('par-gimmik')
-        src = tpl.render(gimmik_mm=gimmik_mm)
-        par_gimmik_mm = self._build_kernel('par_gimmik_mm', src,
-                                           [np.int32] + [np.intp, np.int32]*2)
+        src = generate_mm(a.get(), dtype=a.dtype, platform='c-omp',
+                          alpha=alpha, beta=beta)
+        gimmik_mm = self._build_kernel('gimmik_mm', src,
+                                       [np.int32] + [np.intp, np.int32]*2)
 
         class MulKernel(ComputeKernel):
             def run(self, queue):
-                par_gimmik_mm(b.ncol, b, b.leaddim, out, out.leaddim)
+                gimmik_mm(b.ncol, b, b.leaddim, out, out.leaddim)
 
         return MulKernel()
diff --git a/pyfr/backends/openmp/kernels/par-gimmik.mako b/pyfr/backends/openmp/kernels/par-gimmik.mako
deleted file mode 100644
index 150893b..0000000
--- a/pyfr/backends/openmp/kernels/par-gimmik.mako
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- coding: utf-8 -*-
-<%inherit file='base'/>
-
-// GiMMiK kernel
-${gimmik_mm}
-
-void
-par_gimmik_mm(int N, const fpdtype_t *B, int ldb, fpdtype_t *C, int ldc)
-{
-    #pragma omp parallel
-    {
-        int begin, end;
-        loop_sched_1d(N, PYFR_ALIGN_BYTES / sizeof(fpdtype_t), &begin, &end);
-
-        gimmik_mm(end - begin, B + begin, ldb, C + begin, ldc);
-    }
-}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyfr.git



More information about the debian-science-commits mailing list