diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/ethereum/ethash/libethash-cuda/libethash.cu')
-rw-r--r-- | Godeps/_workspace/src/github.com/ethereum/ethash/libethash-cuda/libethash.cu | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/libethash-cuda/libethash.cu b/Godeps/_workspace/src/github.com/ethereum/ethash/libethash-cuda/libethash.cu new file mode 100644 index 000000000..3e53c8853 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/libethash-cuda/libethash.cu @@ -0,0 +1,27 @@ +#include "cuPrintf.cu" +#include <stdio.h> + +__global__ void device_greetings(void) +{ + cuPrintf("Hello, world from the device!\n"); +} + +int main(void) +{ + // greet from the host + printf("Hello, world from the host!\n"); + + // initialize cuPrintf + cudaPrintfInit(); + + // launch a kernel with a single thread to greet from the device + device_greetings<<<1,1>>>(); + + // display the device's greeting + cudaPrintfDisplay(); + + // clean up after cuPrintf + cudaPrintfEnd(); + + return 0; +} |