From d6cff304f6f6ce7559acd008bfdac77a5a7c6179 Mon Sep 17 00:00:00 2001 From: Alexander Krause Date: Tue, 10 Oct 2023 20:13:55 +0200 Subject: [PATCH 1/8] initial draft --- parseForPrimitiveTable.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 parseForPrimitiveTable.py diff --git a/parseForPrimitiveTable.py b/parseForPrimitiveTable.py new file mode 100644 index 00000000..1eb46203 --- /dev/null +++ b/parseForPrimitiveTable.py @@ -0,0 +1,36 @@ +from pathlib import Path + +from generator.utils.yaml_utils import yaml_load +from generator.utils.yaml_utils import yaml_load_all + +def get_config(config_path: Path) -> dict: + return yaml_load(config_path) + +def get_functor_name( yaml_thingy: any ) -> str: + return yaml_thingy["functor_name"] if "functor_name" in yaml_thingy else yaml_thingy["primitive_name"] + +class PrintablePrimitive: + def __init__(self, name, ctype_to_extension_dict ) -> None: + self.name = name + self.ctype_to_extension_dict = ctype_to_extension_dict + pass + + def __repr__(self) -> str: + return f"{self.name}: {self.ctype_to_extension_dict}" + +primitive_config = get_config(Path("generator/config/default_conf.yaml"))["configuration_files"] +for file in Path(primitive_config["primitive_data"]["root_path"] + "/" + primitive_config["primitive_data"]["primitives_path"] ).rglob("*.yaml"): + print(file) + yaml_contents = yaml_load_all(file) + for doc in yaml_contents: + if "primitive_name" in doc: + ctype_ext_dict = dict() + for definition in doc["definitions"]: + ext = definition["target_extension"] + for ctype in definition["ctype"]: + if ctype not in ctype_ext_dict: + ctype_ext_dict[ctype] = [] + if ext not in ctype_ext_dict[ctype]: + ctype_ext_dict[ctype].append(definition["target_extension"]) + pP = PrintablePrimitive(get_functor_name( doc ), ctype_ext_dict) + print( f"\t{pP}" ) From 36f53f63f32c681273cff7c9731df6f28b8fd713 Mon Sep 17 00:00:00 2001 From: Alexander Krause Date: Wed, 11 Oct 2023 13:46:50 +0200 Subject: [PATCH 2/8] functioning draft, not pretty yet --- parseForPrimitiveTable.py | 208 +++++++++++++++++++++++++++++++++++--- 1 file changed, 192 insertions(+), 16 deletions(-) diff --git a/parseForPrimitiveTable.py b/parseForPrimitiveTable.py index 1eb46203..0967468b 100644 --- a/parseForPrimitiveTable.py +++ b/parseForPrimitiveTable.py @@ -1,36 +1,212 @@ from pathlib import Path +import copy from generator.utils.yaml_utils import yaml_load from generator.utils.yaml_utils import yaml_load_all -def get_config(config_path: Path) -> dict: - return yaml_load(config_path) - -def get_functor_name( yaml_thingy: any ) -> str: - return yaml_thingy["functor_name"] if "functor_name" in yaml_thingy else yaml_thingy["primitive_name"] - class PrintablePrimitive: - def __init__(self, name, ctype_to_extension_dict ) -> None: + def __init__(self, name: any, ctype_to_extension_dict: dict ) -> None: self.name = name self.ctype_to_extension_dict = ctype_to_extension_dict pass def __repr__(self) -> str: return f"{self.name}: {self.ctype_to_extension_dict}" + + def to_html(self, considered_types: list, considered_exts: list) -> str: + br = "
" + primitive_button = f"""
""" + primitive_table_start = f"""
""" + primitive_table_end = """
""" + + top_left_corner = """""" + ext_avail = """
+
""" + ext_not_avail = """
-
""" + + rows = [] + header = """""" + top_left_corner + for ext in considered_exts: + header += f"""{ext}""" + header += """""" + rows.append(header) + + for ctype in considered_types: + row = f"""{ctype}""" + for ext in considered_exts: + if ext in self.ctype_to_extension_dict[ctype]: + row += ext_avail + else: + row += ext_not_avail + row += """""" + rows.append(row) + + html = primitive_button + br + primitive_table_start + "".join(rows) + primitive_table_end + print(f"My HTML: {html}") + return html + +def get_config(config_path: Path) -> dict: + return yaml_load(config_path) + +def get_functor_name( yaml_thingy: any ) -> str: + return yaml_thingy["functor_name"] if "functor_name" in yaml_thingy else yaml_thingy["primitive_name"] + +def extract_types( config ): + return config["configuration"]["relevant_types"] + +def extract_extensions( path_string: str ) -> list: + exts = [] + for file in Path( path_string ).rglob("*.yaml"): + yaml_contents = yaml_load(file) + exts.append( yaml_contents["extension_name"] ) + return exts + +def prepare_primitive_dict( all_types: list ) -> dict: + raw_type_dict = dict() + for type in all_types: + raw_type_dict[type] = set() + return raw_type_dict + +def make_list_if_necessary( var: any ) -> list: + if not isinstance( var, list ): + return [var] + return var + +html_start = """ + + + + + + +""" +html_end = """ + + + +""" + +tsl_config = get_config(Path("generator/config/default_conf.yaml")) +primitive_config = tsl_config["configuration_files"]["primitive_data"] + +all_types = extract_types( tsl_config ) +all_extensions = extract_extensions( primitive_config["root_path"] + "/" + primitive_config["extensions_path"] ) + +all_extensions.sort() + +print(all_types) +print(all_extensions) + +raw_primitive_dict = prepare_primitive_dict( all_types ) + +table_vis_file = open( "primitives_table.html", 'w') +table_vis_file.write(html_start) + +for file in Path(primitive_config["root_path"] + "/" + primitive_config["primitives_path"] ).rglob("*.yaml"): print(file) yaml_contents = yaml_load_all(file) for doc in yaml_contents: if "primitive_name" in doc: - ctype_ext_dict = dict() + print(f" --- Now processing: {doc['primitive_name']}") + ctype_ext_dict = copy.deepcopy(raw_primitive_dict) for definition in doc["definitions"]: - ext = definition["target_extension"] - for ctype in definition["ctype"]: - if ctype not in ctype_ext_dict: - ctype_ext_dict[ctype] = [] - if ext not in ctype_ext_dict[ctype]: - ctype_ext_dict[ctype].append(definition["target_extension"]) + exts = make_list_if_necessary(definition["target_extension"]) + ctypes = make_list_if_necessary(definition["ctype"]) + + for ctype in ctypes: + for ext in exts: + ctype_ext_dict[ctype].add(ext) + pP = PrintablePrimitive(get_functor_name( doc ), ctype_ext_dict) print( f"\t{pP}" ) + table_vis_file.write(pP.to_html( all_types, all_extensions )) + +table_vis_file.write(html_end) +table_vis_file.close() \ No newline at end of file From 4a00e6f6adeacd8c935cd8dc29c35d0aebbf35c3 Mon Sep 17 00:00:00 2001 From: Alexander Krause Date: Wed, 11 Oct 2023 15:30:39 +0200 Subject: [PATCH 3/8] filtering enabled --- parseForPrimitiveTable.py | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/parseForPrimitiveTable.py b/parseForPrimitiveTable.py index 0967468b..01c7eafc 100644 --- a/parseForPrimitiveTable.py +++ b/parseForPrimitiveTable.py @@ -14,10 +14,9 @@ def __repr__(self) -> str: return f"{self.name}: {self.ctype_to_extension_dict}" def to_html(self, considered_types: list, considered_exts: list) -> str: - br = "
" - primitive_button = f"""
""" - primitive_table_start = f"""
""" - primitive_table_end = """
""" + primitive_button = f"""
""" + primitive_table_start = f"""
""" + primitive_table_end = """

