Sebastian Hanß
Sebastian Hanß
 Here I tested a larger raster (Charlottes tif) on a 8-core virtual machine.
> I think the problem is not that the runtime is fluctuating but the results...which is kind of a problem Oh, I didn't realize this... I'll have a look.
Should work now, please check. The problem was, that multiple threads wrote to cooc_mat at the same time (i.e. racing condition problem). To prevent this from happening in the future,...
> Didn't even see `default(none)` ... only static and dynamic. Do you have any good ressource for OMP? Yes, but I don't find it anymore ;-) This looks good: https://bisqwit.iki.fi/story/howto/openmp/
Both would be cool!
I'd suggest having a default 'n_cores' in the C++ code, as well. This makes the code more backward compatible. I also tested the performance on a server with 32 cores...
> Somehow I couldn't compile when I used a default argument in the `rcpp_get_coocurrence_matrix` function Where did you set the default? In the header or source file? You can't do...
Some thoughts: - parallelization makes a lot of sense for moving window calculations, i.e. a parallel raster::focal - like many other raster functions, raster::focal actually supports parallelization, already. It would...
Hm, your raster doesn't seem to be that big... Can you maybe share the `tif` file so we can try to reproduce the issue?
OK, I tried to run this, and you were right, the raster _is_ rather big for window_lsm and it _takes_ ages. The plan that should kinda solve this is now...