@@ -819,6 +819,21 @@ def generate_code(self):
819
819
def wrapper_snippets (itspace , args ,
820
820
kernel_name = None , wrapper_name = None , user_code = None ,
821
821
iteration_region = ALL , applied_blas = False ):
822
+ """Generates code snippets for the wrapper,
823
+ ready to be into a template.
824
+
825
+ :param itspace: :class:`IterationSpace` object of the :class:`ParLoop`,
826
+ This is built from the iteration :class:`Set`.
827
+ :param args: :class:`Arg`s of the :class:`ParLoop`
828
+ :param kernel_name: Kernel function name (forwarded)
829
+ :param user_code: Code to insert into the wrapper (forwarded)
830
+ :param wrapper_name: Wrapper function name (forwarded)
831
+ :param iteration_region: Iteration region, this is specified when
832
+ creating a :class:`ParLoop`.
833
+ :param applied_blas: COFFEE sometimes sets this true.
834
+
835
+ :return: dict containing the code snippets
836
+ """
822
837
823
838
assert kernel_name is not None
824
839
if wrapper_name is None :
@@ -827,9 +842,6 @@ def wrapper_snippets(itspace, args,
827
842
user_code = ""
828
843
829
844
direct = all (a .map is None for a in args )
830
- # args, iteration_region: directly specified
831
- # itspace: built from iterset
832
- # applied_blas: False, except when COFFEE turns it on
833
845
834
846
def itspace_loop (i , d ):
835
847
return "for (int i_%d=0; i_%d<%d; ++i_%d) {" % (i , i , d , i )
0 commit comments