""" top_left_corner = """""" ext_avail = """
+
""" @@ -40,7 +39,7 @@ def to_html(self, considered_types: list, considered_exts: list) -> str: row += """""" rows.append(row) - html = primitive_button + br + primitive_table_start + "".join(rows) + primitive_table_end + html = primitive_button + primitive_table_start + "".join(rows) + primitive_table_end print(f"My HTML: {html}") return html @@ -118,9 +117,8 @@ def make_list_if_necessary( var: any ) -> list: /* Style the tab */ .primitive { overflow: hidden; - border: 1px solid #ccc; + border: 1px dashed #ccc; background-color: #f1f1f1; - width: max-content } /* Style the buttons inside the tab */ @@ -133,6 +131,7 @@ def make_list_if_necessary( var: any ) -> list: padding: 14px 16px; transition: 0.3s; font-size: 17px; + width: 100%; } /* Change background color of buttons on hover */ @@ -148,14 +147,14 @@ def make_list_if_necessary( var: any ) -> list: /* Style the tab content */ .primitiveinfo { display: none; - padding: 6px 12px; + padding: 14px 16px; border: 1px solid #ccc; - width: max-content; } -""" + +
""" html_end = """ @@ -207,6 +225,7 @@ def make_list_if_necessary( var: any ) -> list: pP = PrintablePrimitive(get_functor_name( doc ), ctype_ext_dict) print( f"\t{pP}" ) table_vis_file.write(pP.to_html( all_types, all_extensions )) + break table_vis_file.write(html_end) table_vis_file.close() \ No newline at end of file From fdf2a52172a132a55237b15763d0b0d446dc35ec Mon Sep 17 00:00:00 2001 From: Alexander Krause Date: Thu, 12 Oct 2023 11:13:22 +0200 Subject: [PATCH 4/8] Working version, filtering on categories and brief description --- parseForPrimitiveTable.py | 158 +++++--------------------------------- 1 file changed, 21 insertions(+), 137 deletions(-) diff --git a/parseForPrimitiveTable.py b/parseForPrimitiveTable.py index 01c7eafc..605aaf8b 100644 --- a/parseForPrimitiveTable.py +++ b/parseForPrimitiveTable.py @@ -5,8 +5,9 @@ from generator.utils.yaml_utils import yaml_load_all class PrintablePrimitive: - def __init__(self, name: any, ctype_to_extension_dict: dict ) -> None: + def __init__(self, name: str, description: str, ctype_to_extension_dict: dict ) -> None: self.name = name + self.description = description self.ctype_to_extension_dict = ctype_to_extension_dict pass @@ -15,7 +16,7 @@ def __repr__(self) -> str: def to_html(self, considered_types: list, considered_exts: list) -> str: primitive_button = f"""
""" - primitive_table_start = f"""
""" + primitive_table_start = f"""

Brief: {self.description}

""" primitive_table_end = """

""" top_left_corner = """""" @@ -40,7 +41,6 @@ def to_html(self, considered_types: list, considered_exts: list) -> str: rows.append(row) html = primitive_button + primitive_table_start + "".join(rows) + primitive_table_end - print(f"My HTML: {html}") return html def get_config(config_path: Path) -> dict: @@ -70,149 +70,31 @@ def make_list_if_necessary( var: any ) -> list: return [var] return var -html_start = """ - - - - - - - -
""" -html_end = """ - - - -""" +def add_checkbox( name: str ) -> str: + return f"""
""" + +html_content = "" +with open("primitive_table.template", 'r') as template: + html_content = template.read() tsl_config = get_config(Path("generator/config/default_conf.yaml")) primitive_config = tsl_config["configuration_files"]["primitive_data"] all_types = extract_types( tsl_config ) all_extensions = extract_extensions( primitive_config["root_path"] + "/" + primitive_config["extensions_path"] ) - all_extensions.sort() -print(all_types) -print(all_extensions) - raw_primitive_dict = prepare_primitive_dict( all_types ) - table_vis_file = open( "primitives_table.html", 'w') -table_vis_file.write(html_start) - +checkbox_html = "" +primitive_html = "" for file in Path(primitive_config["root_path"] + "/" + primitive_config["primitives_path"] ).rglob("*.yaml"): - print(file) + checkbox_html += add_checkbox(file.stem) yaml_contents = yaml_load_all(file) + primitive_html += f"""
""" for doc in yaml_contents: if "primitive_name" in doc: - print(f" --- Now processing: {doc['primitive_name']}") + descr = doc["brief_description"] if "brief_description" in doc else "" ctype_ext_dict = copy.deepcopy(raw_primitive_dict) for definition in doc["definitions"]: exts = make_list_if_necessary(definition["target_extension"]) @@ -222,10 +104,12 @@ def make_list_if_necessary( var: any ) -> list: for ext in exts: ctype_ext_dict[ctype].add(ext) - pP = PrintablePrimitive(get_functor_name( doc ), ctype_ext_dict) - print( f"\t{pP}" ) - table_vis_file.write(pP.to_html( all_types, all_extensions )) - break + pP = PrintablePrimitive(get_functor_name( doc ), descr, ctype_ext_dict) + primitive_html += pP.to_html( all_types, all_extensions ) + primitive_html += f"""
""" + +html_content = html_content.replace("---filterBoxes---",checkbox_html) +html_content = html_content.replace("---content---",primitive_html) -table_vis_file.write(html_end) +table_vis_file.write(html_content) table_vis_file.close() \ No newline at end of file From 58c7f5e9cc1973b8acdc2614d1529868c5497d87 Mon Sep 17 00:00:00 2001 From: Alexander Krause Date: Thu, 12 Oct 2023 11:27:13 +0200 Subject: [PATCH 5/8] Added missing files and reset functionality --- doc/media/tsl_logo_small.png | Bin 0 -> 4900 bytes primitive_table.template | 226 +++++++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100755 doc/media/tsl_logo_small.png create mode 100755 primitive_table.template diff --git a/doc/media/tsl_logo_small.png b/doc/media/tsl_logo_small.png new file mode 100755 index 0000000000000000000000000000000000000000..8bcd9bc9bcd7a063b138fb68d241d1551700a335 GIT binary patch literal 4900 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 + + + + + + +
+
+ +
Check to filter by primitive category. If all are unchecked, no filters are applied.

