Skip to content

Commit a2d23dc

Browse files
authored
Merge pull request #875 from PatKamin/expose-serialization
Move serialization functions to include
2 parents b3506f4 + 5f0e6d4 commit a2d23dc

File tree

11 files changed

+5595
-5697
lines changed

11 files changed

+5595
-5697
lines changed

source/common/ur_params.hpp renamed to include/ur_print.hpp

Lines changed: 5430 additions & 5592 deletions
Large diffs are not rendered by default.

scripts/Doxyfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,8 @@ RECURSIVE = YES
848848
# Note that relative paths are relative to the directory from which doxygen is
849849
# run.
850850

851-
EXCLUDE = README.md
851+
EXCLUDE = README.md \
852+
../include/ur_print.hpp
852853

853854
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
854855
# directories that are symbolic links (a Unix file system feature) are excluded

scripts/core/INTRO.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ and followed by a digit or uppercase letter are reserved for use by the implemen
145145
Applications which use Unified Runtime must not provide definitions of these symbols.
146146
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.
147147

148+
Printing API
149+
------------
150+
## --validate=off
151+
The header "${x}_print.hpp" contains the "${x}::print" namespace with the output stream operator (<<) overloads for Unified Runtime objects.
152+
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
153+
a given function.
154+
## --validate=on
155+
148156
Tracing
149157
---------------------
150158

scripts/generate_code.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def _generate_api_cpp(incpath, srcpath, namespace, tags, version, revision, spec
9797
loc = _mako_api_h(incpath, namespace, tags, version, revision, specs, meta)
9898
loc += _mako_api_cpp(srcpath, namespace, tags, version, revision, specs, meta)
9999
loc += _mako_ddi_h(incpath, namespace, tags, version, revision, specs, meta)
100+
loc += _mako_print_hpp(incpath, namespace, tags, version, revision, specs, meta)
100101

101102
return loc
102103

@@ -278,11 +279,11 @@ def _mako_tracing_layer_cpp(path, namespace, tags, version, specs, meta):
278279
"""
279280
generates c/c++ files from the specification documents
280281
"""
281-
def _mako_params_hpp(path, namespace, tags, version, specs, meta):
282-
template = "params.hpp.mako"
282+
def _mako_print_hpp(path, namespace, tags, version, revision, specs, meta):
283+
template = "print.hpp.mako"
283284
fin = os.path.join(templates_dir, template)
284285

285-
name = "%s_params"%(namespace)
286+
name = "%s_print"%(namespace)
286287
filename = "%s.hpp"%(name)
287288
fout = os.path.join(path, filename)
288289

@@ -291,6 +292,7 @@ def _mako_params_hpp(path, namespace, tags, version, specs, meta):
291292
fin, fout,
292293
name=name,
293294
ver=version,
295+
rev=revision,
294296
namespace=namespace,
295297
tags=tags,
296298
specs=specs,
@@ -361,6 +363,5 @@ def generate_common(path, section, namespace, tags, version, specs, meta):
361363
os.makedirs(layer_dstpath, exist_ok=True)
362364

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

0 commit comments

Comments
 (0)