diff --git a/.github/workflows/test-parallel-windows.yaml b/.github/workflows/test-parallel-windows.yaml deleted file mode 100644 index 03a6e90..0000000 --- a/.github/workflows/test-parallel-windows.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: Test-parallel-windows - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - R-CMD-check: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 - with: - r-version: '4.0.5' # Substitua pela versão do R que você está usando - - - uses: r-lib/actions/setup-pandoc@v1 - - - name: Install dependencies - run: | - install - remotes::install_github('prdm0/AcceptReject') - remotes::install_deps(dependencies = TRUE) - shell: Rscript {0} - - - name: Check package - run: | - devtools::check() - shell: Rscript {0} - - - name: Run tests - run: | - testthat::test_file("tests/testthat/test-time-parallel.R") - shell: Rscript {0} diff --git a/R/accept_reject.r b/R/accept_reject.r index fac4d3c..73abf1c 100644 --- a/R/accept_reject.r +++ b/R/accept_reject.r @@ -244,14 +244,6 @@ accept_reject <- FUN = one_step, mc.cores = n_cores ))) - } else if(parallel && .Platform$OS.type == "windows"){ - cl <- parallel::makeCluster(getOption("cl.cores", 1L)) - capture.output( - r <- unlist(parallel::parLapply( - X = n_each_core, - fun = one_step - ))) - parallel::stopCluster(cl) } else { r <- one_step(n) } diff --git a/README.md b/README.md index b02e850..e65b389 100644 --- a/README.md +++ b/README.md @@ -289,7 +289,7 @@ case_1 <- accept_reject( xlim = c(0, 10) ) toc() -#> 7.294 sec elapsed +#> 0.491 sec elapsed # Specifying the base probability density function tic() @@ -305,7 +305,7 @@ case_2 <- accept_reject( c = 1.2 ) toc() -#> 2.633 sec elapsed +#> 0.153 sec elapsed # Visualizing the results p1 <- plot(case_1) diff --git a/docs/articles/accept_reject.html b/docs/articles/accept_reject.html index 5e1f9ec..9b96d2f 100644 --- a/docs/articles/accept_reject.html +++ b/docs/articles/accept_reject.html @@ -561,7 +561,7 @@