---filterBoxes---
+
---content---
+
+ + + \ No newline at end of file From 28ef9d1a9ef78e5027bea64b1c5ce219154890dd Mon Sep 17 00:00:00 2001 From: Alexander Krause Date: Thu, 12 Oct 2023 12:41:09 +0200 Subject: [PATCH 6/8] Moved template and added config entry --- generator/config/default_conf.yaml | 2 ++ .../tsl_templates/expansions/primitive_table.template | 0 parseForPrimitiveTable.py | 8 +++++--- 3 files changed, 7 insertions(+), 3 deletions(-) rename primitive_table.template => generator/config/generator/tsl_templates/expansions/primitive_table.template (100%) diff --git a/generator/config/default_conf.yaml b/generator/config/default_conf.yaml index 4e5edd73..fa3f906a 100644 --- a/generator/config/default_conf.yaml +++ b/generator/config/default_conf.yaml @@ -23,6 +23,8 @@ configuration: primitive_definitions: "definitions" silent_warnings: ["-Wno-ignored-attributes", "-Wno-attributes"] expansions: + primitive_vis: + template_path: "generator/config/generator/tsl_templates/expansions/primitive_table.template" cmake: enabled: True minimum_version: "3.13" diff --git a/primitive_table.template b/generator/config/generator/tsl_templates/expansions/primitive_table.template similarity index 100% rename from primitive_table.template rename to generator/config/generator/tsl_templates/expansions/primitive_table.template diff --git a/parseForPrimitiveTable.py b/parseForPrimitiveTable.py index 605aaf8b..6e1fa996 100644 --- a/parseForPrimitiveTable.py +++ b/parseForPrimitiveTable.py @@ -73,17 +73,19 @@ def make_list_if_necessary( var: any ) -> list: def add_checkbox( name: str ) -> str: return f"""
""" -html_content = "" -with open("primitive_table.template", 'r') as template: - html_content = template.read() tsl_config = get_config(Path("generator/config/default_conf.yaml")) primitive_config = tsl_config["configuration_files"]["primitive_data"] +html_template_path = tsl_config["configuration"]["expansions"]["primitive_vis"]["template_path"] all_types = extract_types( tsl_config ) all_extensions = extract_extensions( primitive_config["root_path"] + "/" + primitive_config["extensions_path"] ) all_extensions.sort() +html_content = "" +with open(html_template_path, 'r') as template: + html_content = template.read() + raw_primitive_dict = prepare_primitive_dict( all_types ) table_vis_file = open( "primitives_table.html", 'w') checkbox_html = "" From eecbfcc95bb574a0a199bed52893a72a289b173d Mon Sep 17 00:00:00 2001 From: Johannes Pietrzyk Date: Thu, 12 Oct 2023 21:14:52 +0200 Subject: [PATCH 7/8] Added index.html --- index.html | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 index.html diff --git a/index.html b/index.html new file mode 100644 index 00000000..7dc6fcec --- /dev/null +++ b/index.html @@ -0,0 +1,226 @@ + + + + + + + +
+
+ +
Check to filter by primitive category. If all are unchecked, no filters are applied.












+

Brief: Packs elements from a vector together using a fixed bitwidth.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
+
+
-
-
int8_t
-
-
-
-
+
+
-
-
uint16_t
-
-
-
-
+
+
-
-
int16_t
-
-
-
-
+
+
-
-
uint32_t
-
-
-
-
+
+
-
-
int32_t
-
-
-
-
+
+
-
-
uint64_t
-
-
-
-
+
+
-
-
int64_t
-
-
-
-
+
+
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Packs elements from a vector together using a fixed bitwidth.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
+
+
-
-
int8_t
-
-
-
-
+
+
-
-
uint16_t
-
-
-
-
+
+
-
-
int16_t
-
-
-
-
+
+
-
-
uint32_t
-
-
-
-
+
+
-
-
int32_t
-
-
-
-
+
+
-
-
uint64_t
-
-
-
-
+
+
-
-
int64_t
-
-
-
-
+
+
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
+
+
-
-
int8_t
-
-
-
-
+
+
-
-
uint16_t
-
-
-
-
+
+
-
-
int16_t
-
-
-
-
+
+
-
-
uint32_t
-
-
-
-
+
+
-
-
int32_t
-
-
-
-
+
+
-
-
uint64_t
-
-
-
-
+
+
-
-
int64_t
-
-
-
-
+
+
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
+
+
-
-
int8_t
-
-
-
-
+
+
-
-
uint16_t
-
-
-
-
+
+
-
-
int16_t
-
-
-
-
+
+
-
-
uint32_t
-
-
-
-
+
+
-
-
int32_t
-
-
-
-
+
+
-
-
uint64_t
-
-
-
-
+
+
-
-
int64_t
-
-
-
-
+
+
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Adds two vector registers.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
+
+
+
+
+
+
int8_t
+
+
+
+
+
+
+
+
uint16_t
+
+
+
+
+
+
+
+
int16_t
+
+
+
+
+
+
+
+
uint32_t
+
+
+
+
+
+
+
+
int32_t
+
+
+
+
+
+
+
+
uint64_t
+
+
+
+
+
+
+
+
int64_t
+
+
+
+
+
+
+
+
float
+
+
+
+
+
+
+
+
double
+
+
+
+
+
+
+
+

