Skip to content

Commit

Permalink
credits: show binary arch (32/64) in the header
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot committed Feb 17, 2017
1 parent b549bd5 commit 1d5db48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3651,12 +3651,13 @@ int main(int argc, char *argv[])

printf("*** ccminer " PACKAGE_VERSION " for nVidia GPUs by tpruvot@github ***\n");
if (!opt_quiet) {
const char* arch = is_x64() ? "64-bits" : "32-bits";
#ifdef _MSC_VER
printf(" Built with VC++ %d and nVidia CUDA SDK %d.%d\n\n", msver(),
printf(" Built with VC++ %d and nVidia CUDA SDK %d.%d %s\n\n", msver(),
#else
printf(" Built with the nVidia CUDA Toolkit %d.%d\n\n",
printf(" Built with the nVidia CUDA Toolkit %d.%d %s\n\n",
#endif
CUDART_VERSION/1000, (CUDART_VERSION % 1000)/10);
CUDART_VERSION/1000, (CUDART_VERSION % 1000)/10, arch);
printf(" Originally based on Christian Buchner and Christian H. project\n");
printf(" Include some algos from alexis78, djm34, sp, tsiv and klausT.\n\n");
printf("BTC donation address: 1AJdfCpLWPNoAMDfHF1wD5y8VgKSSTHxPo (tpruvot)\n\n");
Expand Down
10 changes: 10 additions & 0 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ static inline bool is_windows(void) {
#endif
}

static inline bool is_x64(void) {
#if defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__)
return 1;
#elif defined(__amd64__) || defined(__amd64) || defined(_M_X64) || defined(_M_IA64)
return 1;
#else
return 0;
#endif
}

#if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define WANT_BUILTIN_BSWAP
#else
Expand Down

0 comments on commit 1d5db48

Please sign in to comment.