35#include "src/jazz_bebop/opcodes.h"
38#ifndef INCLUDED_JAZZ_CATCH2
39#define INCLUDED_JAZZ_CATCH2
41#include "src/catch2/catch.hpp"
47#ifndef INCLUDED_JAZZ_BEBOP_SNIPPET
48#define INCLUDED_JAZZ_BEBOP_SNIPPET
65const char KIND_SNIPPET[] =
"{\"object\" : BYTE[obj_size], \"body\" : STRING[body_len], \"calls\" : STRING[calls_len]," \
66 "\"input\" : STRING[input_len], \"output\" : STRING[output_len], \"reads\" : STRING[reads_len]," \
67 "\"source\" : STRING[source_len], \"writes\" : STRING[writes_len]}";
71const char EMPTY_SNIPPET[] =
"(\"object\" : [], \"body\" : [NA], \"calls\" : [NA], \"input\" : [NA], \"output\" : [NA]," \
72 "\"reads\" : [NA], \"source\" : [NA], \"writes\" : [NA])";
95#define MASK_SNIPSTATE_GENERAL 0xff000000
96#define MASK_SNIPSTATE_OBJECT 0x00ff0000
97#define MASK_SNIPSTATE_INTER 0x0000ff00
98#define MASK_SNIPSTATE_SOURCE 0x000000ff
99#define SNIPSTATE_UNDEFINED 0x7fffffff
101#define SNIP_INDEX_OBJECT 0
102#define SNIP_INDEX_BODY 1
103#define SNIP_INDEX_CALLS 2
104#define SNIP_INDEX_INPUT 3
105#define SNIP_INDEX_OUTPUT 4
106#define SNIP_INDEX_READS 5
107#define SNIP_INDEX_SOURCE 6
108#define SNIP_INDEX_WRITES 7
Snippet: A code snippet and the ancestor of Concept.
Definition snippet.h:170
void * get_object()
Definition snippet.cpp:133
bool get_block(int idx, SnippetText &snip_text)
Definition snippet.cpp:73
int get_state()
Definition snippet.cpp:54
int object_size()
Definition snippet.cpp:115
Tuple: A Jazz Block with multiple Tensors.
Definition tuple.h:94
pBlock get_block(int idx)
Definition tuple.h:224
A language to access any container by base using locators.
Definition base_api.cpp:39
const char SNIPSTATE_CAN_RUN_SOURCE[]
The snippet (from source) is ready to run (or has run before)
Definition snippet.h:86
const char SNIPSTATE_SOURCE_PREPROCESSED[]
The source code has been preprocessed successfully.
Definition snippet.h:80
const char SNIPSTATE_FAILED_SRC_PREPROC[]
The source code preprocessing failed.
Definition snippet.h:89
const char SNIPSTATE_EMPTY_SNIPPET[]
The snippet is empty.
Definition snippet.h:78
const char SNIPSTATE_IS_RUNNING_SOURCE[]
The snippet is currently running (from source)
Definition snippet.h:88
const char SNIPSTATE_FAILED_SRC_COMPILE[]
The source code compilation failed.
Definition snippet.h:90
const char SNIPSTATE_CAN_RUN[]
The global state is neither error nor empty state() >= SNIPSTATE_CAN_RUN.
Definition snippet.h:84
const char SNIPSTATE_IS_RUNNING_OBJECT[]
The snippet is currently running (from onnx)
Definition snippet.h:87
const char SNIPSTATE_SOURCE_AVAILABLE[]
The source code is available.
Definition snippet.h:79
const char SNIPSTATE_OBJECT_AVAILABLE[]
The snippet is created from an onnx object.
Definition snippet.h:82
std::vector< std::string > SnippetText
A SnippetText is a vector of strings.
Definition snippet.h:118
const char SNIPSTATE_OBJECT_PREPROCESSED[]
The snippet (from onnx) has been reverse engineered successfully.
Definition snippet.h:83
SnippetText * pSnippetText
A pointer to a SnippetText.
Definition snippet.h:119
const char SNIPSTATE_FAILED_RUN_SOURCE[]
The snippet failed to run (from source)
Definition snippet.h:93
Snippet * pSnippet
A pointer to a Snippet.
Definition snippet.h:182
const char SNIPPET_VERSION[]
The content of the attribute BLOCK_ATTRIB_SNIPVERS.
Definition snippet.h:76
const char KIND_SNIPPET[]
Definition snippet.h:65
const char SNIPSTATE_SOURCE_COMPILED[]
The source code has been compiled successfully.
Definition snippet.h:81
const char SNIPSTATE_FAILED_RUN_OBJECT[]
The snippet failed to run (from onnx)
Definition snippet.h:92
const char SNIPSTATE_FAILED_OBJ_PREPROC[]
The snippet (from onnx) reverse engineering failed.
Definition snippet.h:91
const char SNIPSTATE_CAN_RUN_OBJECT[]
The snippet (from onnx) is ready to run (or has run before)
Definition snippet.h:85
const char EMPTY_SNIPPET[]
Definition snippet.h:71
char * pChar
A pointer to a char buffer.
Definition types.h:185