Brief: Subtracts two vector registers.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
+
+
+
+
+
+
int8_t
+
+
+
+
+
+
+
+
uint16_t
+
+
+
+
+
+
+
+
int16_t
+
+
+
+
+
+
+
+
uint32_t
+
+
+
+
+
+
+
+
int32_t
+
+
+
+
+
+
+
+
uint64_t
+
+
+
+
+
+
+
+
int64_t
+
+
+
+
+
+
+
+
float
+
+
+
+
+
+
+
+
double
+
+
+
+
+
+
+
+

Brief: Adds two vector registers, depending on a mask: result[*] = (m[*])? vec_a[*]+vec_b[*] : vec_a[*].

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
-
-
-
+
+
int8_t
+
-
-
-
-
-
+
+
uint16_t
+
-
-
-
-
-
+
+
int16_t
+
-
-
-
-
-
+
+
uint32_t
+
-
-
-
-
-
+
+
int32_t
+
-
-
-
-
-
+
+
uint64_t
+
-
-
-
-
-
+
+
int64_t
+
-
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Multiplies two vector registers.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Reduces the elements to a sum.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: compares the values of 2 vectors and returns a vector with the minimum of each corrisponding values

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
-
+
+
+
-
int64_t
+
+
-
-
+
+
+
-
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Divides two vector registers.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
-
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Operates the modulo operation on one datavector modulo one input value.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
-
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
-
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
-
+
+
+
+
int64_t
+
+
-
-
+
+
+
+
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Reduces the elements to the maximum value.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
+
+
-
-
int8_t
-
-
-
-
+
+
-
-
uint16_t
-
-
-
-
+
+
-
-
int16_t
-
-
-
-
+
+
-
-
uint32_t
-
-
-
-
+
+
-
-
int32_t
-
-
-
-
+
+
-
-
uint64_t
-
-
-
-
+
+
-
-
int64_t
-
-
-
-
+
+
-
-
float
-
-
-
-
+
+
-
-
double
-
-
-
-
+
+
-
-

Brief: Reduces the elements to the maximum value.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
+
+
-
-
int8_t
-
-
-
-
+
+
-
-
uint16_t
-
-
-
-
+
+
-
-
int16_t
-
-
-
-
+
+
-
-
uint32_t
-
-
-
-
+
+
-
-
int32_t
-
-
-
-
+
+
-
-
uint64_t
-
-
-
-
+
+
-
-
int64_t
-
-
-
-
+
+
-
-
float
-
-
-
-
+
+
-
-
double
-
-
-
-
+
+
-
-

Brief: Forms an integral value from the most significant bits of every lane in a vector mask register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
+
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Forms an vector register from an integral where all bits are set in a lane if the corresponding mask bit is set to 1.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
-
+
int8_t
+
+
-
-
+
+
-
+
uint16_t
+
+
-
-
+
+
-
+
int16_t
+
+
-
-
+
+
-
+
uint32_t
+
+
-
-
+
+
-
+
int32_t
+
+
-
-
+
+
-
+
uint64_t
+
+
-
-
+
+
-
+
int64_t
+
+
-
+
+
+
-
+
float
+
+
-
-
+
+
-
+
double
+
+
-
-
+
+
-
+

Brief: Forms a mask type from an integral.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Binary NOT of a vector integral mask type.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
-
-
int8_t
+
+
-
-
-
-
-
-
uint16_t
+
+
-
-
-
-
-
-
int16_t
+
+
-
-
-
-
-
-
uint32_t
+
+
-
-
-
-
-
-
int32_t
+
+
-
-
-
-
-
-
uint64_t
+
+
-
-
-
-
-
-
int64_t
+
+
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Binary NOT of a vector mask type.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
-
-
int8_t
+
+
-
-
-
-
-
-
uint16_t
+
+
-
-
-
-
-
-
int16_t
+
+
-
-
-
-
-
-
uint32_t
+
+
-
-
-
-
-
-
int32_t
+
+
-
-
-
-
-
-
uint64_t
+
+
-
-
-
-
-
-
int64_t
+
+
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Binary AND of two vector mask types.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
-
-
-
+
int8_t
+
+
-
+
-
-
-
+
uint16_t
+
+
-
+
-
-
-
+
int16_t
+
+
-
+
-
-
-
+
uint32_t
+
+
-
+
-
-
-
+
int32_t
+
+
-
+
-
-
-
+
uint64_t
+
+
-
+
-
-
-
+
int64_t
+
+
-
+
-
-
-
+
float
+
+
-
+
-
-
-
+
double
+
+
-
+
-
-
-
+

Brief: Binary AND of two vector integral mask types.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
+
-
-
-
+
int8_t
+
-
-
+
-
-
-
+
uint16_t
+
-
-
+
-
-
-
+
int16_t
+
-
-
+
-
-
-
+
uint32_t
+
-
-
+
-
-
-
+
int32_t
+
-
-
+
-
-
-
+
uint64_t
+
-
-
+
-
-
-
+
int64_t
+
-
-
+
-
-
-
+
float
+
-
-
+
-
-
-
+
double
+
-
-
+
-
-
-
+

Brief: Binary OR of two vector mask types.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
-
-
-
+
int8_t
+
+
-
+
-
-
-
+
uint16_t
+
+
-
+
-
-
-
+
int16_t
+
+
-
+
-
-
-
+
uint32_t
+
+
-
+
-
-
-
+
int32_t
+
+
-
+
-
-
-
+
uint64_t
+
+
-
+
-
-
-
+
int64_t
+
+
-
+
-
-
-
+
float
+
+
-
+
-
-
-
+
double
+
+
-
+
-
-
-
+

Brief: Binary OR of two vector integral mask types.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
+
-
-
-
+
int8_t
+
-
-
+
-
-
-
+
uint16_t
+
-
-
+
-
-
-
+
int16_t
+
-
-
+
-
-
-
+
uint32_t
+
-
-
+
-
-
-
+
int32_t
+
-
-
+
-
-
-
+
uint64_t
+
-
-
+
-
-
-
+
int64_t
+
-
-
+
-
-
-
+
float
+
-
-
+
-
-
-
+
double
+
-
-
+
-
-
-
+

