Skip to content

Commit 3f53101

Browse files
committed
import parallely instead of future
1 parent 3240581 commit 3f53101

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Imports:
1818
data.table (>= 1.11.2),
1919
dendextend,
2020
fs (>= 1.2.0),
21-
future,
21+
parallelly,
2222
lda (>= 1.4.2),
2323
parallelMap,
2424
progress (>= 1.1.1),

R/LDARep.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#' is called after.
3333
#' @param ncpus [\code{integer(1)}]\cr
3434
#' Number of (physical) CPUs to use. If \code{pm.backend} is passed,
35-
#' default is determined by \code{\link[future]{availableCores}}.
35+
#' default is determined by \code{\link[parallelly]{availableCores}}.
3636
#' @param ... additional arguments passed to \code{\link[lda]{lda.collapsed.gibbs.sampler}}.
3737
#' Arguments will be coerced to a vector of length \code{n}.
3838
#' Default parameters are \code{alpha = eta = 1/K} and \code{num.iterations = 200}.
@@ -85,7 +85,7 @@ LDARep = function(docs, vocab, n = 100, seeds, id = "LDARep", pm.backend, ncpus,
8585
}
8686

8787
if (!missing(pm.backend) && !is.null(pm.backend)){
88-
if (missing(ncpus) || is.null(ncpus)) ncpus = future::availableCores()
88+
if (missing(ncpus) || is.null(ncpus)) ncpus = parallelly::availableCores()
8989
assert_choice(pm.backend, choices = c("multicore", "socket", "mpi"))
9090
assert_int(ncpus, lower = 1)
9191
parallelMap::parallelStart(mode = pm.backend, cpus = ncpus)

R/cosineTopics.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#' is called after.
2929
#' @param ncpus [\code{integer(1)}]\cr
3030
#' Number of (physical) CPUs to use. If \code{pm.backend} is passed,
31-
#' default is determined by \code{\link[future]{availableCores}}.
31+
#' default is determined by \code{\link[parallelly]{availableCores}}.
3232
#' @return [\code{named list}] with entries
3333
#' \describe{
3434
#' \item{\code{sims}}{[\code{lower triangular named matrix}] with all pairwise
@@ -68,7 +68,7 @@ cosineTopics = function(topics, progress = TRUE, pm.backend, ncpus){
6868

6969
cosineTopics.parallel = function(topics, pm.backend, ncpus){
7070
assert_choice(pm.backend, choices = c("multicore", "socket", "mpi"))
71-
if (missing(ncpus) || is.null(ncpus)) ncpus = future::availableCores()
71+
if (missing(ncpus) || is.null(ncpus)) ncpus = parallelly::availableCores()
7272
assert_int(ncpus, lower = 1)
7373

7474
N = ncol(topics)

R/jaccardTopics.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#' is called after.
4949
#' @param ncpus [\code{integer(1)}]\cr
5050
#' Number of (physical) CPUs to use. If \code{pm.backend} is passed,
51-
#' default is determined by \code{\link[future]{availableCores}}.
51+
#' default is determined by \code{\link[parallelly]{availableCores}}.
5252
#' @return [\code{named list}] with entries
5353
#' \describe{
5454
#' \item{\code{sims}}{[\code{lower triangular named matrix}] with all pairwise
@@ -129,7 +129,7 @@ print.TopicSimilarity = function(x, ...){
129129

130130
jaccardTopics.parallel = function(topics, limit.rel, limit.abs, atLeast, pm.backend, ncpus){
131131
assert_choice(pm.backend, choices = c("multicore", "socket", "mpi"))
132-
if (missing(ncpus) || is.null(ncpus)) ncpus = future::availableCores()
132+
if (missing(ncpus) || is.null(ncpus)) ncpus = parallelly::availableCores()
133133
assert_int(ncpus, lower = 1)
134134

135135
N = ncol(topics)

R/jsTopics.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#' is called after.
3737
#' @param ncpus [\code{integer(1)}]\cr
3838
#' Number of (physical) CPUs to use. If \code{pm.backend} is passed,
39-
#' default is determined by \code{\link[future]{availableCores}}.
39+
#' default is determined by \code{\link[parallelly]{availableCores}}.
4040
#' @return [\code{named list}] with entries
4141
#' \describe{
4242
#' \item{\code{sims}}{[\code{lower triangular named matrix}] with all pairwise
@@ -83,7 +83,7 @@ jsTopics = function(topics, epsilon = 1e-6, progress = TRUE, pm.backend, ncpus){
8383

8484
jsTopics.parallel = function(topics, epsilon, pm.backend, ncpus){
8585
assert_choice(pm.backend, choices = c("multicore", "socket", "mpi"))
86-
if (missing(ncpus) || is.null(ncpus)) ncpus = future::availableCores()
86+
if (missing(ncpus) || is.null(ncpus)) ncpus = parallelly::availableCores()
8787
assert_int(ncpus, lower = 1)
8888

8989
N = ncol(topics)

R/rboTopics.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#' is called after.
4141
#' @param ncpus [\code{integer(1)}]\cr
4242
#' Number of (physical) CPUs to use. If \code{pm.backend} is passed,
43-
#' default is determined by \code{\link[future]{availableCores}}.
43+
#' default is determined by \code{\link[parallelly]{availableCores}}.
4444
#' @return [\code{named list}] with entries
4545
#' \describe{
4646
#' \item{\code{sims}}{[\code{lower triangular named matrix}] with all pairwise
@@ -83,7 +83,7 @@ rboTopics = function(topics, k, p, progress = TRUE, pm.backend, ncpus){
8383

8484
rboTopics.parallel = function(topics, k, p, pm.backend, ncpus){
8585
assert_choice(pm.backend, choices = c("multicore", "socket", "mpi"))
86-
if (missing(ncpus) || is.null(ncpus)) ncpus = future::availableCores()
86+
if (missing(ncpus) || is.null(ncpus)) ncpus = parallelly::availableCores()
8787
assert_int(ncpus, lower = 1)
8888

8989
N = ncol(topics)

0 commit comments

Comments
 (0)