|
CorTeX Core ABI 7
ToolTech Software · C++ library reference
|
Retains one authoritative graph and an optional complete semantic snapshot. More...
#include <ctxGraphPersistence.h>
Public Member Functions | |
| ctxGraphDocument () | |
| ctxGraphDocument (const ctxGraphDocument &document) | |
| ~ctxGraphDocument () | |
| ctxGraphDocument & | operator= (const ctxGraphDocument &document) |
| gzGUID | getDefinitionID () const |
| ctxGraph | getGraph () const |
| Returns the same retained graph; editing the returned value uses graph COW. | |
| gzBool | hasParameters () const |
| gzBool | captureParameters (ctxModel &source, gzString &error) |
| Captures a quiescent compiled model bound to this exact retained graph. | |
| gzBool | restoreModel (const ctxBuildRequest &build, const ctxCompileOptions &compile, ctxModelPtr &result, ctxParameterRestoreReport &report, gzString &error) const |
| Explicitly builds/compiles an owned Evaluation candidate for this exact graph. | |
| gzBool | save (gzSerializeAdapter *adapter, const gzString &formatID, gzBool embedParameters, gzString &error) const |
| Pins the handler before callbacks; does not flush, close or rewind the adapter. | |
Static Public Member Functions | |
| static gzBool | fromGraph (const gzGUID &definitionID, const ctxGraph &graph, ctxGraphDocument &result, gzString &error) |
| A non-null, caller-assigned persistent definition identity is required. | |
| static gzBool | load (gzSerializeAdapter *adapter, const gzString &formatID, ctxGraphDocument &result, gzString &error) |
| Publishes only a valid successful candidate; failed reads preserve result. | |
| static gzBool | load (const gzString &url, ctxGraphDocument &result, gzString &error) |
| Loads through an owned SDK URL input using its registered filename suffix. | |
| static gzBool | registerFormat (const gzString &formatID, const gzString &suffix, ctxGraphDocumentFormat *handler, gzString *error=NULL) |
| IDs and lowercase ASCII suffixes are unique; built-in profile names are reserved. | |
| static gzBool | unregisterFormat (const gzString &formatID, gzString *error=NULL) |
Friends | |
| class | ctxGraph |
| class | ctxGraphDocumentFormat |
Retains one authoritative graph and an optional complete semantic snapshot.
Registered adapter formats supply their own preflight and serialization. Core installs ctx.graph.json/1 and ctx.graph.xml/1 on first registry use. XML reads require unchanged SDK XML type registrations throughout the call. URL loading selects a registered suffix; owned URL saving is not delivered. Copies share immutable state; successful capture publishes a new state.
Definition at line 166 of file ctxGraphPersistence.h.
| ctxGraphDocument::ctxGraphDocument | ( | ) |
References CTX_EXPORT.
Referenced by ctxGraphDocument(), ctxGraphDocumentFormat, fromGraph(), load(), load(), and operator=().
| ctxGraphDocument::ctxGraphDocument | ( | const ctxGraphDocument & | document | ) |
References CTX_EXPORT, and ctxGraphDocument().
| ctxGraphDocument::~ctxGraphDocument | ( | ) |
References CTX_EXPORT.
| gzBool ctxGraphDocument::captureParameters | ( | ctxModel & | source, |
| gzString & | error ) |
Captures a quiescent compiled model bound to this exact retained graph.
Supports native rank-one FLOAT Input/Dense/Activation/Output with LINEAR/TANH and unshared implicit or matching-index explicit projections. The current qualification scope is Evaluation with EVALUATE_GENETIC. Failure leaves this document, the source bank and its update ID unchanged.
References CTX_EXPORT.
|
static |
A non-null, caller-assigned persistent definition identity is required.
References CTX_EXPORT, ctxGraph, and ctxGraphDocument().
| gzGUID ctxGraphDocument::getDefinitionID | ( | ) | const |
References CTX_EXPORT.
| ctxGraph ctxGraphDocument::getGraph | ( | ) | const |
Returns the same retained graph; editing the returned value uses graph COW.
References CTX_EXPORT, and ctxGraph.
| gzBool ctxGraphDocument::hasParameters | ( | ) | const |
References CTX_EXPORT.
|
static |
Loads through an owned SDK URL input using its registered filename suffix.
Pins the handler before opening the URL; releases input ownership before publication. Uses SDK URL resolution; no model build, initialization or restore is performed. Failure preserves result. SDK close durability is not an input-load guarantee.
References CTX_EXPORT, and ctxGraphDocument().
|
static |
Publishes only a valid successful candidate; failed reads preserve result.
References CTX_EXPORT, and ctxGraphDocument().
| ctxGraphDocument & ctxGraphDocument::operator= | ( | const ctxGraphDocument & | document | ) |
References CTX_EXPORT, and ctxGraphDocument().
|
static |
IDs and lowercase ASCII suffixes are unique; built-in profile names are reserved.
References CTX_EXPORT, and ctxGraphDocumentFormat.
| gzBool ctxGraphDocument::restoreModel | ( | const ctxBuildRequest & | build, |
| const ctxCompileOptions & | compile, | ||
| ctxModelPtr & | result, | ||
| ctxParameterRestoreReport & | report, | ||
| gzString & | error ) const |
Explicitly builds/compiles an owned Evaluation candidate for this exact graph.
Pins the immutable source document through external binding/compiler callbacks. Retained source/target contracts are checked before keys. Matching scalars retain exact finite bits; new scalars keep ordinary build/compile initialization. Success publishes the model and complete semantic report; failure preserves both outputs. Global RNG/allocator and external callback effects are not undone.
References CTX_EXPORT.
| gzBool ctxGraphDocument::save | ( | gzSerializeAdapter * | adapter, |
| const gzString & | formatID, | ||
| gzBool | embedParameters, | ||
| gzString & | error ) const |
Pins the handler before callbacks; does not flush, close or rewind the adapter.
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
|
friend |
Definition at line 224 of file ctxGraphPersistence.h.
References ctxGraph.
Referenced by ctxGraph, ctxGraphDocumentFormat, fromGraph(), and getGraph().
|
friend |
Definition at line 225 of file ctxGraphPersistence.h.
References ctxGraph, ctxGraphDocument(), and ctxGraphDocumentFormat.
Referenced by ctxGraphDocumentFormat, and registerFormat().