Brief: Binary XOR of two vector mask types.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
-
-
-
+
int8_t
+
+
-
+
-
-
-
+
uint16_t
+
+
-
+
-
-
-
+
int16_t
+
+
-
+
-
-
-
+
uint32_t
+
+
-
+
-
-
-
+
int32_t
+
+
-
+
-
-
-
+
uint64_t
+
+
-
+
-
-
-
+
int64_t
+
+
-
+
-
-
-
+
float
+
+
-
+
-
-
-
+
double
+
+
-
+
-
-
-
+

Brief: Binary XOR of two vector integral mask types.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
+
-
-
-
+
int8_t
+
-
-
+
-
-
-
+
uint16_t
+
-
-
+
-
-
-
+
int16_t
+
-
-
+
-
-
-
+
uint32_t
+
-
-
+
-
-
-
+
int32_t
+
-
-
+
-
-
-
+
uint64_t
+
-
-
+
-
-
-
+
int64_t
+
-
-
+
-
-
-
+
float
+
-
-
+
-
-
-
+
double
+
-
-
+
-
-
-
+

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Loads data from memory to a mask.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
-
+
int8_t
+
+
-
-
-
-
-
+
uint16_t
+
+
-
-
-
-
-
+
int16_t
+
+
-
-
-
-
-
+
uint32_t
+
+
-
-
-
-
-
+
int32_t
+
+
-
-
-
-
-
+
uint64_t
+
+
-
-
-
-
-
+
int64_t
+
+
-
-
-
-
-
+
float
+
+
-
-
-
-
-
+
double
+
+
-
-
-
-
-
+

Brief: Compares two vector registers for equality.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
-
double
+
+
-
+
+
+
+
-

Brief: Compares two vector registers for equality.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
-
-
-
-
-
int8_t
+
-
-
-
-
-
-
-
uint16_t
+
-
-
-
-
-
-
-
int16_t
+
-
-
-
-
-
-
-
uint32_t
+
-
-
-
-
-
-
-
int32_t
+
-
-
-
-
-
-
-
uint64_t
+
-
-
-
-
-
-
-
int64_t
+
-
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Compares two vector registers for inequality.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
-
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
-
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
-
+
+
+
+
int64_t
+
+
-
-
+
+
+
+
float
+
+
-
-
+
+
+
-
double
+
+
-
-
+
+
+
-

Brief: Checks if the values of a vector are in a specific range (min[*] <= d[*] <= max[*]).

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
+
+
+
-
int8_t
-
-
-
-
+
+
+
-
uint16_t
-
-
-
-
+
+
+
-
int16_t
-
-
-
-
+
+
+
-
uint32_t
-
-
-
-
+
+
+
-
int32_t
-
-
-
-
+
+
+
-
uint64_t
-
-
-
-
+
+
+
-
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
-
+
+
+
+
double
+
+
-
-
+
+
+
+

Brief: Tests whether left elements are smaller than the corresponding right ones.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Tests whether left elements are larger than or equal to the corresponding right ones.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Tests whether left elements are smaller than or equal to the corresponding right ones.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Tests whether left elements are larger than the corresponding right ones.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Checks if the vector register contains at least one value unequal zero.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Counts number of matches of a chosen value within a vector register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Binary ANDs two vector registers.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
-
-
+
+
double
+
+
-
+
-
-
+
+

Brief: Binary ANDs two vector registers.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
-
-
+
+
double
+
+
-
+
-
-
+
+

Brief: Binary XORs two vector registers.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
-
-
+
+
double
+
+
-
+
-
-
+
+

Brief: Arithmetic shift of data to the left by n bits.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
+
+
+
+
-
int8_t
-
-
-
+
+
+
+
-
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
-
-
-
+
-
-
-
-
double
-
-
-
+
-
-
-
-

Brief: Shifts data to left by n bits (shifting in 0).

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
+
+
+
+
-
int8_t
-
-
-
+
+
+
+
-
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Arithmetic shift of data to the right by n bits.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
+
+
+
+
-
int8_t
-
-
-
+
+
+
+
-
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Arithmetic shift of data to the right by n bits.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
+
+
+
+
-
int8_t
-
-
-
+
+
+
+
-
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Leading zeros counter.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
+
-
-
-
int8_t
-
-
-
-
+
-
-
-
uint16_t
-
-
-
-
+
-
-
-
int16_t
-
-
-
-
+
-
-
-
uint32_t
+
+
-
-
+
+
-
+
int32_t
+
+
-
-
+
+
-
+
uint64_t
+
+
-
-
+
-
-
+
int64_t
+
+
-
-
+
-
-
+
float
-
-
-
-
+
+
-
-
double
-
-
-
-
+
-
-
-

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Operates horizontal OR on vector register

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
-
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
-
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
-
+
+
+
+
int64_t
+
+
-
-
+
+
+
+
float
+
+
-
-
+
+
+
+
double
+
+
-
-
+
+
+
+

Brief: Bitwise invertion values in vector Register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
-
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
-
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
-
+
+
+
+
int64_t
+
+
-
-
+
+
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
+
+
+
+
double
+
+
-
-
+
+
+
+

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
-
-
-
-
+
int8_t
+
-
-
-
-
-
-
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
-
-
-
-
int8_t
-
-
-
-
-
-
-
-
uint16_t
-
-
-
-
-
-
-
-
int16_t
-
-
-
-
-
-
-
-
uint32_t
-
+
-
-
-
-
-
-
int32_t
-
+
-
-
-
-
-
-
uint64_t
-
-
-
-
-
-
-
-
int64_t
-
-
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
-
-
-
-
int8_t
-
-
-
-
-
-
-
-
uint16_t
-
-
-
-
-
-
-
-
int16_t
-
-
-
-
-
-
-
-
uint32_t
+
-
-
-
-
-
-
-
int32_t
+
-
-
-
-
-
-
-
uint64_t
-
-
-
-
-
-
-
-
int64_t
-
-
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
-
-
-
-
+
int8_t
+
-
-
-
-
-
-
+
uint16_t
+
-
-
-
-
-
-
+
int16_t
+
-
-
-
-
-
-
+
uint32_t
+
-
-
-
-
-
-
+
int32_t
+
-
-
-
-
-
-
+
uint64_t
+
-
-
-
-
-
-
-
int64_t
+
-
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
-
-
-
-
int8_t
-
-
-
-
-
-
-
-
uint16_t
-
-
-
-
-
-
-
-
int16_t
-
-
-
-
-
-
-
-
uint32_t
+
-
-
-
-
-
-
-
int32_t
+
-
-
-
-
-
-
-
uint64_t
+
-
-
-
-
-
-
-
int64_t
+
-
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Loads data from aligned memory into a vector register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
-
+
int8_t
+
+
-
-
-
-
-
+
uint16_t
+
+
-
-
-
-
-
+
int16_t
+
+
-
-
-
-
-
+
uint32_t
+
+
-
-
-
-
-
+
int32_t
+
+
-
-
-
-
-
+
uint64_t
+
+
-
-
-
-
-
+
int64_t
+
+
-
+
-
-
-
+
float
+
+
-
-
-
-
-
+
double
+
+
-
-
-
-
-
+

