Skip to content

Commit

Permalink
Merge branch 'main' into new-adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
omarahmed1111 committed Oct 24, 2023
2 parents 3303968 + a2d23dc commit 3a50abf
Show file tree
Hide file tree
Showing 12 changed files with 4,794 additions and 4,237 deletions.
8,786 changes: 4,642 additions & 4,144 deletions source/common/ur_params.hpp → include/ur_print.hpp

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion scripts/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,8 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE = README.md
EXCLUDE = README.md \
../include/ur_print.hpp

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down
8 changes: 8 additions & 0 deletions scripts/core/INTRO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ and followed by a digit or uppercase letter are reserved for use by the implemen
Applications which use Unified Runtime must not provide definitions of these symbols.
This allows the Unified Runtime shared library to be updated with additional symbols for new API versions or extensions without causing symbol conflicts with existing applications.

Printing API
------------
## --validate=off
The header "${x}_print.hpp" contains the "${x}::print" namespace with the output stream operator (<<) overloads for Unified Runtime objects.
There is also the "${x}::extras::printFunctionParams" function for printing function parameters. These parameters have to be provided in a \*params_t struct format suitable for
a given function.
## --validate=on

Tracing
---------------------

Expand Down
9 changes: 5 additions & 4 deletions scripts/generate_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def _generate_api_cpp(incpath, srcpath, namespace, tags, version, revision, spec
loc = _mako_api_h(incpath, namespace, tags, version, revision, specs, meta)
loc += _mako_api_cpp(srcpath, namespace, tags, version, revision, specs, meta)
loc += _mako_ddi_h(incpath, namespace, tags, version, revision, specs, meta)
loc += _mako_print_hpp(incpath, namespace, tags, version, revision, specs, meta)

return loc

Expand Down Expand Up @@ -278,11 +279,11 @@ def _mako_tracing_layer_cpp(path, namespace, tags, version, specs, meta):
"""
generates c/c++ files from the specification documents
"""
def _mako_params_hpp(path, namespace, tags, version, specs, meta):
template = "params.hpp.mako"
def _mako_print_hpp(path, namespace, tags, version, revision, specs, meta):
template = "print.hpp.mako"
fin = os.path.join(templates_dir, template)

name = "%s_params"%(namespace)
name = "%s_print"%(namespace)
filename = "%s.hpp"%(name)
fout = os.path.join(path, filename)

Expand All @@ -291,6 +292,7 @@ def _mako_params_hpp(path, namespace, tags, version, specs, meta):
fin, fout,
name=name,
ver=version,
rev=revision,
namespace=namespace,
tags=tags,
specs=specs,
Expand Down Expand Up @@ -380,7 +382,6 @@ def generate_common(path, section, namespace, tags, version, specs, meta):
os.makedirs(layer_dstpath, exist_ok=True)

loc = 0
loc += _mako_params_hpp(layer_dstpath, namespace, tags, version, specs, meta)
print("COMMON Generated %s lines of code.\n"%loc)

"""
Expand Down
Loading

0 comments on commit 3a50abf

Please sign in to comment.