diff options
Diffstat (limited to 'aberth/aberth.cpp')
-rw-r--r-- | aberth/aberth.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/aberth/aberth.cpp b/aberth/aberth.cpp index 6936809..550760d 100644 --- a/aberth/aberth.cpp +++ b/aberth/aberth.cpp @@ -342,11 +342,12 @@ static vector<uint8_t> drawImage(int W, int H, const vector<int> &counts, int ma static vector<int32_t> invoke_kernel( int32_t width, int32_t height, - double left, double top, double right, double bottom, + Com bottomLeft, Com topRight, int32_t seed) { futhark_context_config *config = futhark_context_config_new(); // futhark_context_config_select_device_interactively(config); + futhark_context_config_set_debugging(config, 1); futhark_context *ctx = futhark_context_new(config); @@ -364,7 +365,8 @@ static vector<int32_t> invoke_kernel( check_ret(futhark_entry_main_all( ctx, &dest_arr, width, height, - left, top, right, bottom, + bottomLeft.real(), topRight.imag(), + topRight.real(), bottomLeft.imag(), seed)); check_ret(futhark_context_sync(ctx)); @@ -391,9 +393,9 @@ int main(int argc, char **argv) { if (argc <= 1) { // tie(W, H, counts) = computeCounts(); W = H = 2000; - Com bottomLeft = Com(-1.6, -1.6); - Com topRight = Com(1.6, 1.6); - counts = invoke_kernel(W, H, bottomLeft.real(), topRight.imag(), topRight.real(), bottomLeft.imag(), 42); + Com bottomLeft = Com(0, -1.6); + Com topRight = Com(1.6, 0); + counts = invoke_kernel(W, H, bottomLeft, topRight, 42); writeCounts(W, H, counts, "out.txt"); } else if (argc == 2) { tie(W, H, counts) = readCounts(argv[1]); |