Brief: Allocates (unaligned) contiguous memory.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Allocates aligned contiguous memory.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Deallocates (possibly aligned) contiguous memory.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Copy memory.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Checks whether all elements are unique in a register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Checks whether all elements are unique in a register and returns a mask indicating which elements don't have preceeding conflicts.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Blends two registers using provided bitmask.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
-
+
int8_t
+
+
-
-
-
-
-
+
uint16_t
+
+
-
-
-
-
-
+
int16_t
+
+
-
-
-
-
-
+
uint32_t
+
+
-
-
-
-
-
+
int32_t
+
+
-
-
-
-
-
+
uint64_t
+
+
-
-
-
-
-
+
int64_t
+
+
-
-
-
-
-
+
float
+
+
-
-
-
-
-
+
double
+
+
-
-
-
-
-
+

Brief: Blends or add two registers using provided bitmask

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
-
-
int8_t
+
+
-
-
-
-
-
-
uint16_t
+
+
-
-
-
-
-
-
int16_t
+
+
-
-
-
-
-
-
uint32_t
+
+
-
-
-
-
-
-
int32_t
+
+
-
-
-
-
-
-
uint64_t
+
+
-
-
-
-
-
-
int64_t
+
+
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Returns a vector register with undefined data inside.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
-
+
int8_t
+
+
-
-
-
-
-
+
uint16_t
+
+
-
-
-
-
-
+
int16_t
+
+
-
-
-
-
-
+
uint32_t
+
+
-
-
-
-
-
+
int32_t
+
+
-
-
-
-
-
+
uint64_t
+
+
-
-
-
-
-
+
int64_t
+
+
-
-
-
-
-
+
float
+
+
-
-
-
-
-
+
double
+
+
-
-
-
-
-
+

Brief: Loads data from aligned memory into a vector register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
-
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
-
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
-
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
-
+
+
+
+
double
+
+
-
-
+
+
+
+

Brief: Loads data from (un)aligned memory into a vector register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Stores data from a vector register to aligned memory.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
-
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
-
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
-
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
-
+
+
+
+
double
+
+
-
-
+
+
+
+

Brief: Stores data from a vector register to (un)aligned memory.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
-
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
-
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
-
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
-
+
+
+
+
double
+
+
-
-
+
+
+
+

Brief: Stores SIMD register to array.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Broadcasts a single value into all lanes of a vector register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
+
+
+
+
+
int8_t
+
+
-
+
+
+
+
+
uint16_t
+
+
-
+
+
+
+
+
int16_t
+
+
-
+
+
+
+
+
uint32_t
+
+
-
+
+
+
+
+
int32_t
+
+
-
+
+
+
+
+
uint64_t
+
+
-
+
+
+
+
+
int64_t
+
+
-
+
+
+
+
+
float
+
+
-
+
+
+
+
+
double
+
+
-
+
+
+
+
+

Brief: Set all lanes to zero.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
+
+
+
+
int8_t
+
+
-
-
+
+
+
+
uint16_t
+
+
-
-
+
+
+
+
int16_t
+
+
-
-
+
+
+
+
uint32_t
+
+
-
-
+
+
+
+
int32_t
+
+
-
-
+
+
+
+
uint64_t
+
+
-
-
+
+
+
+
int64_t
+
+
-
-
+
+
+
+
float
+
+
-
-
+
+
+
+
double
+
+
-
-
+
+
+
+

Brief: Transfers provided elements into a vector register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Creates a sequence [0..SIMD-Reg-Element-Count].

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Creates a sequence.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Transfers data from arbitrary locations into a vector register.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
-
-
+
+
int8_t
-
-
-
-
-
-
+
+
uint16_t
-
-
-
-
-
-
+
+
int16_t
-
-
-
-
-
-
+
+
uint32_t
-
+
-
-
-
-
+
+
int32_t
-
+
-
-
-
-
+
+
uint64_t
-
+
-
-
-
-
+
+
int64_t
-
+
-
+
-
-
+
+
float
-
+
-
-
-
-
+
+
double
-
+
-
-
-
-
+
+

Brief: If mask[i] is 1, load memory[index[i] * scale], otherwise use source[i]

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
-
-
-
-
-
-
+
+
int8_t
-
-
-
-
-
-
+
+
uint16_t
-
-
-
-
-
-
+
+
int16_t
-
-
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
+
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Transfers data from a vector register to an arbitrary locations.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
+
-
-
+
+
int8_t
+
-
-
+
-
-
+
+
uint16_t
+
-
-
+
-
-
+
+
int16_t
+
-
-
+
-
-
+
+
uint32_t
+
+
-
+
-
-
+
+
int32_t
+
+
-
+
-
-
+
+
uint64_t
+
+
-
+
-
-
+
+
int64_t
+
+
-
+
-
-
+
+
float
+
+
-
+
-
-
+
+
double
+
+
-
+
-
-
+
+

Brief: Transfers data from a vector register to an arbitrary locations.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
+
-
-
+
+
int8_t
+
-
-
+
-
-
+
+
uint16_t
+
-
-
+
-
-
+
+
int16_t
+
-
-
+
-
-
+
+
uint32_t
+
+
-
+
-
-
+
+
int32_t
+
+
-
+
-
-
+
+
uint64_t
+
+
-
+
-
-
+
+
int64_t
+
+
-
+
-
-
+
+
float
+
+
-
+
-
-
+
+
double
+
+
-
+
-
-
+
+

