tromp / cuckoo

a memory-bound graph-theoretic proof-of-work system
Other
822 stars 173 forks source link

Fix cuckoo CUDA code for compilation on Windows #71

Closed tolbrino closed 2 years ago

tolbrino commented 5 years ago

This is needed on Windows because cl.exe doesn't support statements in expressions like gcc does.

tromp commented 5 years ago

I don't mind changes to support Windows, but this is a little too invasive; making the macros dependent on a new main() local variable.

timolson commented 5 years ago

I made a weak attempt to port to Windows but abandoned it. The current codebase relies on a few unix-only facilities like <unistd>. You'll need to completely rewrite main() since getopt is not portable, and you'll need to also rip out any use of sys/time.h. I thought there were a few other issues as well, but this should get you started. It's certainly do-able.

tromp commented 5 years ago

I obsoleted the use of sys/time.h a while ago. I see I still redundantly include it in a few spots; let me take those out right now...

timolson commented 5 years ago

There's also the htonl() issue. Windows doesn't have <endian.h> but you can assume all Windows platforms are little-endian.

tolbrino commented 5 years ago

I've got a working version for Windows already, but need to untangle and rebase that on master. So I thought I start with the standalone bit.