-
Notifications
You must be signed in to change notification settings - Fork 77
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
add faiss debug option #2113
add faiss debug option #2113
Conversation
[CHATOPS:HELP] ChatOps commands.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and I have some C++ techniques.
#if DEBUG | ||
printf(__FUNCTION__); | ||
printf("\n"); | ||
fflush(stdout); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if DEBUG | |
printf(__FUNCTION__); | |
printf("\n"); | |
fflush(stdout); | |
#endif | |
#if DEBUG | |
printf("%s\n", __FUNCTION__); | |
fflush(stdout); | |
#endif |
You can use some macros such as __PRETTY_FUNCTION__
and __LINE__
for detail debug message.
FYI, there is one of some debugging techniques like below.
#ifdef DEBUG
#define DEBUG_MESSAGE(x) do { std::cout << "[" << __FUNCTION__ << ":" << __LINE__ << "]" << x << std::endl; } while(0)
#else
#define DEBUG_MESSAGE(x)
#endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it's better to do something like this once and use the typed variable for the rest.
#if defined(DEBUG)
constexpr bool isDebug = true;
#else
constexpr bool isDebug = false;
#endif
Deploying with Cloudflare Pages
|
add faiss debug option modify to constexpr bool Merge pull request #2113 from vdaas/feature/agent/faiss Signed-off-by: kpango <[email protected]>
Description:
SSIA
Related Issue:
Versions:
Checklist:
Special notes for your reviewer: