Package: nmathopencl
Type: Package
Title: 'OpenCL'-Ported R 'Mathlib' for GPU-Accelerated Packages
Version: 0.8.2
Date: 2026-06-11
Authors@R: c(
    person("Kjell", "Nygren", role = c("aut", "cre"),
           email = "kjell.a.nygren@gmail.com"),
    person("The R Core Team", role = c("ctb", "cph"),
           comment = "R 'Mathlib' sources and derived/adapted routines"),
    person("The R Foundation", role = "cph",
           comment = "Portions of R 'Mathlib' and R source code"),
    person("Ross", "Ihaka", role = c("ctb", "cph"),
           comment = "R 'Mathlib'"),
    person("Robert", "Gentleman", role = c("ctb", "cph"),
           comment = "Portions of R 'Mathlib'"),
    person("Morten", "Welinder", role = c("ctb", "cph"),
           comment = "Portions of R 'Mathlib' (pgamma, phyper, ebd0)"),
    person("Martin", "Maechler", role = "ctb",
           comment = "Portions of R 'Mathlib'"),
    person("Catherine", "Loader", role = "ctb",
           comment = "Author of the dbinom/bd0/stirlerr density routines in R 'Mathlib' ported here"),
    person("Claus", "Ekstr\u00f8m", role = "ctb",
           comment = "Author of the noncentral t density (dnt) in R 'Mathlib' ported here"),
    person("Peter", "Ruckdeschel", role = "ctb",
           comment = "Author of the noncentral F density (dnf) in R 'Mathlib' ported here"),
    person("Alfred H.", "Morris, Jr.", role = "ctb",
           comment = "ACM TOMS 708 incomplete beta code (toms708) ported here"),
    person("Armido R.", "Didonato", role = "ctb",
           comment = "ACM TOMS 708 incomplete beta code (toms708) ported here"),
    person("The Khronos Group Inc", role = "cph",
           comment = "'OpenCL' API headers in inst/include/CL (Apache License 2.0)")
    )
Description: Ships statistical and mathematical routines from R internal
    'nmath' ('Mathlib') as 'OpenCL' C sources under directory 'inst/cl/', with R
    wrappers that use the GPU when 'OpenCL' is available at compile time and
    fall back to 'stats' equivalents otherwise. Aimed at package developers
    building custom kernels (for example Bayesian GLMs via suggested package
    'glmbayes') using 'opencltools' kernel loaders and related helpers. Contains
    translated shims, an illustrative GLM-related kernel subsystem, vignettes,
    and optional GPU acceleration. The ported routines are translated from the
    'nmath' ('Mathlib') and 'Rmath' sources of R Core Team (2026) "R: A
    Language and Environment for Statistical Computing"
    <doi:10.32614/R.manuals>. 'OpenCL' GPU execution follows the standard
    described in Stone, Gohara, and Shi (2010) <doi:10.1109/MCSE.2010.69>. The
    likelihood subgradient simulation methodology implemented by the
    illustrative GLM kernel subsystem is described in Nygren and Nygren (2006)
    <doi:10.1198/016214506000000357>.
License: GPL (>= 2)
URL: https://github.com/knygren/nmathopencl,
        https://knygren.r-universe.dev/nmathopencl
BugReports: https://github.com/knygren/nmathopencl/issues
Imports: stats, Rcpp (>= 1.1.1), RcppParallel, Rdpack (>= 0.11-0),
        opencltools (>= 0.8.1)
RdMacros: Rdpack
LinkingTo: Rcpp, RcppArmadillo, RcppParallel, opencltools
Depends: MASS, R (>= 3.5.0)
Suggests: glmbayes (>= 0.9.3), knitr, rmarkdown, testthat (>= 3.0.0),
        spelling
SystemRequirements: Optional 'OpenCL' support. If available, GPU
        acceleration will be used; otherwise, computation runs on CPU.
Encoding: UTF-8
RoxygenNote: 7.3.3
VignetteBuilder: knitr
Config/testthat/edition: 3
Language: en-US
NeedsCompilation: yes
Packaged: 2026-06-12 00:12:40 UTC; kjell
Author: Kjell Nygren [aut, cre],
  The R Core Team [ctb, cph] (R 'Mathlib' sources and derived/adapted
    routines),
  The R Foundation [cph] (Portions of R 'Mathlib' and R source code),
  Ross Ihaka [ctb, cph] (R 'Mathlib'),
  Robert Gentleman [ctb, cph] (Portions of R 'Mathlib'),
  Morten Welinder [ctb, cph] (Portions of R 'Mathlib' (pgamma, phyper,
    ebd0)),
  Martin Maechler [ctb] (Portions of R 'Mathlib'),
  Catherine Loader [ctb] (Author of the dbinom/bd0/stirlerr density
    routines in R 'Mathlib' ported here),
  Claus Ekstrøm [ctb] (Author of the noncentral t density (dnt) in R
    'Mathlib' ported here),
  Peter Ruckdeschel [ctb] (Author of the noncentral F density (dnf) in R
    'Mathlib' ported here),
  Alfred H. Morris, Jr. [ctb] (ACM TOMS 708 incomplete beta code
    (toms708) ported here),
  Armido R. Didonato [ctb] (ACM TOMS 708 incomplete beta code (toms708)
    ported here),
  The Khronos Group Inc [cph] ('OpenCL' API headers in inst/include/CL
    (Apache License 2.0))
Maintainer: Kjell Nygren <kjell.a.nygren@gmail.com>
Repository: CRAN
Date/Publication: 2026-06-21 15:20:08 UTC
