23 lines
837 B
Plaintext
23 lines
837 B
Plaintext
#include "integral.h"
|
|
|
|
#define CHECK_CUDA(call) \
|
|
do { \
|
|
cudaError_t status_ = call; \
|
|
if (status_ != cudaSuccess) { \
|
|
fprintf(stderr, "CUDA error (%s:%d): %s\n", __FILE__, __LINE__, \
|
|
cudaGetErrorString(status_)); \
|
|
exit(EXIT_FAILURE); \
|
|
} \
|
|
} while (0)
|
|
|
|
static double f(double x) { return 4.0 / (1 + x * x); }
|
|
|
|
void integral_gpu_initialize(size_t num_intervals) {}
|
|
|
|
double integral_gpu(size_t num_intervals) {
|
|
double sum = 0;
|
|
return sum;
|
|
}
|
|
|
|
void integral_gpu_finalize() {}
|