dewittpe / cpr

Control Polygon Reduction: Methods for quick and efficient placement of internal knots for B-splines and tensor products of B-splines.
http://www.peteredewitt.com/cpr/
2 stars 0 forks source link

Parallelization of influence weights #17

Closed dewittpe closed 8 months ago

dewittpe commented 7 years ago

The influence weights could, perhaps should, be done in a parallel fashion. Look at Rcpp Parallel to do this work.

dewittpe commented 9 months ago

This is a needed option. I have found that the influence weight calculations take way to much time when the number of internal knots is very high, say several hundred.

So, plan is, extend the influence weight calls that are using lapply to use pbapply::pblapply so that I get both a progressbar and parallel computations.

In the cpr and cnr calls, the default progress bar needs to be modified. a verbosity argument with options for none, cpr, and influence should be added so the user can select which, if any, progress bar and messaging is reported.

dewittpe commented 8 months ago

Nope, I was wrong. This is not a needed fix. Being smart with when and how things are called was a better fix. the parallel apply statements carried so much overhead that the computations were slowed down from one or two seconds in the vignette to over 25 seconds.

Closing this. just don't wast time on it. maybe on full refactor