Renamed t to terr to avoid naming conflicts
This commit is contained in:
@@ -37,9 +37,9 @@
|
|||||||
*/
|
*/
|
||||||
#define ERROR(str) \
|
#define ERROR(str) \
|
||||||
{ \
|
{ \
|
||||||
time_t t; \
|
time_t terr; \
|
||||||
time(&t); \
|
time(&terr); \
|
||||||
fprintf(stderr, "%s", ctime(&t)); \
|
fprintf(stderr, "%s", ctime(&terr)); \
|
||||||
fprintf(stderr, "\tError in file %s line %d: %s\n", __FILE__, __LINE__, str); \
|
fprintf(stderr, "\tError in file %s line %d: %s\n", __FILE__, __LINE__, str); \
|
||||||
fflush(stderr); \
|
fflush(stderr); \
|
||||||
exit(EXIT_FAILURE); \
|
exit(EXIT_FAILURE); \
|
||||||
@@ -48,9 +48,9 @@
|
|||||||
|
|
||||||
#define WARNING(str) \
|
#define WARNING(str) \
|
||||||
{ \
|
{ \
|
||||||
time_t t; \
|
time_t terr; \
|
||||||
time(&t); \
|
time(&terr); \
|
||||||
fprintf(stderr, "%s", ctime(&t)); \
|
fprintf(stderr, "%s", ctime(&terr)); \
|
||||||
fprintf(stderr, "\tWarning in file %s line %d: %s\n", __FILE__, __LINE__, str); \
|
fprintf(stderr, "\tWarning in file %s line %d: %s\n", __FILE__, __LINE__, str); \
|
||||||
fflush(stderr); \
|
fflush(stderr); \
|
||||||
}
|
}
|
||||||
@@ -87,9 +87,9 @@ static inline void
|
|||||||
cuda_assert(cudaError_t code, const char* file, int line, bool abort)
|
cuda_assert(cudaError_t code, const char* file, int line, bool abort)
|
||||||
{
|
{
|
||||||
if (code != cudaSuccess) {
|
if (code != cudaSuccess) {
|
||||||
time_t t;
|
time_t terr;
|
||||||
time(&t);
|
time(&terr);
|
||||||
fprintf(stderr, "%s", ctime(&t));
|
fprintf(stderr, "%s", ctime(&terr));
|
||||||
fprintf(stderr, "\tCUDA error in file %s line %d: %s\n", file, line,
|
fprintf(stderr, "\tCUDA error in file %s line %d: %s\n", file, line,
|
||||||
cudaGetErrorString(code));
|
cudaGetErrorString(code));
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
Reference in New Issue
Block a user