Brief: Stores elements from data consecutively, if the corresponding bit in mask is set to 1.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Loads contiguos data from a specified memory location and puts the elements using write mask.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
-
-
int8_t
+
+
-
-
-
-
-
-
uint16_t
+
+
-
-
-
-
-
-
int16_t
+
+
-
-
-
-
-
-
uint32_t
+
+
-
-
-
-
-
-
int32_t
+
+
-
-
-
-
-
-
uint64_t
+
+
-
-
-
-
-
-
int64_t
+
+
-
-
-
-
-
-
float
+
+
-
-
-
-
-
-
double
+
+
-
-
-
-
-
-

Brief:

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
-
-
-
-
-
-
-
int8_t
+
-
-
-
-
-
-
-
uint16_t
+
-
-
-
-
-
-
-
int16_t
+
-
-
-
-
-
-
-
uint32_t
+
-
-
-
-
-
-
-
int32_t
+
-
-
-
-
-
-
-
uint64_t
-
-
-
-
-
-
-
-
int64_t
-
-
-
-
-
-
-
-
float
-
-
-
-
-
-
-
-
double
-
-
-
-
-
-
-
-

Brief: Partially override a Vector with a single value.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Copy elements from a vector, where the mask bit it set, otherwise write zero

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Merge two vectors while picking the source of each element based on the corresponding mask bit

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

Brief: Extracts value on given index.

avx2avx512cudaneononeAPIfpgaoneAPIfpgaRTLscalarsse
uint8_t
+
+
-
-
-
-
+
+
int8_t
+
+
-
-
-
-
+
+
uint16_t
+
+
-
-
-
-
+
+
int16_t
+
+
-
-
-
-
+
+
uint32_t
+
+
-
-
-
-
+
+
int32_t
+
+
-
-
-
-
+
+
uint64_t
+
+
-
-
-
-
+
+
int64_t
+
+
-
-
-
-
+
+
float
+
+
-
-
-
-
+
+
double
+
+
-
-
-
-
+
+

