- ignored <-
- if (parll)
- parallel::parLapply(cl, indices_cwt, computeSaveCWT)
- else
- lapply(indices_cwt, computeSaveCWT)
+ # NOTE: next loop could potentially be run in //. Indices would be permuted (by
+ # serialization order), and synchronicity would be required because of concurrent
+ # writes. Probably not worth the effort - but possible to gain some bits of speed.
+ for (inds in indices_cwt)
+ computeSaveCWT(inds)
+
+ if (parll)
+ {
+ # outfile=="" to see stderr/stdout on terminal
+ cl <-
+ if (verbose)
+ parallel::makeCluster(ncores, outfile="")
+ else
+ parallel::makeCluster(ncores)
+ Xwer_dist_desc <- bigmemory::describe(Xwer_dist)
+ parallel::clusterExport(cl, envir=environment(),
+ varlist=c("parll","n","L","Xwer_dist_desc","getCWT","verbose"))
+ }