Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup shape inference implementation #5596

Merged
merged 16 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions onnx/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,22 @@
#define ONNX_CATCH(x) catch (x)
#define ONNX_HANDLE_EXCEPTION(func) func()
#endif

// Macros to disable the copy and/or assignment methods
// These are usually placed in the private: declarations for a class.

#define ONNX_DISALLOW_COPY(TypeName) TypeName(const TypeName&) = delete

#define ONNX_DISALLOW_ASSIGNMENT(TypeName) TypeName& operator=(const TypeName&) = delete

#define ONNX_DISALLOW_COPY_AND_ASSIGNMENT(TypeName) \
ONNX_DISALLOW_COPY(TypeName); \
ONNX_DISALLOW_ASSIGNMENT(TypeName)

#define ONNX_DISALLOW_MOVE(TypeName) \
TypeName(TypeName&&) = delete; \
TypeName& operator=(TypeName&&) = delete

#define ONNX_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(TypeName) \
ONNX_DISALLOW_COPY_AND_ASSIGNMENT(TypeName); \
ONNX_DISALLOW_MOVE(TypeName)