diff options
| author | ruki <[email protected]> | 2019-06-12 00:39:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-11 21:56:41 +0800 |
| commit | 5cc9f406fb8d7815bb0ebed81b937876291ef81a (patch) | |
| tree | cc2387078bf8fe5004e488955b9e9e0f526210c3 /xmake/scripts | |
| parent | 3922367dec058b680fabc41f32e9b507822abe2b (diff) | |
| parent | 52f3bbe24e365b28f4bcd1e277d178a2561a1e8b (diff) | |
support cuda device-link
Diffstat (limited to 'xmake/scripts')
| -rw-r--r-- | xmake/scripts/find_cudadevices.cpp (renamed from xmake/scripts/find_cudadevices.cu) | 20 | ||||
| -rw-r--r-- | xmake/scripts/gitignore | 28 |
2 files changed, 19 insertions, 29 deletions
diff --git a/xmake/scripts/find_cudadevices.cu b/xmake/scripts/find_cudadevices.cpp index 56d64ff2b..fd002cc84 100644 --- a/xmake/scripts/find_cudadevices.cu +++ b/xmake/scripts/find_cudadevices.cpp @@ -19,10 +19,19 @@ inline void check(cudaError_t result) } } -inline void print_value(size_t value) +inline void print_value(unsigned long long value) { - // in case we don't have '%zu' - printf("%llu", (unsigned long long)value); + printf("%llu", value); +} + +inline void print_value(unsigned long value) +{ + printf("%lu", value); +} + +inline void print_value(unsigned int value) +{ + printf("%u", value); } inline void print_value(bool value) @@ -48,11 +57,6 @@ inline void print_value(const T (&value)[len]) printf(")"); } -inline void print_value(unsigned int value) -{ - printf("%u", value); -} - inline void print_value(const void *value) { printf("\"%s\"", (const char *)value); diff --git a/xmake/scripts/gitignore b/xmake/scripts/gitignore index 08ffbbd04..152105761 100644 --- a/xmake/scripts/gitignore +++ b/xmake/scripts/gitignore @@ -1,22 +1,8 @@ -*.a -*.o -*.exe -*.obj -*.dll -*.lib -*.out -*.suo -*~ -*.swp -*.swo -*.bak -*.orig -*.pdb -*.idb -.svn +# Xmake cache +.xmake/ +build/ + +# MacOS Cache .DS_Store -.xmake -*.gch -*.gch.d -gmon.out -build + + |
