Advertisement
roachsinai

Untitled

Jan 13th, 2023
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #define MODEL_NAME hand_pose
  2. #define MODEL_VERSION 112_39
  3. // Macro for adding quotes
  4. #define STRINGIFY(X) STRINGIFY2(X)
  5. #define STRINGIFY2(X) #X
  6.  
  7. // Macros for concatenating tokens
  8. #define CAT(X,Y) CAT2(X,Y)
  9. #define CAT2(X,Y) X##Y
  10. #define CAT_2 CAT
  11. #define CAT_3(X,Y,Z) CAT(CAT(X,Y),Z)
  12. #define CAT_4(A,X,Y,Z) CAT(A,CAT_3(X,Y,Z))
  13.  
  14. #define INCLUDE_ID_FILE(NAME,VERSION) STRINGIFY( CAT_3(NAME, _, CAT(VERSION, .id.h)) )
  15. #define INCLUDE_MEM_FILE(NAME,VERSION) STRINGIFY( CAT_3(NAME, _, CAT(VERSION, .mem.h)) )
  16.  
  17. #include INCLUDE_ID_FILE(MODEL_NAME, MODEL_VERSION)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement