Package: nmathopencl 0.8.2.9000
nmathopencl: 'OpenCL'-Ported R 'Mathlib' for GPU-Accelerated Packages
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>.
Authors:
nmathopencl_0.8.2.9000.tar.gz
nmathopencl_0.8.2.9000.zip(r-4.7)nmathopencl_0.8.2.9000.zip(r-4.6)nmathopencl_0.8.2.9000.zip(r-4.5)
nmathopencl_0.8.2.9000.tgz(r-4.6-x86_64)nmathopencl_0.8.2.9000.tgz(r-4.6-arm64)nmathopencl_0.8.2.9000.tgz(r-4.5-x86_64)nmathopencl_0.8.2.9000.tgz(r-4.5-arm64)
nmathopencl_0.8.2.9000.tar.gz(r-4.7-arm64)nmathopencl_0.8.2.9000.tar.gz(r-4.7-x86_64)nmathopencl_0.8.2.9000.tar.gz(r-4.6-arm64)nmathopencl_0.8.2.9000.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
nmathopencl/json (API)
| # Install 'nmathopencl' in R: |
| install.packages('nmathopencl', repos = c('https://knygren.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/knygren/nmathopencl/issues
Last updated from:1ab9e527b4. Checks:12 OK, 1 FAIL. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 519 | ||
| linux-devel-x86_64 | OK | 533 | ||
| source / vignettes | OK | 650 | ||
| linux-release-arm64 | OK | 495 | ||
| linux-release-x86_64 | OK | 515 | ||
| macos-release-arm64 | OK | 229 | ||
| macos-release-x86_64 | OK | 307 | ||
| macos-oldrel-arm64 | OK | 176 | ||
| macos-oldrel-x86_64 | OK | 288 | ||
| windows-devel | OK | 344 | ||
| windows-release | OK | 352 | ||
| windows-oldrel | OK | 295 | ||
| wasm-release | FAIL | 563 |
Exports:attach_cross_library_tagsattach_kernel_call_tagsattach_kernel_dependency_tagsbeta_openclchoose_opencldbeta_opencldbinom_opencldbinom_raw_opencldcauchy_opencldchisq_opencldexp_opencldf_opencldgamma_opencldgeom_opencldhyper_opencldigamma_opencldlnorm_opencldlogis_opencldnbeta_opencldnbinom_mu_opencldnbinom_opencldnorm_opencldpois_opencldpois_raw_opencldt_opencldunif_opencldweibull_openclEx_EnvelopeEvalEx_EnvelopeOptEx_EnvelopeSizeEx_glmb_Standardize_ModelEx_glmbfamfuncexp_rand_openclextract_library_subsetfmax2_openclfmin2_openclfprec_openclfround_openclfsign_openclftrunc_openclgammafn_openclimax2_openclimin2_opencllbeta_opencllchoose_opencllgamma1p_opencllgammafn_openclload_library_for_kernellog1mexp_opencllog1pexp_opencllog1pmx_opencllogspace_add_opencllogspace_sub_opencllogspace_sum_openclnmathopencl_has_openclnmathopencl_opencl_device_infonmathopencl_opencl_fp64_availablenmathopencl_opencl_reset_device_selectionnorm_rand_openclpbeta_openclpbinom_openclpcauchy_openclpchisq_openclpentagamma_openclpexp_openclpf_openclpgamma_openclpgeom_openclphyper_openclplnorm_openclplogis_openclpnbinom_mu_openclpnbinom_openclpnorm_openclport_to_opencl_configurepow1p_openclppois_openclpsigamma_openclpt_openclptukey_openclpunif_openclpweibull_openclqbinom_openclqcauchy_openclqchisq_openclqexp_openclqf_openclqgeom_openclqhyper_openclqlnorm_openclqlogis_openclqnbinom_mu_openclqnbinom_openclqnorm_openclqpois_openclqt_openclqtukey_openclqunif_openclqweibull_openclr_check_user_interrupt_openclr_pow_di_openclr_pow_openclr_unif_index_openclrbeta_openclrbinom_openclrcauchy_openclrchisq_openclrexp_openclrf_openclrgamma_openclrgeom_openclrhyper_openclrlnorm_openclrlogis_openclrmultinom_openclrnbinom_mu_openclrnbinom_openclrnorm_openclrpois_openclrt_openclrunif_openclrweibull_openclsign_openclstage_kernel_dependency_sorttetragamma_opencltrigamma_openclunif_rand_opencluse_opencl_configurewrite_kernel_dependency_index
Dependencies:jsonliteMASSopencltoolsrbibutilsRcppRcppArmadilloRcppParallelRdpack
Last update: 2026-06-11
Started: 2025-08-21
Last update: 2026-06-04
Started: 2025-08-21
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Last update: 2026-06-04
Started: 2020-07-05
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| nmathopencl: OpenCL-Ported R Math Library for GPU-Accelerated Packages | nmathopencl-package nmathopencl |
| Attach Cross-Library Dependency Tags to Kernel Files | attach_cross_library_tags |
| Attach Library Call Tags to Kernel Files | attach_kernel_call_tags |
| Attach Dependency Tags to a Dependency-Ordered Kernel Library | attach_kernel_dependency_tags |
| The Beta Distribution (OpenCL) | dbeta_opencl dnbeta_opencl pbeta_opencl rbeta_opencl |
| The Binomial Distribution (OpenCL) | dbinom_opencl dbinom_raw_opencl pbinom_opencl qbinom_opencl rbinom_opencl |
| The Cauchy Distribution (OpenCL) | dcauchy_opencl pcauchy_opencl qcauchy_opencl rcauchy_opencl |
| The Chi-squared Distribution (OpenCL) | dchisq_opencl pchisq_opencl qchisq_opencl rchisq_opencl |
| The Exponential Distribution (OpenCL) | dexp_opencl pexp_opencl qexp_opencl rexp_opencl |
| The F Distribution (OpenCL) | df_opencl pf_opencl qf_opencl rf_opencl |
| The Gamma Distribution (OpenCL) | dgamma_opencl pgamma_opencl rgamma_opencl |
| The Geometric Distribution (OpenCL) | dgeom_opencl pgeom_opencl qgeom_opencl rgeom_opencl |
| The Hypergeometric Distribution (OpenCL) | dhyper_opencl phyper_opencl qhyper_opencl rhyper_opencl |
| The Lognormal Distribution (OpenCL) | dlnorm_opencl plnorm_opencl qlnorm_opencl rlnorm_opencl |
| The Logistic Distribution (OpenCL) | dlogis_opencl plogis_opencl qlogis_opencl rlogis_opencl |
| The Negative Binomial Distribution (OpenCL) | dnbinom_mu_opencl dnbinom_opencl pnbinom_mu_opencl pnbinom_opencl qnbinom_mu_opencl qnbinom_opencl rnbinom_mu_opencl rnbinom_opencl |
| The Normal Distribution (OpenCL) | dnorm_opencl pnorm_opencl qnorm_opencl rnorm_opencl |
| The Poisson Distribution (OpenCL) | dpois_opencl dpois_raw_opencl ppois_opencl qpois_opencl rpois_opencl |
| The Student t Distribution (OpenCL) | dt_opencl pt_opencl qt_opencl rt_opencl |
| The Uniform Distribution (OpenCL) | dunif_opencl punif_opencl qunif_opencl runif_opencl |
| The Weibull Distribution (OpenCL) | dweibull_opencl pweibull_opencl qweibull_opencl rweibull_opencl |
| Evaluate Negative Log-Likelihood and Gradients | Ex_EnvelopeEval |
| Envelope Sizing and Optimization | Ex_EnvelopeSize |
| Standardize A Non-Gaussian Model | Ex_glmb_Standardize_Model |
| Return family functions used during simulation and post processing | Ex_glmbfamfunc print.Ex_glmbfamfunc |
| Extract a Minimal Library Subset for a Set of Kernels | extract_library_subset |
| Special Functions (OpenCL) | beta_opencl choose_opencl digamma_opencl gammafn_opencl lbeta_opencl lchoose_opencl lgammafn_opencl pentagamma_opencl psigamma_opencl tetragamma_opencl trigamma_opencl |
| Envelope Evaluation Utilities | glmbayesEnvelopeExample |
| Math Support Functions (OpenCL) | fmax2_opencl fmin2_opencl fprec_opencl fround_opencl fsign_opencl ftrunc_opencl imax2_opencl imin2_opencl sign_opencl |
| Load a Minimal OpenCL Library Subset for a Single Kernel | load_library_for_kernel |
| GPU and OpenCL diagnostics for 'nmathopencl' | gpu_diagnostics nmathopencl_has_opencl nmathopencl_opencl_device_info nmathopencl_opencl_fp64_available nmathopencl_opencl_reset_device_selection |
| OpenCL-backed RNG Core linkage checks | exp_rand_opencl norm_rand_opencl r_unif_index_opencl unif_rand_opencl |
| Port an existing static src/Makevars to use OpenCL configure scripts | port_to_opencl_configure |
| The Studentized Range Distribution (OpenCL) | ptukey_opencl qtukey_opencl |
| OpenCL-backed R_ext runtime utility linkage checks | r_check_user_interrupt_opencl |
| OpenCL-backed R Math runtime linkage checks | lgamma1p_opencl log1mexp_opencl log1pexp_opencl log1pmx_opencl logspace_add_opencl logspace_sub_opencl logspace_sum_opencl pow1p_opencl r_pow_di_opencl r_pow_opencl |
| The Multinomial Distribution (OpenCL linkage subset) | rmultinom_opencl |
| Stage Kernel Library Dependency Sort Results | stage_kernel_dependency_sort |
| Set up OpenCL configure scripts in a downstream R package | use_opencl_configure |
| Build and save a kernel dependency index | write_kernel_dependency_index |
