Browse Source

Remove common template from burst template

Tomas Farago 9 years ago
parent
commit
5a86aeb40a

+ 0 - 2
src/kernels/templates/ankabackprojectburst.in

@@ -1,5 +1,3 @@
-                                    read_only image2d_t projection_{},
-%nl
         pixel.x = mad(voxel.x, cosines{1}, mad(voxel.y, sines{1}, center.x));
         pixel.y = mad(tmp_x, sines{1}, mad(tmp_y, cosines{1}, tmp));
         result {2}= read_imagef (projection_{0}, sampler, pixel).x;

+ 2 - 1
src/kernels/tools/make_burst_kernels.py

@@ -45,7 +45,8 @@ def main():
     if args.burst not in allowed_bursts:
         raise ValueError('Specified burst mode `{}` must be one of `{}`'.format(args.burst,
                                                                                 allowed_bursts))
-    in_tmpl, comp_tmpl, ker_tmpl = open(args.filename, 'r').read().split('\n%nl\n')
+    in_tmpl = "read_only image2d_t projection_{},"
+    comp_tmpl, ker_tmpl = open(args.filename, 'r').read().split('\n%nl\n')
     print fill_kernel_template(in_tmpl, comp_tmpl, ker_tmpl, args.burst)