Skip to content
Snippets Groups Projects
Commit 1bbc1dcb authored by Cyril Moineau's avatar Cyril Moineau
Browse files

[MINOR] format update.

parent 782c9102
No related branches found
No related tags found
3 merge requests!279v0.4.0,!253v0.4.0,!163Export refactor
Pipeline #56679 failed
from typing import Dict, List, Set, Type from typing import Dict, List
import aidge_core import aidge_core
from aidge_core.export_utils import ExportNode from aidge_core.export_utils import ExportNode
from abc import ABC
from enum import Enum
# Language
LANGUAGE = Enum('LANGUAGE', ['Cpp/C'])
class classproperty: class classproperty:
"""Helper class to define class properties, """Helper class to define class properties,
...@@ -35,7 +29,7 @@ class ExportLib(aidge_core.OperatorImpl): ...@@ -35,7 +29,7 @@ class ExportLib(aidge_core.OperatorImpl):
# Value: Path where to copy the file relative to the export root # Value: Path where to copy the file relative to the export root
static_files: Dict[str, str] = {} static_files: Dict[str, str] = {}
# PRIVATE # PRIVATE
# Registry of exportNode, class level dictionary, shared accross all ExportLib # Registry of exportNode, class level dictionary, shared across all ExportLib
_cls_export_node_registry = {} _cls_export_node_registry = {}
def __init__(self, operator): def __init__(self, operator):
......
...@@ -19,12 +19,12 @@ static {{mem_ctype}} mem[{{peak_mem}}]; ...@@ -19,12 +19,12 @@ static {{mem_ctype}} mem[{{peak_mem}}];
{# Forward function #} {# Forward function #}
{#- Support multiple inputs with different datatypes and multiple outputs with different datatypes -#} {#- Support multiple inputs with different datatypes and multiple outputs with different datatypes -#}
void {{ func_name }} ( void {{ func_name }} (
{%- for i in range(inputs_name | length) %} {%- for i in range(inputs_name | length) -%}
const {{ inputs_dtype[i] }}* {{ inputs_name[i] }}, const {{ inputs_dtype[i] }}* {{ inputs_name[i] }},
{% endfor -%} {%- endfor -%}
{%- for o in range(outputs_name | length) %} {%- for o in range(outputs_name | length) -%}
{{ outputs_dtype[o] }}** {{ outputs_name[o] }}_ptr{% if not loop.last %}, {% endif %} {{ outputs_dtype[o] }}** {{ outputs_name[o] }}_ptr{% if not loop.last %}, {% endif %}
{% endfor -%}) {%- endfor -%})
{ {
{%- for action in actions %} {%- for action in actions %}
......
...@@ -11,12 +11,12 @@ extern "C" { ...@@ -11,12 +11,12 @@ extern "C" {
{%- endfor %} {%- endfor %}
void {{ func_name }} ( void {{ func_name }} (
{%- for i in range(inputs_name | length) %} {%- for i in range(inputs_name | length) -%}
const {{ inputs_dtype[i] }}* {{ inputs_name[i] }}, const {{ inputs_dtype[i] }}* {{ inputs_name[i] }},
{% endfor -%} {%- endfor -%}
{%- for o in range(outputs_name | length) %} {%- for o in range(outputs_name | length) %}
{{ outputs_dtype[o] }}** {{ outputs_name[o] }}{% if not loop.last %}, {% endif %} {{ outputs_dtype[o] }}** {{ outputs_name[o] }}{% if not loop.last %}, {% endif %}
{% endfor -%}); {%- endfor -%});
#ifdef __cplusplus #ifdef __cplusplus
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment