Skip to content

Commit

Permalink
Merge pull request #875 from PatKamin/expose-serialization
Browse files Browse the repository at this point in the history
Move serialization functions to include
  • Loading branch information
pbalcer committed Oct 24, 2023
2 parents b3506f4 + 5f0e6d4 commit a2d23dc
Show file tree
Hide file tree
Showing 11 changed files with 5,595 additions and 5,697 deletions.
11,022 changes: 5,430 additions & 5,592 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 @@ -361,6 +363,5 @@ 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)

Loading

0 comments on commit a2d23dc

Please sign in to comment.