+ if (verbose)
+ cat(paste("--- Precompute and serialize synchrones CWT\n", sep=""))
+
+ # Split indices by packets of length at most nb_cwt_per_chunk
+ indices_cwt <- .splitIndices(indices, nb_cwt_per_chunk)
+ # 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.
+ for (inds in indices_cwt)
+ computeSaveCWT(inds)
+
+ parll <- (ncores > 1)
+ 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"))
+ }
+