Skip to content

Commit

Permalink
Merge pull request Project-HAMi#1 from chaunceyjiang/log
Browse files Browse the repository at this point in the history
Rename 4pd to HAMI
  • Loading branch information
archlitchi authored Feb 22, 2024
2 parents 8360ab7 + d88e4d4 commit a8b3d73
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/include/log_utils.h
Original file line number Diff line number Diff line change
@@ -11,29 +11,29 @@
#else
#define LOG_DEBUG(msg, ...) { \
if ((getenv("LIBCUDA_LOG_LEVEL")!=NULL) && (atoi(getenv("LIBCUDA_LOG_LEVEL"))>=4)) \
fprintf(stderr, "[4pdvGPU Debug(%d:%ld:%s:%d)]: "msg"\n",getpid(),pthread_self(),basename(__FILE__),__LINE__,##__VA_ARGS__); }
fprintf(stderr, "[HAMI-core Debug(%d:%ld:%s:%d)]: "msg"\n",getpid(),pthread_self(),basename(__FILE__),__LINE__,##__VA_ARGS__); }
#endif

#define LOG_INFO(msg, ...) { \
if ( \
/*(getenv("LIBCUDA_LOG_LEVEL")==NULL) || */\
(getenv("LIBCUDA_LOG_LEVEL")!=NULL) && (atoi(getenv("LIBCUDA_LOG_LEVEL"))>=3)) \
fprintf(stderr, "[4pdvGPU Info(%d:%ld:%s:%d)]: "msg"\n", getpid(),pthread_self(),basename(__FILE__),__LINE__,##__VA_ARGS__); }
fprintf(stderr, "[HAMI-core Info(%d:%ld:%s:%d)]: "msg"\n", getpid(),pthread_self(),basename(__FILE__),__LINE__,##__VA_ARGS__); }

#define LOG_WARN(msg, ...) { \
if ( \
(getenv("LIBCUDA_LOG_LEVEL")==NULL) || \
((getenv("LIBCUDA_LOG_LEVEL")!=NULL) && (atoi(getenv("LIBCUDA_LOG_LEVEL"))>=2))) \
fprintf(stderr, "[4pdvGPU Warn(%d:%ld:%s:%d)]: "msg"\n", getpid(),pthread_self(),basename(__FILE__),__LINE__,##__VA_ARGS__); }
fprintf(stderr, "[HAMI-core Warn(%d:%ld:%s:%d)]: "msg"\n", getpid(),pthread_self(),basename(__FILE__),__LINE__,##__VA_ARGS__); }

#define LOG_MSG(msg, ...) { \
if ( \
(getenv("LIBCUDA_LOG_LEVEL")==NULL) || \
((getenv("LIBCUDA_LOG_LEVEL")!=NULL) && (atoi(getenv("LIBCUDA_LOG_LEVEL"))>=2))) \
fprintf(stderr, "[4pdvGPU Msg(%d:%ld:%s:%d)]: "msg"\n", getpid(),pthread_self(),basename(__FILE__),__LINE__,##__VA_ARGS__); }
fprintf(stderr, "[HAMI-core Msg(%d:%ld:%s:%d)]: "msg"\n", getpid(),pthread_self(),basename(__FILE__),__LINE__,##__VA_ARGS__); }

#define LOG_ERROR(msg, ...) { \
fprintf(stderr, "[4pdvGPU ERROR (pid:%d thread=%ld %s:%d)]: "msg"\n", getpid(), pthread_self(), basename(__FILE__),__LINE__, ##__VA_ARGS__); \
fprintf(stderr, "[HAMI-core ERROR (pid:%d thread=%ld %s:%d)]: "msg"\n", getpid(), pthread_self(), basename(__FILE__),__LINE__, ##__VA_ARGS__); \
}

#define CHECK_DRV_API(f) { \

0 comments on commit a8b3d73

Please sign in to comment.