+
+ + + \ No newline at end of file From 36c0aa46bfc75fe9b18f60e9ad4ae97152e89326 Mon Sep 17 00:00:00 2001 From: Johannes Pietrzyk Date: Thu, 12 Oct 2023 22:47:33 +0200 Subject: [PATCH 8/8] Added primitive vis into TSL generation workflow --- .github/workflows/upload_indexhtml.yml | 67 ++++++++++++++ generator/config/default_conf.yaml | 2 + generator/core/tsl_config.py | 1 + generator/core/tsl_generator.py | 5 ++ main.py | 1 + parseForPrimitiveTable.py | 116 ++++++++++++++++++------- 6 files changed, 162 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/upload_indexhtml.yml diff --git a/.github/workflows/upload_indexhtml.yml b/.github/workflows/upload_indexhtml.yml new file mode 100644 index 00000000..7db24563 --- /dev/null +++ b/.github/workflows/upload_indexhtml.yml @@ -0,0 +1,67 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - + name: 'Install packages for generator' + run: | + sudo apt-get update + sudo apt-get install graphviz-dev util-linux + - + name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11 + - + name: 'Install python dependencies for generator' + run: | + python -m pip install --upgrade pip + pip3 install ruff + if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi + - + name: Try generating the whole TSL with python ${{ matrix.python-version }} + id: generate + continue-on-error: true + run: | + python main.py --print-outputs-only + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Upload entire repository + path: './index.html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/generator/config/default_conf.yaml b/generator/config/default_conf.yaml index fa3f906a..071caff2 100644 --- a/generator/config/default_conf.yaml +++ b/generator/config/default_conf.yaml @@ -24,7 +24,9 @@ configuration: silent_warnings: ["-Wno-ignored-attributes", "-Wno-attributes"] expansions: primitive_vis: + enabled: True template_path: "generator/config/generator/tsl_templates/expansions/primitive_table.template" + target_path: "./index.html" cmake: enabled: True minimum_version: "3.13" diff --git a/generator/core/tsl_config.py b/generator/core/tsl_config.py index 9eba0894..349ee914 100644 --- a/generator/core/tsl_config.py +++ b/generator/core/tsl_config.py @@ -438,6 +438,7 @@ def parse_args(**kwargs) -> dict: help="", metavar="ExOutPath") parser.add_argument('--generate-readme-files', dest='configuration:expansions:readme_md:enabled', action="store_true", required=False, help="Add README.md generation step.") + parser.add_argument('--generate-index-html', dest='configuration:expansions:primitive_vis:enabled', action="store_false", required=False, help="Add README.md generation step.") parser.add_argument('--no-debug-info', dest='configuration:debug_generator', action='store_false', required=False) add_bool_arg(parser, 'workaround-warnings', 'configuration:emit_workaround_warnings', "Enable ", "Disable ", True, help='workaround warnings', required=False) diff --git a/generator/core/tsl_generator.py b/generator/core/tsl_generator.py index 6caea5bc..eaa6b015 100644 --- a/generator/core/tsl_generator.py +++ b/generator/core/tsl_generator.py @@ -3,6 +3,7 @@ from pathlib import Path from typing import List + from generator.core.ctrl.tsl_libfile_generator import TSLFileGenerator from generator.expansions.tsl_cmake import TSLCMakeGenerator from generator.core.ctrl.tsl_lib import TSLLib @@ -17,6 +18,7 @@ from generator.utils.log_utils import LogInit from generator.utils.requirement import requirement from generator.utils.yaml_utils import yaml_load, yaml_load_all, yaml_store +from parseForPrimitiveTable import create_primitive_index_html class TSLGenerator: @@ -188,6 +190,9 @@ def generate(self, relevant_hardware_flags: List[str] = None, relevant_primitive lib: TSLLib = TSLLib(relevant_extensions_set, relevant_primitives_class_set) + if config.expansion_enabled("primitive_vis"): + create_primitive_index_html(lib) + dep_graph = TSLDependencyGraph(lib) if not dep_graph.is_acyclic(): self.log(logging.ERROR, "Dependency graph for primitive definitions is not acyclic. Please check your dependencies.") diff --git a/main.py b/main.py index 93e3d1c5..72a3bf35 100755 --- a/main.py +++ b/main.py @@ -29,6 +29,7 @@ def tsl_setup(file_config, additional_config=None) -> None: file_config = get_config(Path("generator/config/default_conf.yaml")) args_dict = parse_args(known_types = file_config["configuration"]["relevant_types"]) tsl_setup(file_config, args_dict) + gen = TSLGenerator() if config.get_config_entry("clean"): diff --git a/parseForPrimitiveTable.py b/parseForPrimitiveTable.py index 6e1fa996..e2512274 100644 --- a/parseForPrimitiveTable.py +++ b/parseForPrimitiveTable.py @@ -1,8 +1,14 @@ from pathlib import Path import copy +import os +import sys +from typing import List +from generator.core.tsl_config import config, parse_args +from generator.utils.dict_utils import dict_update from generator.utils.yaml_utils import yaml_load from generator.utils.yaml_utils import yaml_load_all +from generator.core.ctrl.tsl_lib import TSLLib class PrintablePrimitive: def __init__(self, name: str, description: str, ctype_to_extension_dict: dict ) -> None: @@ -73,45 +79,95 @@ def make_list_if_necessary( var: any ) -> list: def add_checkbox( name: str ) -> str: return f"""
""" +def create_primitive_index_html(tsl_lib: TSLLib) -> None: + html_template_path = config.get_expansion_config("primitive_vis")["template_path"] + table_vis_file = open(config.get_expansion_config("primitive_vis")["target_path"], 'w') -tsl_config = get_config(Path("generator/config/default_conf.yaml")) -primitive_config = tsl_config["configuration_files"]["primitive_data"] -html_template_path = tsl_config["configuration"]["expansions"]["primitive_vis"]["template_path"] + all_types: List[str] = config.relevant_types + all_extensions: List[str] = tsl_lib.extension_set.known_extensions -all_types = extract_types( tsl_config ) -all_extensions = extract_extensions( primitive_config["root_path"] + "/" + primitive_config["extensions_path"] ) -all_extensions.sort() + html_content = "" + with open(html_template_path, 'r') as template: + html_content = template.read() + + raw_primitive_dict = prepare_primitive_dict(all_types) + checkbox_html = "" + primitive_html = "" + primitive_classes = [primitive_class for primitive_class in tsl_lib.primitive_class_set] + primitive_classes.sort(key=lambda primitive_class: primitive_class.name) + for primitive_class in sorted(tsl_lib.primitive_class_set, key=lambda primitive_class: primitive_class.name): + checkbox_html += add_checkbox(primitive_class.name) + primitive_html += f"""
""" + for primitive in primitive_class: + name = primitive.declaration.functor_name + brief_description = primitive.declaration.data["brief_description"] + detailed_description = primitive.declaration.data["detailed_description"] + ctype_ext_dict = copy.deepcopy(raw_primitive_dict) + for definition in primitive.definitions: + for target_extension, ctype_list in primitive.specialization_dict().items(): + for ctype in ctype_list: + ctype_ext_dict[ctype].add(target_extension) + pP = PrintablePrimitive(name, brief_description, ctype_ext_dict) + primitive_html += pP.to_html(all_types, all_extensions) + primitive_html += f"""
""" + html_content = html_content.replace("---filterBoxes---",checkbox_html) + html_content = html_content.replace("---content---",primitive_html) + + table_vis_file.write(html_content) + table_vis_file.close() + +if __name__ == '__main__': + def get_config(config_path: Path) -> dict: + return yaml_load(config_path) -html_content = "" -with open(html_template_path, 'r') as template: + def tsl_setup(file_config, additional_config=None) -> None: + if additional_config is None: + additional_config = dict() + # overwrite / extend config file entries with additional config dict entries + merged_config = dict_update(file_config, additional_config) + config.setup(merged_config) + + os.chdir(Path(os.path.realpath(__file__)).parent) + file_config = get_config(Path("generator/config/default_conf.yaml")) + args_dict = parse_args(known_types = file_config["configuration"]["relevant_types"]) + tsl_setup(file_config, args_dict) + + html_template_path = config.get_expansion_config("primitive_vis")["template_path"] + + all_types = config.relevant_types + all_extensions = extract_extensions(config.get_primitive_files_path("extensions_path")) + all_extensions.sort() + + html_content = "" + with open(html_template_path, 'r') as template: html_content = template.read() -raw_primitive_dict = prepare_primitive_dict( all_types ) -table_vis_file = open( "primitives_table.html", 'w') -checkbox_html = "" -primitive_html = "" -for file in Path(primitive_config["root_path"] + "/" + primitive_config["primitives_path"] ).rglob("*.yaml"): + raw_primitive_dict = prepare_primitive_dict( all_types ) + table_vis_file = open(config.get_expansion_config("primitive_vis")["target_path"], 'w') + checkbox_html = "" + primitive_html = "" + for file in Path(config.get_primitive_files_path("primitives_path")).rglob("*.yaml"): checkbox_html += add_checkbox(file.stem) yaml_contents = yaml_load_all(file) primitive_html += f"""
""" for doc in yaml_contents: - if "primitive_name" in doc: - descr = doc["brief_description"] if "brief_description" in doc else "" - ctype_ext_dict = copy.deepcopy(raw_primitive_dict) - for definition in doc["definitions"]: - exts = make_list_if_necessary(definition["target_extension"]) - ctypes = make_list_if_necessary(definition["ctype"]) - - for ctype in ctypes: - for ext in exts: - ctype_ext_dict[ctype].add(ext) - - pP = PrintablePrimitive(get_functor_name( doc ), descr, ctype_ext_dict) - primitive_html += pP.to_html( all_types, all_extensions ) + if "primitive_name" in doc: + descr = doc["brief_description"] if "brief_description" in doc else "" + ctype_ext_dict = copy.deepcopy(raw_primitive_dict) + for definition in doc["definitions"]: + exts = make_list_if_necessary(definition["target_extension"]) + ctypes = make_list_if_necessary(definition["ctype"]) + + for ctype in ctypes: + for ext in exts: + ctype_ext_dict[ctype].add(ext) + + pP = PrintablePrimitive(get_functor_name( doc ), descr, ctype_ext_dict) + primitive_html += pP.to_html( all_types, all_extensions ) primitive_html += f"""
""" -html_content = html_content.replace("---filterBoxes---",checkbox_html) -html_content = html_content.replace("---content---",primitive_html) + html_content = html_content.replace("---filterBoxes---",checkbox_html) + html_content = html_content.replace("---content---",primitive_html) -table_vis_file.write(html_content) -table_vis_file.close() \ No newline at end of file + table_vis_file.write(html_content) + table_vis_file.close() \ No newline at end of file