|
CorTeX Core ABI 7
ToolTech Software · C++ library reference
|
#include <ctxGraph.h>
Public Member Functions | |
| ctxGraph () | |
| gzBool | addLayer (const ctxLayer &layer) |
| gzBool | addInput (const gzString &path, gzUInt32 values) |
| gzBool | addDense (const gzString &path, gzUInt32 neurons, ctxNeuronType type=CTX_NEURON_TYPE_DEFAULT) |
| gzBool | addDenseFrom (const gzString &path, gzUInt32 neurons, const ctxPortRef &source, ctxNeuronType type=CTX_NEURON_TYPE_DEFAULT) |
| Stages DenseFrom and its complete selected source in one candidate. | |
| gzBool | addActivation (const gzString &path, gzUInt32 values, ctxNeuronType type=CTX_NEURON_TYPE_DEFAULT) |
| gzBool | addAdd (const gzString &path, gzUInt32 values, const ctxPortRef &left, const ctxPortRef &right) |
| Atomically authors Add and both full ZIP inputs; no bare Add is staged. | |
| gzBool | addMultiply (const gzString &path, gzUInt32 values, const ctxPortRef &left, const ctxPortRef &right) |
| Atomically authors Multiply and both whole ZIP inputs, including aliases. | |
| gzBool | addConvolution2D (const gzString &path, ctxIndexControl source, ctxIndexControl filter, ctxNeuronType type=CTX_NEURON_TYPE_DEFAULT, gzBool sharedBias=TRUE, gzUInt32 maxDebugFeatures=0) |
| gzBool | addOutput (const gzString &path, gzUInt32 values, ctxNeuronType type=CTX_NEURON_TYPE_DEFAULT) |
| gzUInt32 | getOperationCount () const |
| ctxGraphIdentity | getIdentity () const |
| const ctxGraphOperation * | getOperation (gzUInt32 index) const |
| const ctxGraphOperation * | getOperationByID (gzUInt32 occurrenceID) const |
| gzUInt32 | getOperationIndex (gzUInt32 occurrenceID) const |
| ctxLayerRef | getLayer (gzUInt32 index) const |
| ctxLayerRef | layer (const gzString &name) const |
| ctxLayerRefList | layers () const |
| ctxLayerRefList | layers (const gzString &name) const |
| gzUInt32 | getLayerCount (const gzString &name) const |
| ctxHandleStatus | getHandleStatus (const ctxLayerRef &layer) const |
| ctxHandleStatus | getHandleStatus (const ctxNodeRef &node) const |
| ctxHandleStatus | getHandleStatus (const ctxNodeRangeRef &nodes) const |
| ctxHandleStatus | getHandleStatus (const ctxPortRef &port) const |
| ctxHandleStatus | getHandleStatus (const ctxValueRef &value) const |
| ctxHandleStatus | getHandleStatus (const ctxValue &value) const |
| ctxValue | value (const ctxPortRef &output) const |
| Rebinds a whole result to this revision; changed ancestor shapes fail. | |
| gzBool | apply (const ctxLayer &layer, const ctxValue &input, ctxValue &result) |
| Atomically authors occurrence and full explicit edge; result is unchanged on failure. | |
| gzBool | apply (const ctxLayer &layer, const ctxValue &left, const ctxValue &right, ctxValue &result) |
| Binary Add/Multiply accepts current or shape-preserving ancestor values. | |
| gzBool | applyRmsNorm (const gzString &name, gzUInt32 axis, const ctxValue &input, ctxValue &result) |
| Atomically authors "name/rstd" = ReduceInverseRms(axis) over input and "name" = MultiplyBroadcast(axis)(input, rstd); graph and result are unchanged on failure. | |
| gzBool | apply (const ctxModule &module, const gzString &prefix, const ctxValue &input, ctxValue &result) |
| Copies a captured module atomically; graph and result remain unchanged on failure. | |
| ctxHandleStatus | getHandleStatus (const ctxConnectionRef &connection) const |
| ctxHandleStatus | getHandleStatus (const ctxConvolutionMappingRef &mapping) const |
| ctxHandleStatus | getHandleStatus (const ctxParameterRef ¶meter) const |
| ctxHandleStatus | getHandleStatus (const ctxParameterSlice ¶meters) const |
| ctxConnectionRef | connectionInto (const ctxLayerRef &layer) const |
| ctxConnectionRef | connect (const ctxNodeRef &source, const ctxNodeRef &destination) |
| ctxConnectionRef | connect (const ctxNodeRangeRef &source, const ctxNodeRangeRef &destination) |
| ctxConnectionRef | connect (const ctxPortRef &source, const ctxPortRef &destination) |
| ctxConvolutionMappingRef | attachConvolutionMapping (const ctxLayerRef &convolution, const ctxConvolutionMapping &mapping) |
| gzBool | replaceConvolutionMapping (const ctxConvolutionMappingRef ¤t, const ctxConvolutionMapping &replacement) |
| gzBool | removeConvolutionMapping (const ctxConvolutionMappingRef &mapping) |
| gzBool | shareConvolutionParameters (const ctxConvolutionMappingRef &first, const ctxConvolutionMappingRef &second) |
| gzBool | disconnect (const ctxConnectionRef &connection) |
| gzBool | remove (const ctxLayerRef &layer) |
| gzBool | replace (const ctxLayerRef &layer, const ctxLayer &replacement) |
| Replaces a non-marker with Dense, or a unary occurrence with a same-shaped captured schema. | |
| gzBool | replaceConvolution2D (const ctxLayerRef &layer, ctxIndexControl source, ctxIndexControl filter, ctxNeuronType type=CTX_NEURON_TYPE_DEFAULT, gzBool sharedBias=TRUE, gzUInt32 maxDebugFeatures=0) |
| gzBool | share (const ctxParameterRef &first, const ctxParameterRef &second) |
| gzBool | share (const ctxParameterSlice &first, const ctxParameterSlice &second) |
| gzBool | share (const gzArray< ctxParameterRef > &first, const gzArray< ctxParameterRef > &second) |
| Shares every pair first[i]/second[i] in one validated commit; any invalid pair rejects all. | |
| gzBool | unshare (const ctxParameterRef ¶meter) |
| gzBool | validate () |
| gzString | getCanonicalSignature () const |
| gzString | getError () const |
| gzBool | save (const gzString &url) const |
Static Public Member Functions | |
| static gzBool | load (const gzString &url, ctxGraph &graph, gzString *error=NULL) |
| static gzBool | registerXmlType (const gzString &elementName, gzXmlCustomDataInterface *customDataInterface, gzBool replace=FALSE) |
| static gzVoid | unregisterXmlType (gzXmlCustomDataInterface *customDataInterface) |
| static gzBool | registerOperationLowerer (ctxGraphOperationType type, ctxGraphOperationLowerer *lowerer, gzBool replace=FALSE) |
| static gzBool | registerConnectionLowerer (ctxGraphOperationType type, ctxGraphConnectionLowerer *lowerer, gzBool replace=FALSE) |
| static ctxGraphOperationLowerer * | getOperationLowerer (ctxGraphOperationType type) |
| static ctxGraphConnectionLowerer * | getConnectionLowerer (ctxGraphOperationType type) |
| static gzVoid | unregisterOperationLowerer (ctxGraphOperationLowerer *lowerer) |
| static gzVoid | unregisterConnectionLowerer (ctxGraphConnectionLowerer *lowerer) |
| static gzBool | registerOperationSchema (ctxOperationSchema *schema) |
| Duplicate definitions require a new version; unregister only disables lookup. | |
| static gzBool | unregisterOperationSchema (const gzString &key, gzUInt32 version) |
| static ctxOperationSchemaPtr | getOperationSchema (const gzString &key, gzUInt32 version) |
| static ctxOperationSchemaPtr | getBuiltinSchema (ctxGraphOperationType type) |
| Captures the currently installed legacy lowerers for subsequent authoring. | |
Friends | |
| class | ctxModel |
| class | ctxValue |
| class | ctxGraphDocument |
| class | ctxModule |
| ctxGraph | operator+ (const ctxLayer &left, const ctxLayer &right) |
| ctxGraph | operator+ (const ctxGraph &graph, const ctxLayer &layer) |
Definition at line 1123 of file ctxGraph.h.
| ctxGraph::ctxGraph | ( | ) |
References CTX_EXPORT.
| gzBool ctxGraph::addActivation | ( | const gzString & | path, |
| gzUInt32 | values, | ||
| ctxNeuronType | type = CTX_NEURON_TYPE_DEFAULT ) |
References CTX_EXPORT, and CTX_NEURON_TYPE_DEFAULT.
| gzBool ctxGraph::addAdd | ( | const gzString & | path, |
| gzUInt32 | values, | ||
| const ctxPortRef & | left, | ||
| const ctxPortRef & | right ) |
Atomically authors Add and both full ZIP inputs; no bare Add is staged.
References CTX_EXPORT.
| gzBool ctxGraph::addConvolution2D | ( | const gzString & | path, |
| ctxIndexControl | source, | ||
| ctxIndexControl | filter, | ||
| ctxNeuronType | type = CTX_NEURON_TYPE_DEFAULT, | ||
| gzBool | sharedBias = TRUE, | ||
| gzUInt32 | maxDebugFeatures = 0 ) |
References CTX_EXPORT, and CTX_NEURON_TYPE_DEFAULT.
| gzBool ctxGraph::addDense | ( | const gzString & | path, |
| gzUInt32 | neurons, | ||
| ctxNeuronType | type = CTX_NEURON_TYPE_DEFAULT ) |
References CTX_EXPORT, and CTX_NEURON_TYPE_DEFAULT.
| gzBool ctxGraph::addDenseFrom | ( | const gzString & | path, |
| gzUInt32 | neurons, | ||
| const ctxPortRef & | source, | ||
| ctxNeuronType | type = CTX_NEURON_TYPE_DEFAULT ) |
Stages DenseFrom and its complete selected source in one candidate.
References CTX_EXPORT, and CTX_NEURON_TYPE_DEFAULT.
| gzBool ctxGraph::addInput | ( | const gzString & | path, |
| gzUInt32 | values ) |
References CTX_EXPORT.
| gzBool ctxGraph::addLayer | ( | const ctxLayer & | layer | ) |
References CTX_EXPORT, and layer().
| gzBool ctxGraph::addMultiply | ( | const gzString & | path, |
| gzUInt32 | values, | ||
| const ctxPortRef & | left, | ||
| const ctxPortRef & | right ) |
Atomically authors Multiply and both whole ZIP inputs, including aliases.
References CTX_EXPORT.
| gzBool ctxGraph::addOutput | ( | const gzString & | path, |
| gzUInt32 | values, | ||
| ctxNeuronType | type = CTX_NEURON_TYPE_DEFAULT ) |
References CTX_EXPORT, and CTX_NEURON_TYPE_DEFAULT.
Atomically authors occurrence and full explicit edge; result is unchanged on failure.
References CTX_EXPORT, ctxValue, and layer().
| gzBool ctxGraph::apply | ( | const ctxLayer & | layer, |
| const ctxValue & | left, | ||
| const ctxValue & | right, | ||
| ctxValue & | result ) |
Binary Add/Multiply accepts current or shape-preserving ancestor values.
References CTX_EXPORT, ctxValue, and layer().
| gzBool ctxGraph::apply | ( | const ctxModule & | module, |
| const gzString & | prefix, | ||
| const ctxValue & | input, | ||
| ctxValue & | result ) |
Copies a captured module atomically; graph and result remain unchanged on failure.
References CTX_EXPORT, ctxModule, and ctxValue.
| gzBool ctxGraph::applyRmsNorm | ( | const gzString & | name, |
| gzUInt32 | axis, | ||
| const ctxValue & | input, | ||
| ctxValue & | result ) |
Atomically authors "name/rstd" = ReduceInverseRms(axis) over input and "name" = MultiplyBroadcast(axis)(input, rstd); graph and result are unchanged on failure.
References CTX_EXPORT, and ctxValue.
| ctxConvolutionMappingRef ctxGraph::attachConvolutionMapping | ( | const ctxLayerRef & | convolution, |
| const ctxConvolutionMapping & | mapping ) |
References CTX_EXPORT.
| ctxConnectionRef ctxGraph::connect | ( | const ctxNodeRangeRef & | source, |
| const ctxNodeRangeRef & | destination ) |
References CTX_EXPORT.
| ctxConnectionRef ctxGraph::connect | ( | const ctxNodeRef & | source, |
| const ctxNodeRef & | destination ) |
References CTX_EXPORT.
| ctxConnectionRef ctxGraph::connect | ( | const ctxPortRef & | source, |
| const ctxPortRef & | destination ) |
References CTX_EXPORT.
| ctxConnectionRef ctxGraph::connectionInto | ( | const ctxLayerRef & | layer | ) | const |
References CTX_EXPORT, and layer().
| gzBool ctxGraph::disconnect | ( | const ctxConnectionRef & | connection | ) |
References CTX_EXPORT.
|
static |
Captures the currently installed legacy lowerers for subsequent authoring.
References CTX_EXPORT.
| gzString ctxGraph::getCanonicalSignature | ( | ) | const |
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
| gzString ctxGraph::getError | ( | ) | const |
References CTX_EXPORT.
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxConnectionRef & | connection | ) | const |
References CTX_EXPORT.
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxConvolutionMappingRef & | mapping | ) | const |
References CTX_EXPORT.
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxLayerRef & | layer | ) | const |
References CTX_EXPORT, and layer().
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxNodeRangeRef & | nodes | ) | const |
References CTX_EXPORT.
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxNodeRef & | node | ) | const |
References CTX_EXPORT.
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxParameterRef & | parameter | ) | const |
References CTX_EXPORT.
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxParameterSlice & | parameters | ) | const |
References CTX_EXPORT.
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxPortRef & | port | ) | const |
References CTX_EXPORT.
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxValue & | value | ) | const |
References CTX_EXPORT, ctxValue, and value().
| ctxHandleStatus ctxGraph::getHandleStatus | ( | const ctxValueRef & | value | ) | const |
References CTX_EXPORT, and value().
| ctxGraphIdentity ctxGraph::getIdentity | ( | ) | const |
References CTX_EXPORT.
| ctxLayerRef ctxGraph::getLayer | ( | gzUInt32 | index | ) | const |
References CTX_EXPORT.
| gzUInt32 ctxGraph::getLayerCount | ( | const gzString & | name | ) | const |
References CTX_EXPORT.
| const ctxGraphOperation * ctxGraph::getOperation | ( | gzUInt32 | index | ) | const |
References CTX_EXPORT.
| const ctxGraphOperation * ctxGraph::getOperationByID | ( | gzUInt32 | occurrenceID | ) | const |
References CTX_EXPORT.
| gzUInt32 ctxGraph::getOperationCount | ( | ) | const |
References CTX_EXPORT.
| gzUInt32 ctxGraph::getOperationIndex | ( | gzUInt32 | occurrenceID | ) | const |
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
| ctxLayerRef ctxGraph::layer | ( | const gzString & | name | ) | const |
References CTX_EXPORT.
Referenced by addLayer(), apply(), apply(), connectionInto(), getHandleStatus(), operator+, remove(), replace(), and replaceConvolution2D().
| ctxLayerRefList ctxGraph::layers | ( | ) | const |
References CTX_EXPORT.
| ctxLayerRefList ctxGraph::layers | ( | const gzString & | name | ) | const |
References CTX_EXPORT.
|
static |
References CTX_EXPORT, and ctxGraph().
|
static |
References CTX_EXPORT, and replace().
|
static |
References CTX_EXPORT, and replace().
|
static |
Duplicate definitions require a new version; unregister only disables lookup.
The caller must establish typed creator ownership before registering. Registration is an externally serialized installation/startup operation.
References CTX_EXPORT.
|
static |
References CTX_EXPORT, and replace().
| gzBool ctxGraph::remove | ( | const ctxLayerRef & | layer | ) |
References CTX_EXPORT, and layer().
| gzBool ctxGraph::removeConvolutionMapping | ( | const ctxConvolutionMappingRef & | mapping | ) |
References CTX_EXPORT.
| gzBool ctxGraph::replace | ( | const ctxLayerRef & | layer, |
| const ctxLayer & | replacement ) |
Replaces a non-marker with Dense, or a unary occurrence with a same-shaped captured schema.
Named-to-named unary replacement also preserves role names, order and shapes.
References CTX_EXPORT, and layer().
Referenced by registerConnectionLowerer(), registerOperationLowerer(), and registerXmlType().
| gzBool ctxGraph::replaceConvolution2D | ( | const ctxLayerRef & | layer, |
| ctxIndexControl | source, | ||
| ctxIndexControl | filter, | ||
| ctxNeuronType | type = CTX_NEURON_TYPE_DEFAULT, | ||
| gzBool | sharedBias = TRUE, | ||
| gzUInt32 | maxDebugFeatures = 0 ) |
References CTX_EXPORT, CTX_NEURON_TYPE_DEFAULT, and layer().
| gzBool ctxGraph::replaceConvolutionMapping | ( | const ctxConvolutionMappingRef & | current, |
| const ctxConvolutionMapping & | replacement ) |
References CTX_EXPORT.
| gzBool ctxGraph::save | ( | const gzString & | url | ) | const |
References CTX_EXPORT.
| gzBool ctxGraph::share | ( | const ctxParameterRef & | first, |
| const ctxParameterRef & | second ) |
References CTX_EXPORT.
| gzBool ctxGraph::share | ( | const ctxParameterSlice & | first, |
| const ctxParameterSlice & | second ) |
References CTX_EXPORT.
| gzBool ctxGraph::share | ( | const gzArray< ctxParameterRef > & | first, |
| const gzArray< ctxParameterRef > & | second ) |
Shares every pair first[i]/second[i] in one validated commit; any invalid pair rejects all.
References CTX_EXPORT.
| gzBool ctxGraph::shareConvolutionParameters | ( | const ctxConvolutionMappingRef & | first, |
| const ctxConvolutionMappingRef & | second ) |
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
| gzBool ctxGraph::unshare | ( | const ctxParameterRef & | parameter | ) |
References CTX_EXPORT.
| gzBool ctxGraph::validate | ( | ) |
References CTX_EXPORT.
| ctxValue ctxGraph::value | ( | const ctxPortRef & | output | ) | const |
Rebinds a whole result to this revision; changed ancestor shapes fail.
References CTX_EXPORT, and ctxValue.
Referenced by getHandleStatus(), and getHandleStatus().
|
friend |
Definition at line 1242 of file ctxGraph.h.
References ctxGraphDocument.
Referenced by ctxGraphDocument.
|
friend |
|
friend |
Definition at line 1243 of file ctxGraph.h.
References ctxGraph(), and ctxModule.
|
friend |
Definition at line 1241 of file ctxGraph.h.
References ctxValue.
Referenced by apply(), apply(), apply(), applyRmsNorm(), ctxValue, getHandleStatus(), and value().
References CTX_EXPORT, ctxGraph(), and layer().
References CTX_EXPORT, and ctxGraph().