1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-12 07:48:33 +00:00

credits: show binary arch (32/64) in the header

This commit is contained in:
Tanguy Pruvot 2017-02-17 14:11:36 +01:00
parent b549bd54fe
commit 1d5db48797
2 changed files with 14 additions and 3 deletions

View File

@ -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");

10
miner.h
View File

@ -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