{
  "_id": "6a2323d6530b9bc726bce18f",
  "Package": "nmathopencl",
  "Type": "Package",
  "Title": "'OpenCL'-Ported R 'Mathlib' for GPU-Accelerated Packages",
  "Version": "0.8.1",
  "Date": "2026-05-30",
  "Authors@R": "c(\nperson(\"Kjell\", \"Nygren\", role = c(\"aut\", \"cre\"),\nemail = \"kjell.a.nygren@gmail.com\"),\nperson(\"The R Core Team\", role = c(\"ctb\", \"cph\"),\ncomment = \"R 'Mathlib' sources, R stats modeling code, and derived/adapted routines\"),\nperson(\"The R Foundation\", role = \"cph\",\ncomment = \"Portions of R 'Mathlib' and R source code\"),\nperson(\"Ross\", \"Ihaka\", role = c(\"ctb\", \"cph\"),\ncomment = \"R 'Mathlib' and original R modeling infrastructure\"),\nperson(\"Robert\", \"Gentleman\", role = c(\"ctb\", \"cph\"),\ncomment = \"Portions of R 'Mathlib'\"),\nperson(\"Simon\", \"Davies\", role = \"ctb\",\ncomment = \"Original R glm implementation\"),\nperson(\"Morten\", \"Welinder\", role = c(\"ctb\", \"cph\"),\ncomment = \"Portions of R 'Mathlib'\"),\nperson(\"Martin\", \"Maechler\", role = \"ctb\",\ncomment = \"Portions of R 'Mathlib'\")\n)",
  "Description": "Ships statistical and mathematical routines from R\ninternal 'nmath' ('Mathlib') as 'OpenCL' C sources under\ndirectory 'inst/cl/', with R wrappers that use the GPU when\n'OpenCL' is available at compile time and fall back to 'stats'\nequivalents otherwise. Aimed at package developers building\ncustom kernels (for example Bayesian GLMs via suggested package\n'glmbayes') using 'opencltools' kernel loaders and related\nhelpers. Contains translated shims, an illustrative GLM-related\nkernel subsystem, vignettes, and optional GPU acceleration.",
  "License": "GPL-2",
  "URL": "https://github.com/knygren/nmathopencl,\nhttps://knygren.r-universe.dev/nmathopencl",
  "BugReports": "https://github.com/knygren/nmathopencl/issues",
  "RdMacros": "Rdpack",
  "SystemRequirements": "Optional 'OpenCL' support. If available, GPU\nacceleration will be used; otherwise, computation runs on CPU.",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Language": "en-US",
  "Config/pak/sysreqs": "make ocl-icd-opencl-dev",
  "Repository": "https://knygren.r-universe.dev",
  "Date/Publication": "2026-06-05 17:50:41 UTC",
  "RemoteUrl": "https://github.com/knygren/nmathopencl",
  "RemoteRef": "HEAD",
  "RemoteSha": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-06-05 19:20:09 UTC",
    "User": "root"
  },
  "Author": "Kjell Nygren [aut, cre],\nThe R Core Team [ctb, cph] (R 'Mathlib' sources, R stats modeling code,\nand derived/adapted routines),\nThe R Foundation [cph] (Portions of R 'Mathlib' and R source code),\nRoss Ihaka [ctb, cph] (R 'Mathlib' and original R modeling\ninfrastructure),\nRobert Gentleman [ctb, cph] (Portions of R 'Mathlib'),\nSimon Davies [ctb] (Original R glm implementation),\nMorten Welinder [ctb, cph] (Portions of R 'Mathlib'),\nMartin Maechler [ctb] (Portions of R 'Mathlib')",
  "Maintainer": "Kjell Nygren <kjell.a.nygren@gmail.com>",
  "MD5sum": "217e5d702917b7c589c4288fd3959938",
  "_user": "knygren",
  "_type": "src",
  "_file": "nmathopencl_0.8.1.tar.gz",
  "_fileid": "ae813ccb431ad4e9d58827c6f05fd903bb472e737608d556025ef09e401db2f1",
  "_filesize": 2431559,
  "_sha256": "ae813ccb431ad4e9d58827c6f05fd903bb472e737608d556025ef09e401db2f1",
  "_created": "2026-06-05T19:20:09.000Z",
  "_published": "2026-06-05T19:30:30.783Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79797947525,
      "time": 278,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7445067384"
    },
    {
      "job": 79797947471,
      "time": 235,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7445053599"
    },
    {
      "job": 79797947570,
      "time": 271,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7445065356"
    },
    {
      "job": 79797947472,
      "time": 245,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7445056523"
    },
    {
      "job": 79797947482,
      "time": 150,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7445025795"
    },
    {
      "job": 79797947533,
      "time": 333,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7445082731"
    },
    {
      "job": 79797947516,
      "time": 178,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7445035194"
    },
    {
      "job": 79797947453,
      "time": 477,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7445126608"
    },
    {
      "job": 79796805841,
      "time": 424,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7444976594"
    },
    {
      "job": 79797947274,
      "time": 200,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "FAIL",
      "artifact": ""
    },
    {
      "job": 79797947463,
      "time": 336,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7445083700"
    },
    {
      "job": 79797947455,
      "time": 340,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7445084579"
    },
    {
      "job": 79797947447,
      "time": 340,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7445084892"
    }
  ],
  "_buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/knygren/nmathopencl",
  "_commit": {
    "id": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
    "author": "knygren <kjell.a.nygren@gmail.com>",
    "committer": "knygren <kjell.a.nygren@gmail.com>",
    "message": "Version for CRAN resubmission\n",
    "time": 1780681841
  },
  "_maintainer": {
    "name": "Kjell Nygren",
    "email": "kjell.a.nygren@gmail.com",
    "login": "knygren",
    "linkedin": "in/kjellnygren",
    "description": "Data and analytics professional in pharma. Hobby: R package development. Creator of glmbayes — iid posterior sampling for Bayesian GLMs.",
    "uuid": 7188517
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "MASS",
      "role": "Depends"
    },
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "RcppArmadillo",
      "role": "LinkingTo"
    },
    {
      "package": "RcppParallel",
      "role": "LinkingTo"
    },
    {
      "package": "opencltools",
      "role": "LinkingTo"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "Rcpp",
      "version": ">= 1.1.1",
      "role": "Imports"
    },
    {
      "package": "RcppParallel",
      "role": "Imports"
    },
    {
      "package": "Rdpack",
      "version": ">= 0.11-0",
      "role": "Imports"
    },
    {
      "package": "opencltools",
      "version": ">= 0.8.1",
      "role": "Imports"
    },
    {
      "package": "glmbayes",
      "version": ">= 0.9.3",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "spelling",
      "role": "Suggests"
    }
  ],
  "_owner": "knygren",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-28",
      "n": 1
    },
    {
      "week": "2025-29",
      "n": 11
    },
    {
      "week": "2025-30",
      "n": 12
    },
    {
      "week": "2025-31",
      "n": 83
    },
    {
      "week": "2025-32",
      "n": 38
    },
    {
      "week": "2025-33",
      "n": 23
    },
    {
      "week": "2025-34",
      "n": 9
    },
    {
      "week": "2025-35",
      "n": 12
    },
    {
      "week": "2025-36",
      "n": 12
    },
    {
      "week": "2025-37",
      "n": 10
    },
    {
      "week": "2025-38",
      "n": 3
    },
    {
      "week": "2025-39",
      "n": 8
    },
    {
      "week": "2025-40",
      "n": 5
    },
    {
      "week": "2025-41",
      "n": 16
    },
    {
      "week": "2025-42",
      "n": 8
    },
    {
      "week": "2025-45",
      "n": 8
    },
    {
      "week": "2025-46",
      "n": 7
    },
    {
      "week": "2025-47",
      "n": 7
    },
    {
      "week": "2025-48",
      "n": 10
    },
    {
      "week": "2025-49",
      "n": 2
    },
    {
      "week": "2025-50",
      "n": 7
    },
    {
      "week": "2025-51",
      "n": 7
    },
    {
      "week": "2025-52",
      "n": 16
    },
    {
      "week": "2026-01",
      "n": 35
    },
    {
      "week": "2026-02",
      "n": 7
    },
    {
      "week": "2026-03",
      "n": 28
    },
    {
      "week": "2026-04",
      "n": 52
    },
    {
      "week": "2026-05",
      "n": 17
    },
    {
      "week": "2026-06",
      "n": 22
    },
    {
      "week": "2026-07",
      "n": 3
    },
    {
      "week": "2026-08",
      "n": 4
    },
    {
      "week": "2026-09",
      "n": 6
    },
    {
      "week": "2026-10",
      "n": 9
    },
    {
      "week": "2026-11",
      "n": 4
    },
    {
      "week": "2026-12",
      "n": 21
    },
    {
      "week": "2026-13",
      "n": 42
    },
    {
      "week": "2026-14",
      "n": 1
    },
    {
      "week": "2026-15",
      "n": 19
    },
    {
      "week": "2026-16",
      "n": 38
    },
    {
      "week": "2026-17",
      "n": 64
    },
    {
      "week": "2026-18",
      "n": 18
    },
    {
      "week": "2026-19",
      "n": 24
    },
    {
      "week": "2026-20",
      "n": 65
    },
    {
      "week": "2026-21",
      "n": 57
    },
    {
      "week": "2026-22",
      "n": 13
    },
    {
      "week": "2026-23",
      "n": 13
    }
  ],
  "_tags": [],
  "_stars": 2,
  "_contributors": [
    {
      "user": "knygren",
      "count": 907,
      "uuid": 7188517
    },
    {
      "user": "knygrensny",
      "count": 266,
      "uuid": 224791279
    },
    {
      "user": "danieljobrien",
      "count": 1,
      "uuid": 7174733
    }
  ],
  "_userbio": {
    "uuid": 7188517,
    "type": "user",
    "name": "Kjell Nygren",
    "description": "Data and analytics professional in pharma. Hobby: R package development. Creator of glmbayes — iid posterior sampling for Bayesian GLMs."
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/nmathopencl"
  },
  "_devurl": "https://github.com/knygren/nmathopencl",
  "_searchresults": 0,
  "_topics": [
    "openblas",
    "cpp"
  ],
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/nmathopencl.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_cranurl": false,
  "_exports": [
    "attach_cross_library_tags",
    "attach_kernel_call_tags",
    "attach_kernel_dependency_tags",
    "besselI_opencl",
    "besselJ_opencl",
    "besselK_opencl",
    "besselY_opencl",
    "beta_opencl",
    "choose_opencl",
    "dbeta_opencl",
    "dbinom_opencl",
    "dbinom_raw_opencl",
    "dcauchy_opencl",
    "dchisq_opencl",
    "dexp_opencl",
    "df_opencl",
    "dgamma_opencl",
    "dgeom_opencl",
    "dhyper_opencl",
    "digamma_opencl",
    "dlnorm_opencl",
    "dlogis_opencl",
    "dnbeta_opencl",
    "dnbinom_mu_opencl",
    "dnbinom_opencl",
    "dnorm_opencl",
    "dpois_opencl",
    "dpois_raw_opencl",
    "dsignrank_opencl",
    "dt_opencl",
    "dunif_opencl",
    "dweibull_opencl",
    "dwilcox_opencl",
    "Ex_EnvelopeEval",
    "Ex_EnvelopeOpt",
    "Ex_EnvelopeSize",
    "Ex_glmb_Standardize_Model",
    "Ex_glmbfamfunc",
    "exp_rand_opencl",
    "extract_library_subset",
    "fmax2_opencl",
    "fmin2_opencl",
    "fprec_opencl",
    "fround_opencl",
    "fsign_opencl",
    "ftrunc_opencl",
    "gammafn_opencl",
    "imax2_opencl",
    "imin2_opencl",
    "lbeta_opencl",
    "lchoose_opencl",
    "lgamma1p_opencl",
    "lgammafn_opencl",
    "load_library_for_kernel",
    "log1mexp_opencl",
    "log1pexp_opencl",
    "log1pmx_opencl",
    "logspace_add_opencl",
    "logspace_sub_opencl",
    "logspace_sum_opencl",
    "nmathopencl_has_opencl",
    "nmathopencl_opencl_device_info",
    "nmathopencl_opencl_fp64_available",
    "nmathopencl_opencl_reset_device_selection",
    "norm_rand_opencl",
    "pbeta_opencl",
    "pbinom_opencl",
    "pcauchy_opencl",
    "pchisq_opencl",
    "pentagamma_opencl",
    "pexp_opencl",
    "pf_opencl",
    "pgamma_opencl",
    "pgeom_opencl",
    "phyper_opencl",
    "plnorm_opencl",
    "plogis_opencl",
    "pnbinom_mu_opencl",
    "pnbinom_opencl",
    "pnorm_opencl",
    "port_to_opencl_configure",
    "pow1p_opencl",
    "ppois_opencl",
    "psigamma_opencl",
    "psignrank_opencl",
    "pt_opencl",
    "ptukey_opencl",
    "punif_opencl",
    "pweibull_opencl",
    "pwilcox_opencl",
    "qbeta_opencl",
    "qbinom_opencl",
    "qcauchy_opencl",
    "qchisq_opencl",
    "qexp_opencl",
    "qf_opencl",
    "qgamma_opencl",
    "qgeom_opencl",
    "qhyper_opencl",
    "qlnorm_opencl",
    "qlogis_opencl",
    "qnbinom_mu_opencl",
    "qnbinom_opencl",
    "qnorm_opencl",
    "qpois_opencl",
    "qsignrank_opencl",
    "qt_opencl",
    "qtukey_opencl",
    "qunif_opencl",
    "qweibull_opencl",
    "qwilcox_opencl",
    "r_check_stack_opencl",
    "r_check_user_interrupt_opencl",
    "r_pow_di_opencl",
    "r_pow_opencl",
    "r_unif_index_opencl",
    "rbeta_opencl",
    "rbinom_opencl",
    "rcauchy_opencl",
    "rchisq_opencl",
    "rexp_opencl",
    "rf_opencl",
    "rgamma_opencl",
    "rgeom_opencl",
    "rhyper_opencl",
    "rlnorm_opencl",
    "rlogis_opencl",
    "rmultinom_opencl",
    "rnbinom_mu_opencl",
    "rnbinom_opencl",
    "rnorm_opencl",
    "rpois_opencl",
    "rsignrank_opencl",
    "rt_opencl",
    "runif_opencl",
    "rweibull_opencl",
    "rwilcox_opencl",
    "sign_opencl",
    "stage_kernel_dependency_sort",
    "tetragamma_opencl",
    "trigamma_opencl",
    "unif_rand_opencl",
    "use_opencl_configure",
    "write_kernel_dependency_index"
  ],
  "_help": [
    {
      "page": "nmathopencl-package",
      "title": "nmathopencl: OpenCL-Ported R Math Library for GPU-Accelerated Packages",
      "topics": [
        "nmathopencl-package",
        "nmathopencl"
      ]
    },
    {
      "page": "attach_cross_library_tags",
      "title": "Attach Cross-Library Dependency Tags to Kernel Files",
      "topics": [
        "attach_cross_library_tags"
      ]
    },
    {
      "page": "attach_kernel_call_tags",
      "title": "Attach Library Call Tags to Kernel Files",
      "topics": [
        "attach_kernel_call_tags"
      ]
    },
    {
      "page": "attach_kernel_dependency_tags",
      "title": "Attach Dependency Tags to a Dependency-Ordered Kernel Library",
      "topics": [
        "attach_kernel_dependency_tags"
      ]
    },
    {
      "page": "bessel_opencl",
      "title": "Bessel Functions (OpenCL)",
      "topics": [
        "besselI_opencl",
        "besselJ_opencl",
        "besselK_opencl",
        "besselY_opencl"
      ]
    },
    {
      "page": "beta_opencl",
      "title": "The Beta Distribution (OpenCL)",
      "topics": [
        "dbeta_opencl",
        "dnbeta_opencl",
        "pbeta_opencl",
        "qbeta_opencl",
        "rbeta_opencl"
      ]
    },
    {
      "page": "binomial_opencl",
      "title": "The Binomial Distribution (OpenCL)",
      "topics": [
        "dbinom_opencl",
        "dbinom_raw_opencl",
        "pbinom_opencl",
        "qbinom_opencl",
        "rbinom_opencl"
      ]
    },
    {
      "page": "cauchy_opencl",
      "title": "The Cauchy Distribution (OpenCL)",
      "topics": [
        "dcauchy_opencl",
        "pcauchy_opencl",
        "qcauchy_opencl",
        "rcauchy_opencl"
      ]
    },
    {
      "page": "chisq_opencl",
      "title": "The Chi-squared Distribution (OpenCL)",
      "topics": [
        "dchisq_opencl",
        "pchisq_opencl",
        "qchisq_opencl",
        "rchisq_opencl"
      ]
    },
    {
      "page": "exponential_opencl",
      "title": "The Exponential Distribution (OpenCL)",
      "topics": [
        "dexp_opencl",
        "pexp_opencl",
        "qexp_opencl",
        "rexp_opencl"
      ]
    },
    {
      "page": "f_opencl",
      "title": "The F Distribution (OpenCL)",
      "topics": [
        "df_opencl",
        "pf_opencl",
        "qf_opencl",
        "rf_opencl"
      ]
    },
    {
      "page": "gamma_opencl",
      "title": "The Gamma Distribution (OpenCL)",
      "topics": [
        "dgamma_opencl",
        "pgamma_opencl",
        "qgamma_opencl",
        "rgamma_opencl"
      ]
    },
    {
      "page": "geometric_opencl",
      "title": "The Geometric Distribution (OpenCL)",
      "topics": [
        "dgeom_opencl",
        "pgeom_opencl",
        "qgeom_opencl",
        "rgeom_opencl"
      ]
    },
    {
      "page": "hypergeometric_opencl",
      "title": "The Hypergeometric Distribution (OpenCL)",
      "topics": [
        "dhyper_opencl",
        "phyper_opencl",
        "qhyper_opencl",
        "rhyper_opencl"
      ]
    },
    {
      "page": "lnorm_opencl",
      "title": "The Lognormal Distribution (OpenCL)",
      "topics": [
        "dlnorm_opencl",
        "plnorm_opencl",
        "qlnorm_opencl",
        "rlnorm_opencl"
      ]
    },
    {
      "page": "logistic_opencl",
      "title": "The Logistic Distribution (OpenCL)",
      "topics": [
        "dlogis_opencl",
        "plogis_opencl",
        "qlogis_opencl",
        "rlogis_opencl"
      ]
    },
    {
      "page": "negative_binomial_opencl",
      "title": "The Negative Binomial Distribution (OpenCL)",
      "topics": [
        "dnbinom_mu_opencl",
        "dnbinom_opencl",
        "pnbinom_mu_opencl",
        "pnbinom_opencl",
        "qnbinom_mu_opencl",
        "qnbinom_opencl",
        "rnbinom_mu_opencl",
        "rnbinom_opencl"
      ]
    },
    {
      "page": "normal_opencl",
      "title": "The Normal Distribution (OpenCL)",
      "topics": [
        "dnorm_opencl",
        "pnorm_opencl",
        "qnorm_opencl",
        "rnorm_opencl"
      ]
    },
    {
      "page": "poisson_opencl",
      "title": "The Poisson Distribution (OpenCL)",
      "topics": [
        "dpois_opencl",
        "dpois_raw_opencl",
        "ppois_opencl",
        "qpois_opencl",
        "rpois_opencl"
      ]
    },
    {
      "page": "signrank_opencl",
      "title": "The Wilcoxon Signed Rank Distribution (OpenCL)",
      "topics": [
        "dsignrank_opencl",
        "psignrank_opencl",
        "qsignrank_opencl",
        "rsignrank_opencl"
      ]
    },
    {
      "page": "t_opencl",
      "title": "The Student t Distribution (OpenCL)",
      "topics": [
        "dt_opencl",
        "pt_opencl",
        "qt_opencl",
        "rt_opencl"
      ]
    },
    {
      "page": "uniform_opencl",
      "title": "The Uniform Distribution (OpenCL)",
      "topics": [
        "dunif_opencl",
        "punif_opencl",
        "qunif_opencl",
        "runif_opencl"
      ]
    },
    {
      "page": "weibull_opencl",
      "title": "The Weibull Distribution (OpenCL)",
      "topics": [
        "dweibull_opencl",
        "pweibull_opencl",
        "qweibull_opencl",
        "rweibull_opencl"
      ]
    },
    {
      "page": "wilcox_opencl",
      "title": "The Wilcoxon Rank Sum Distribution (OpenCL)",
      "topics": [
        "dwilcox_opencl",
        "pwilcox_opencl",
        "qwilcox_opencl",
        "rwilcox_opencl"
      ]
    },
    {
      "page": "Ex_EnvelopeEval",
      "title": "Evaluate Negative Log-Likelihood and Gradients",
      "topics": [
        "Ex_EnvelopeEval"
      ]
    },
    {
      "page": "Ex_EnvelopeSize",
      "title": "Envelope Sizing and Optimization",
      "topics": [
        "Ex_EnvelopeSize"
      ]
    },
    {
      "page": "Ex_glmb_Standardize_Model",
      "title": "Standardize A Non-Gaussian Model",
      "topics": [
        "Ex_glmb_Standardize_Model"
      ]
    },
    {
      "page": "Ex_glmbfamfunc",
      "title": "Return family functions used during simulation and post processing",
      "topics": [
        "Ex_glmbfamfunc",
        "print.Ex_glmbfamfunc"
      ]
    },
    {
      "page": "extract_library_subset",
      "title": "Extract a Minimal Library Subset for a Set of Kernels",
      "topics": [
        "extract_library_subset"
      ]
    },
    {
      "page": "special_opencl",
      "title": "Special Functions (OpenCL)",
      "topics": [
        "beta_opencl",
        "choose_opencl",
        "digamma_opencl",
        "gammafn_opencl",
        "lbeta_opencl",
        "lchoose_opencl",
        "lgammafn_opencl",
        "pentagamma_opencl",
        "psigamma_opencl",
        "tetragamma_opencl",
        "trigamma_opencl"
      ]
    },
    {
      "page": "glmbayesEnvelopeExample",
      "title": "Envelope Evaluation Utilities",
      "topics": [
        "glmbayesEnvelopeExample"
      ]
    },
    {
      "page": "math_support_opencl",
      "title": "Math Support Functions (OpenCL)",
      "topics": [
        "fmax2_opencl",
        "fmin2_opencl",
        "fprec_opencl",
        "fround_opencl",
        "fsign_opencl",
        "ftrunc_opencl",
        "imax2_opencl",
        "imin2_opencl",
        "sign_opencl"
      ]
    },
    {
      "page": "load_library_for_kernel",
      "title": "Load a Minimal OpenCL Library Subset for a Single Kernel",
      "topics": [
        "load_library_for_kernel"
      ]
    },
    {
      "page": "gpu_diagnostics",
      "title": "GPU and OpenCL diagnostics for 'nmathopencl'",
      "topics": [
        "gpu_diagnostics",
        "nmathopencl_has_opencl",
        "nmathopencl_opencl_device_info",
        "nmathopencl_opencl_fp64_available",
        "nmathopencl_opencl_reset_device_selection"
      ]
    },
    {
      "page": "rng_core_opencl",
      "title": "OpenCL-backed RNG Core linkage checks",
      "topics": [
        "exp_rand_opencl",
        "norm_rand_opencl",
        "r_unif_index_opencl",
        "unif_rand_opencl"
      ]
    },
    {
      "page": "port_to_opencl_configure",
      "title": "Port an existing static src/Makevars to use OpenCL configure scripts",
      "topics": [
        "port_to_opencl_configure"
      ]
    },
    {
      "page": "tukey_opencl",
      "title": "The Studentized Range Distribution (OpenCL)",
      "topics": [
        "ptukey_opencl",
        "qtukey_opencl"
      ]
    },
    {
      "page": "rext_utils_opencl",
      "title": "OpenCL-backed R_ext runtime utility linkage checks",
      "topics": [
        "r_check_stack_opencl",
        "r_check_user_interrupt_opencl"
      ]
    },
    {
      "page": "rmath_runtime_opencl",
      "title": "OpenCL-backed R Math runtime linkage checks",
      "topics": [
        "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"
      ]
    },
    {
      "page": "multinomial_opencl",
      "title": "The Multinomial Distribution (OpenCL linkage subset)",
      "topics": [
        "rmultinom_opencl"
      ]
    },
    {
      "page": "stage_kernel_dependency_sort",
      "title": "Stage Kernel Library Dependency Sort Results",
      "topics": [
        "stage_kernel_dependency_sort"
      ]
    },
    {
      "page": "use_opencl_configure",
      "title": "Set up OpenCL configure scripts in a downstream R package",
      "topics": [
        "use_opencl_configure"
      ]
    },
    {
      "page": "write_kernel_dependency_index",
      "title": "Build and save a kernel dependency index",
      "topics": [
        "write_kernel_dependency_index"
      ]
    }
  ],
  "_readme": "https://github.com/knygren/nmathopencl/raw/HEAD/README.md",
  "_rundeps": [
    "jsonlite",
    "MASS",
    "opencltools",
    "rbibutils",
    "Rcpp",
    "RcppArmadillo",
    "RcppParallel",
    "Rdpack"
  ],
  "_sysdeps": [
    {
      "shlib": "liblapack",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.26+ds-1ubuntu0.1",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libblas",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.26+ds-1ubuntu0.1",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "Chapter-00.Rmd",
      "filename": "Chapter-00.html",
      "title": "Chapter 00: nmathopencl --- Package Overview",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "What is nmathopencl?",
        "Three-layer architecture",
        "C++ layout inside the package DLL",
        "Related packages",
        "R-side API families",
        "Checking OpenCL availability",
        "Vignette guide"
      ],
      "created": "2025-08-21 06:07:32",
      "modified": "2026-06-04 21:25:58",
      "commits": 22
    },
    {
      "source": "Chapter-01.Rmd",
      "filename": "Chapter-01.html",
      "title": "Chapter 01: Setting Up OpenCL and Enabling GPU Acceleration",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "When you load nmathopencl",
        "What the message means",
        "opencltools as imported dependency",
        "What \"compiling with OpenCL\" means",
        "Enabling OpenCL for nmathopencl",
        "Step 1: Read the load message",
        "Step 2: If OpenCL is not enabled at all",
        "Step 3: If opencltools is enabled but nmathopencl is not",
        "Verifying the setup",
        "Validating GPU calls with the exported wrappers",
        "Troubleshooting common failures",
        "nmathopencl_has_opencl() returns FALSE after driver installation",
        "Compilation fails with CL/cl.h: No such file or directory",
        "Runtime error: clGetPlatformIDs: CL_PLATFORM_NOT_FOUND_KHR",
        "PATH warnings from opencltools::diagnose_glmbayes()",
        "For package developers: next steps"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 21:25:58",
      "commits": 30
    },
    {
      "source": "Chapter-02.Rmd",
      "filename": "Chapter-02.html",
      "title": "Chapter 02: Adding USE_OPENCL and has_opencl() to Your Package",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Why a static src/Makevars breaks CRAN",
        "The configure → USE_OPENCL → has_opencl() chain",
        "Adding has_opencl() to your package",
        "C++ side",
        "R side",
        "Case 1: New package with no existing src/Makevars",
        "Case 2: Existing package with a static src/Makevars",
        "What is preserved",
        "Caveats",
        "Guarding OpenCL code in C++",
        "Testing the CPU-only path before CRAN submission",
        "DESCRIPTION dependencies",
        "Migration note"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 16:45:22",
      "commits": 31
    },
    {
      "source": "Chapter-03.Rmd",
      "filename": "Chapter-03.html",
      "title": "Chapter 03: Structure of nmath Kernel Programs",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Why \"programs\" rather than compiled objects",
        "No #include on the device",
        "The four-layer program structure",
        "Layer 0: OPENCL.cl --- the global configuration header",
        "Layer 1: The upstream shim layer",
        "Type stubs",
        "Capability macros",
        "Runtime no-ops",
        "Math declarations",
        "The design principle",
        "Layer 2: The nmath library and its annotation scheme",
        "@provides and @depends annotations",
        "Only the required subset is loaded",
        "Layer 3: The kernel function",
        "Assembling the program in C++",
        "What this means for downstream developers"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 21:25:58",
      "commits": 37
    },
    {
      "source": "Chapter-04.Rmd",
      "filename": "Chapter-04.html",
      "title": "Chapter 04: The nmath OpenCL Library",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "What is inst/cl/nmath/?",
        "Annotation scheme",
        "File families",
        "Infrastructure / header files",
        "Core math helpers",
        "Density functions (d*)",
        "CDF functions (p*)",
        "Quantile functions (q*)",
        "Random-variate generators (r*)",
        "Special functions",
        "Additional utilities",
        "Cycle-breaking artifacts",
        "The ex_glmbayes_nmath/ subset",
        "Porting fidelity"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 16:45:22",
      "commits": 19
    },
    {
      "source": "Chapter-05.Rmd",
      "filename": "Chapter-05.html",
      "title": "Chapter 05: Kernels, Kernel Runners, and Kernel Wrappers",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "How this chapter is organized",
        "The computation in the example: GLM log-posterior over a grid",
        "Serial vs. parallel execution: the fundamental concept",
        "The serial (CPU) mental model",
        "The parallel (GPU) mental model",
        "When OpenCL is not available",
        "Summary",
        "The kernel wrapper",
        "General description",
        "Example: f2_f3_opencl from ex_glmbayes",
        "Step 1 — Convert C++ input types to flat std::vector<double>",
        "Step 2 — Allocate output buffers",
        "Step 3 — Select the kernel and assemble the program string",
        "Step 4 — Dispatch to the runner",
        "Step 5 — Convert outputs from plain C++ back to the required return types",
        "The kernel runner",
        "Example: f2_f3_kernel_runner from ex_glmbayes",
        "Step 1 — Select a device",
        "Step 2 — Create a context and command queue",
        "Step 3 — Compile the program on-device",
        "Step 4 — Allocate device buffers and transfer input data",
        "Step 5 — Bind kernel arguments",
        "Step 6 — Launch the kernel",
        "Step 7 — Read results back to the host (blocking)",
        "Step 8 — Release all resources",
        "The kernel (*.cl)",
        "Example: f2_f3_binomial_logit from ex_glmbayes",
        "The kernel signature",
        "The parallel execution body",
        "The complete call chain",
        "CRAN safety: how the architecture prevents build failures",
        "Applying the pattern in your package",
        "File layout",
        "Type conversion reference",
        "Headers and DESCRIPTION"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 21:25:58",
      "commits": 24
    },
    {
      "source": "Chapter-06.Rmd",
      "filename": "Chapter-06.html",
      "title": "Chapter 06: Integrating Kernel Wrappers into Your Codebase",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "The two integration patterns",
        "Pattern 1: wrapper with a direct R interface",
        "Pattern 2: wrapper as an internal C++ component",
        "Pattern 1 in detail: dnorm_opencl",
        "The R wrapper",
        "The .opencl_try_or_fallback helper",
        "The C++ kernel wrapper",
        "Pattern 2 in detail: f2_f3_opencl",
        "The exported R function",
        "The C++ dispatcher",
        "Why a dedicated CPU implementation?",
        "Choosing between the two patterns",
        "Naming conventions",
        "Summary"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 21:25:58",
      "commits": 21
    },
    {
      "source": "Chapter-07.Rmd",
      "filename": "Chapter-07.html",
      "title": "Chapter 07: Kernels --- Writing and Using OpenCL Kernel Files",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "What is a kernel?",
        "Anatomy of a simple kernel",
        "Standard argument layout",
        "The *_ex_kernel.cl variants",
        "Kernel file index",
        "Density kernels",
        "CDF kernels",
        "Quantile kernels",
        "Random-variate kernels",
        "Special function kernels",
        "Math support kernels",
        "RNG core kernels",
        "Utility kernels",
        "Bessel kernels (standard and extended)",
        "Program assembly",
        "Writing a custom kernel"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 16:45:22",
      "commits": 19
    },
    {
      "source": "Chapter-08.Rmd",
      "filename": "Chapter-08.html",
      "title": "Chapter 08: Kernel Loading --- load_kernel_source and load_kernel_library",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The assembly problem",
        "opencltools::load_kernel_source()",
        "opencltools::load_kernel_library()",
        "The annotation format",
        "The topological sort algorithm",
        "Verbose output",
        "Cycle detection and breaking",
        "Assembling a complete program",
        "Using libraries from another package",
        "Dependency index --- faster, kernel-specific loading",
        "Building the index --- write_kernel_dependency_index()",
        "Loading with the index --- load_library_for_kernel() (R)",
        "Extracting a subset --- extract_library_subset()",
        "C++ equivalent --- openclPort::load_library_for_kernel()",
        "Error messages"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 16:45:22",
      "commits": 21
    },
    {
      "source": "Chapter-09.Rmd",
      "filename": "Chapter-09.html",
      "title": "Chapter 09: Generic OpenCL Kernel Runners (openclPort layer)",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The openclPort namespace",
        "opencl_dbl_scalar_kernel_runner",
        "Declaration",
        "Arguments",
        "What it does",
        "Argument layout contract",
        "Example: calling the runner from a kernel wrapper",
        "Error-handling utilities",
        "opencl_status_name",
        "opencl_status_hint",
        "opencl_read_platform_info_str / opencl_read_device_info_str",
        "opencl_make_context_error",
        "Other utilities in openclPort",
        "Rcpp -> std::vector conversion",
        "Device probing (C++ / openclPort)",
        "OpenCL build configuration",
        "Using openclPort from a downstream package"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 21:25:58",
      "commits": 15
    },
    {
      "source": "Chapter-10.Rmd",
      "filename": "Chapter-10.html",
      "title": "Chapter 10: Case Study --- Building Custom GLM Kernels (ex_glmbayes)",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Step 1 --- Identify the nmath functions your kernel needs",
        "Step 2 --- Extract the minimal nmath subset",
        "Step 3 --- Write the kernel files",
        "Step 4 --- Write the kernel runner (C++)",
        "Step 5 --- Write the kernel wrapper (C++)",
        "Why load_library_for_kernel() rather than load_kernel_library()?",
        "Step 6 --- Write the Rcpp export wrappers (C++ and R)",
        "Step 7 --- Implement the CPU fallback",
        "File inventory",
        "OpenCL source (inst/cl/)",
        "C++ source (src/)",
        "C++ headers (src/)",
        "R source (R/)",
        "Adapting this pattern for a new package"
      ],
      "created": "2020-07-05 01:43:45",
      "modified": "2026-06-04 21:25:58",
      "commits": 15
    },
    {
      "source": "Chapter-11.Rmd",
      "filename": "Chapter-11.html",
      "title": "Chapter 11: Testing, Debugging, and Benchmarking GPU Kernels",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Correctness testing",
        "Debugging kernel failures",
        "Benchmarking"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-06-04 21:25:58",
      "commits": 32
    },
    {
      "source": "Chapter-12.Rmd",
      "filename": "Chapter-12.html",
      "title": "Chapter 12: The nmathopencl R API --- Distribution Functions on the GPU",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Checking availability",
        "Normal distribution",
        "Distribution families",
        "Gamma",
        "Binomial",
        "Poisson",
        "Beta",
        "Additional families",
        "Noncentral distributions",
        "Special functions and math support",
        "R extension utilities (R_ext)",
        "RNG core",
        "Fallback behavior in detail",
        "Performance notes"
      ],
      "created": "2025-08-21 06:07:32",
      "modified": "2026-06-04 21:25:58",
      "commits": 19
    }
  ],
  "_score": 6.0777311796523925,
  "_indexed": true,
  "_nocasepkg": "nmathopencl",
  "_universes": [
    "knygren"
  ],
  "_previous": "0.8.0",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.8.1",
      "date": "2026-06-05T19:24:42.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "b32b9a573ba103dcb966814764ef2c26351ab07152d23061a51b29b2b7071360",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.8.1",
      "date": "2026-06-05T19:24:09.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "e9bb5e3ec747229cd052bae3ebe2bf4e304e39311d46cb921ed160fd601a500e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.8.1",
      "date": "2026-06-05T19:24:31.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "f8a02072f898a4a1c093027677612995d809d7078d15a9dcecc76015578a36aa",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.8.1",
      "date": "2026-06-05T19:24:10.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "2865f756be33dfc794bd47def4625d10686d5d52b68cdd591131bc3243d96ae5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.8.1",
      "date": "2026-06-05T19:23:29.000Z",
      "arch": "aarch64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "1be0a0cd9bbd42d6c62157974ddce735e1f43b8a7b32dfa45d7cd1d9499169ff",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.8.1",
      "date": "2026-06-05T19:24:38.000Z",
      "arch": "x86_64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "863d05cb18f1bdca2e927ae7033d10481cc2ae765840a73931148de64efccfdd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.8.1",
      "date": "2026-06-05T19:23:38.000Z",
      "arch": "aarch64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "f06538631456324684f83c36d19c61ffb4e9b40526b7f8cf69b110fd2e3bdba5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.8.1",
      "date": "2026-06-05T19:25:30.000Z",
      "arch": "x86_64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "4b56eb6aeb2f975bdbe8a33728a72c1085bf7e89354d7eb426f8fef7da72147e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.8.1",
      "date": "2026-06-05T19:23:34.000Z",
      "arch": "x86_64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "638db60fd1aa2f5063becab18340d0c28d4ecb3f388771db69ab463bac3ce0cc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.8.1",
      "date": "2026-06-05T19:23:46.000Z",
      "arch": "x86_64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "d5b04bbe4c25718b0261feffaba479fc9186569a50d52dcbbe32e6e9c6515219",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.8.1",
      "date": "2026-06-05T19:23:26.000Z",
      "arch": "x86_64",
      "commit": "aee5bcdbe8a8f48db3a40bb4cebd67470ea5776e",
      "fileid": "c3170e4e497512aa467d89c4ef04297d277856a1e809983c3c2e5663ead2222c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/27035039441"
    }
  ]
}