Esempio n. 1
0
 def options_type(self):
     """Retrieves the types of the options (layout, transpose, side, etc.)"""
     if self.options:
         definitions = [
             "const " + convert.option_to_clblast(o) for o in self.options
         ]
         return [", ".join(definitions)]
     return []
Esempio n. 2
0
 def options_doc(self):
     """Retrieves the documentation of the options"""
     if self.options:
         definitions = [
             "`const " + convert.option_to_clblast(o) + " " + o + "`: " +
             convert.option_to_documentation(o) for o in self.options
         ]
         return definitions
     return []
Esempio n. 3
0
 def options_def_c(self):
     """As above, but now for the C API"""
     if self.options:
         definitions = [
             "const CLBlast" + convert.option_to_clblast(o) + " " + o
             for o in self.options
         ]
         return [", ".join(definitions)]
     return []
Esempio n. 4
0
 def options_cast(self, indent):
     """As above, but now casted to CLBlast data-types"""
     if self.options:
         options = [
             "static_cast<clblast::" + convert.option_to_clblast(o) + ">(" +
             o + ")" for o in self.options
         ]
         return [(",\n" + indent).join(options)]
     return []
Esempio n. 5
0
 def options_doc(self):
     """Retrieves the documentation of the options"""
     if self.options:
         definitions = ["`const " + convert.option_to_clblast(o) + " " + o + "`: " + convert.option_to_documentation(o) for o in self.options]
         return definitions
     return []
Esempio n. 6
0
 def options_type(self):
     """Retrieves the types of the options (layout, transpose, side, etc.)"""
     if self.options:
         definitions = ["const " + convert.option_to_clblast(o) for o in self.options]
         return [", ".join(definitions)]
     return []
Esempio n. 7
0
 def options_def_c(self):
     """As above, but now for the C API"""
     if self.options:
         definitions = ["const CLBlast" + convert.option_to_clblast(o) + " " + o for o in self.options]
         return [", ".join(definitions)]
     return []
Esempio n. 8
0
 def options_cast(self, indent):
     """As above, but now casted to CLBlast data-types"""
     if self.options:
         options = ["static_cast<clblast::" + convert.option_to_clblast(o) + ">(" + o + ")" for o in self.options]
         return [(",\n" + indent).join(options)]
     return []