-
Notifications
You must be signed in to change notification settings - Fork 72
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
fixed incorrect hashrate on mac os and fixed some memleaks #47
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request! We'll get to reviewing this as soon as we can. |
printf("\tDevice %d: %s\n", j, str); | ||
} else { | ||
printf("\tDevice %d: %s\n", j, str); | ||
} |
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 we can't read the device name, does it make sense to continue printing the endianness, alloc size, etc.? I figure if one fails, the rest will probably fail too. I'm not very familiar of OpenCL, though; maybe not all devices have names.
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, if we can assume that all devices have names, then the rest of the info should be printed with a double tab instead of repeating the device id. For example:
Found 1 platform(s) on your computer.
Device 0 (MyDevice):
Endianness: Little-endian
Address space: 64-bit
instead of:
Found 1 platform(s) on your computer.
Device 0: MyDevice
Device 0: Endianness: Little-endian
Device 0: Address space: 64-bit
I suppose having a uniform prefix is handy if you want to pipe the output to grep
or something, but I imagine you only need to do that if you have lots of devices.
printf("\tError while getting device CL_DEVICE_ENDIAN_LITTLE.\n"); | ||
} else { | ||
printf("\tDevice %d: isLitlle: %d\n", j, isLitlle); | ||
} |
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.
could be more descriptive here. How about:
else if (isLittle) {
printf("\t\tEndianness: Little-endian\n");
} else {
printf("\t\tEndianness: Big-endian\n");
}
also, please ensure that your new code is properly indented.
gettimeofday(&now, NULL); | ||
return now.tv_sec * 1000000LL + now.tv_usec; | ||
#else | ||
return clock()/ CLOCKS_PER_SEC * 1000000LL; |
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.
Looks good overall. I would prefer to see the device info printed in a nicer format. Aside from that, just make sure you follow our current style, specifically:
|
Excellent. I think this is good to merge, but I would like to confirm that it behaves as intended on Windows and Linux as well. @DavidVorick, can we push this out to some miners and get their feedback? |
No description provided.