anduin / CUDA monte carlo estimate pi
0 likes
0 forks
1 files
Last active 1 year ago
monte carlo estimate pi
| 1 | #include <iostream> |
| 2 | #include <curand.h> |
| 3 | #include <curand_kernel.h> |
| 4 | |
| 5 | __global__ void calculate_pi(int *count, unsigned long seed) { |
| 6 | int idx = threadIdx.x + blockIdx.x * blockDim.x; |
| 7 | curandState state; |
| 8 | curand_init(seed, idx, 0, &state); |
| 9 | |
| 10 | float x = curand_uniform(&state); |
anduin / fake service.yml
0 likes
0 forks
1 files
Last active 2 years ago
Make any docker service fake
| 1 | # Fake entrypoint for the service. Always sleep. |
| 2 | entrypoint: ["sleep", "infinity"] |
| 3 | # Fake healthcheck for the service. Always return true. |
| 4 | healthcheck: |
| 5 | test: ["CMD", "true"] |