clover: Add semantic information to module::argument for implicit parameter passing.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 8 Oct 2014 14:32:18 +0000 (17:32 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 11 Oct 2014 22:39:21 +0000 (01:39 +0300)
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/core/module.hpp

index 18a5bfb24c39568f181c81153f9ae1466a96c72c..ee6caf9690c776ef1a9ed62b17a66d2f15a22d83 100644 (file)
@@ -68,27 +68,35 @@ namespace clover {
             sign_ext
          };
 
+         enum semantic {
+            general,
+            grid_dimension,
+            grid_offset
+         };
+
          argument(enum type type, size_t size,
                   size_t target_size, size_t target_align,
-                  enum ext_type ext_type) :
+                  enum ext_type ext_type,
+                  enum semantic semantic = general) :
             type(type), size(size),
             target_size(target_size), target_align(target_align),
-            ext_type(ext_type) { }
+            ext_type(ext_type), semantic(semantic) { }
 
          argument(enum type type, size_t size) :
             type(type), size(size),
             target_size(size), target_align(1),
-            ext_type(zero_ext) { }
+            ext_type(zero_ext), semantic(general) { }
 
          argument() : type(scalar), size(0),
                       target_size(0), target_align(1),
-                      ext_type(zero_ext) { }
+                      ext_type(zero_ext), semantic(general) { }
 
          type type;
          size_t size;
          size_t target_size;
          size_t target_align;
          ext_type ext_type;
+         semantic semantic;
       };
 
       struct symbol {