Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtime/ggma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(GGMA_DEV ggma-dev)
add_library(${GGMA_DEV} SHARED ${API_SRC})

# Public headers to publish
set(GGMA_API_HEADERS include/ggma_api.h include/ggma_macro.h include/ggma_types.h
set(GGMA_API_HEADERS include/ggma_api.h include/ggma_types.h
include/ggma_context.h include/ggma_generate.h)

# GGMA install directory (same as ONERT_INSTALL_APIDIR)
Expand Down
17 changes: 4 additions & 13 deletions runtime/ggma/include/ggma_macro.h → runtime/ggma/src/Macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,11 @@
#include <cstdlib>

/**
* @file ggma_macro.h
* @file Macro.h
* @brief Common macros for GGMA error handling and utilities
*/
#ifndef __GGMA_GGMA_MACRO_H__
#define __GGMA_GGMA_MACRO_H__

#define GGMA_ENSURE(a) \
do \
{ \
if ((a) != GGMA_STATUS_NO_ERROR) \
{ \
exit(-1); \
} \
} while (0)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be under ggma_run.cc.
Then, it will be in tests/tools/libs for two or more tools.
Then, it will be in public header if other use cases occurrs.

#ifndef __GGMA_MACRO_H__
#define __GGMA_MACRO_H__

#define GGMA_RETURN_ERROR_IF_NULL(p) \
do \
Expand All @@ -41,4 +32,4 @@

#define GGMA_UNUSED(x) (void)(x)

#endif // __GGMA_GGMA_MACRO_H__
#endif // __GGMA_MACRO_H__
1 change: 0 additions & 1 deletion runtime/ggma/src/ggma_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

#include "ggma_context.h"
#include "ggma_macro.h"
#include "Context.h"
#include <iostream>

Expand Down
4 changes: 2 additions & 2 deletions runtime/ggma/src/ggma_generate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

#include "ggma_api.h"
#include "ggma_macro.h"
#include "ggma_generate.h"

#include "Context.h"
#include "Macro.h"

GGMA_STATUS ggma_generate(ggma_context *context, ggma_token *tokens, size_t n_tokens,
size_t n_tokens_max, size_t *n_tokens_out)
Expand Down