gominer
gominer copied to clipboard
remove code duplication/improve build system
A lot of code is duplicated between cladldevice.go/cldevice.go/cudevice.go to work around having hard run-time dependencies on libraries. Should be able to reduce this somehow.
Might be able to eventually use the plugin support that landed in go tip:
https://tip.golang.org/pkg/plugin/
The Go plugin stuff mentioned above is now released but doesn't work with Cgo so that's not an option.
Probably the best path forward would be to just support both OpenCL/CUDA in the same binary and statically link the CUDA runtime library. The OpenCL runtime is dynamically loaded anyway so it just needs a stub for linking essentially.