Skip to content

OpenCL

0.2-11Package record

Interface allowing R to use OpenCL

0packages dependsuggested by 2
4.3Kdownloads / year
2.6%test coverage
0/10flavors OK

Overview

About

This package provides an interface to OpenCL, allowing R to leverage computing power of GPUs and other HPC accelerator devices.

Changes in 0.2-11
  • Do not issue kernel compiler warning if the build log

string consists solely of whitespaces. (#21)

  • Replace DATAPTR with INTEGER/REAL to be API compliant.

From NEWS in the release

Install

Health

CRAN checks
2ERROR8NOTE
Check messages
ERRORexamplesr-oldrel-macos-arm64, r-release-macos-arm64
Running examples in ‘OpenCL-Ex.R’ failed
The error most likely occurred in:

> ### Name: clBuffer
> ### Title: Create and handle OpenCL buffers
> ### Aliases: clBuffer as.clBuffer as.double.clBuffer as.integer.clBuffer
> ###   is.clBuffer print.clBuffer length.clBuffer [.clBuffer [<-.clBuffer
> ### Keywords: interface
> 
> ### ** Examples
> 
> library(OpenCL)
> 
> ## Only proceed if this machine has at least one OpenCL platform
> if (length(oclPlatforms())) {
+ 
+ ctx<-oclContext()
+ 
+ buf<-clBuffer(ctx, 16, "numeric")
+ # Do not write buf<-..., as this replaces buf with a vector.
+ buf[]<-sqrt(1:16)
+ buf
+ 
+ intbuf<-as.clBuffer(1:16, ctx)
+ print(intbuf)
+ 
+ length(buf)
+ as.numeric(buf)
+ buf[]
+ 
+ buf[3:5]
+ buf[1:2] = 0
+ buf
+ 
+ ## clBuffer is the required argument and return type of oclRun.
+ ## See oclRun() examples.
+ }
Error in oclDevices(type = device) : 
  clGetDeviceIDs failed, oclError -30: invalid value (CL_INVALID_VALUE)
Calls: oclContext -> oclDevices
Execution halted
ERRORtestsr-oldrel-macos-arm64, r-release-macos-arm64
Running ‘buffer.R’ [0s/0s]
Running the tests in ‘tests/buffer.R’ failed.
Complete output:
  > # 0. Create context
  > library(OpenCL)
  > 
  > if (!length(oclPlatforms())) {
  +     cat("== Cannot run tests as there is no platform")
  +     q("no")
  + }
  > 
  > ctx<-oclContext()
  Error in oclDevices(type = device) : 
    clGetDeviceIDs failed, oclError -30: invalid value (CL_INVALID_VALUE)
  Calls: oclContext -> oclDevices
  Execution halted
NOTEDESCRIPTION meta-informationr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64

r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64

License stub is invalid DCF.

r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Licence stub is invalid DCF.
NOTEtestsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-oldrel-macos-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-x86_64

r-patched-linux-x86_64, r-release-linux-x86_64

Running ‘buffer.R’ [0s/1s]
  Comparing ‘buffer.Rout’ to ‘buffer.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
  Running ‘kernel.R’ [4s/6s]
  Comparing ‘kernel.Rout’ to ‘kernel.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< >

r-devel-linux-x86_64-debian-clang

Running ‘buffer.R’ [0s/1s]
  Comparing ‘buffer.Rout’ to ‘buffer.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
  Running ‘kernel.R’ [4s/7s]
  Comparing ‘kernel.Rout’ to ‘kernel.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< >

r-devel-linux-x86_64-debian-gcc

Running ‘buffer.R’ [0s/1s]
  Comparing ‘buffer.Rout’ to ‘buffer.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
  Running ‘kernel.R’ [3s/3s]
  Comparing ‘kernel.Rout’ to ‘kernel.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< >

r-devel-linux-x86_64-fedora-clang

Running ‘buffer.R’
  Comparing ‘buffer.Rout’ to ‘buffer.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
  Running ‘kernel.R’
  Comparing ‘kernel.Rout’ to ‘kernel.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
18,19d11
< OMP: Warning #96: Cannot form a team with 28 threads, using 2 instead.
< OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).

r-devel-linux-x86_64-fedora-gcc

Running ‘buffer.R’
  Comparing ‘buffer.Rout’ to ‘buffer.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
  Running ‘kernel.R’
  Comparing ‘kernel.Rout’ to ‘kernel.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< >

r-oldrel-macos-x86_64

Running ‘buffer.R’ [0s/0s]
  Comparing ‘buffer.Rout’ to ‘buffer.Rout.save’ ...5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
77c71
< OpenCL buffer, 16 elements of type single 
---
> OpenCL buffer, 16 elements of type double 
79c73
<  [9] 3.316625 3.464102 3.605551 3.741657 3.872983 4.000000 4.123106 4.242640
---
>  [9] 3.316625 3.464102 3.605551 3.741657 3.872983 4.000000 4.123106 4.242641
  Running ‘kernel.R’ [0s/1s]
  Comparing ‘kernel.Rout’ to ‘kernel.Rout.save’ ...5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
29c23
< OpenCL buffer, 16 elements of type single 
---
> OpenCL buffer, 16 elements of type double 
32,35c26,27
< OpenCL buffer, 16 elements of type single 
<  [1]   1.00000   4.00000   9.00000  16.00000  25.00000  36.00001  48.99999
<  [8]  63.99999  81.00000 100.00000 121.00002 144.00000 169.00000 196.00003
< [15] 225.00003 256.00000
---
> OpenCL buffer, 16 elements of type double 
>  [1]   1   4   9  16  25  36  49  64  81 100 121 144 169 196 225 256
42c34
< OpenCL buffer, 16 elements of type single 
---
> OpenCL buffer, 16 elements of type double

r-release-macos-x86_64

Running ‘buffer.R’ [0s/0s]
  Comparing ‘buffer.Rout’ to ‘buffer.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
77c71
< OpenCL buffer, 16 elements of type single 
---
> OpenCL buffer, 16 elements of type double 
79c73
<  [9] 3.316625 3.464102 3.605551 3.741657 3.872983 4.000000 4.123106 4.242640
---
>  [9] 3.316625 3.464102 3.605551 3.741657 3.872983 4.000000 4.123106 4.242641
  Running ‘kernel.R’ [0s/1s]
  Comparing ‘kernel.Rout’ to ‘kernel.Rout.save’ ...
5,10d4
< > 
< > if (!length(oclPlatforms())) {
< +     cat("== Cannot run tests as there is no platform")
< +     q("no")
< + }
< > 
29c23
< OpenCL buffer, 16 elements of type single 
---
> OpenCL buffer, 16 elements of type double 
32,35c26,27
< OpenCL buffer, 16 elements of type single 
<  [1]   1.00000   4.00000   9.00000  16.00000  25.00000  36.00001  48.99999
<  [8]  63.99999  81.00000 100.00000 121.00002 144.00000 169.00000 196.00003
< [15] 225.00003 256.00000
---
> OpenCL buffer, 16 elements of type double 
>  [1]   1   4   9  16  25  36  49  64  81 100 121 144 169 196 225 256
42c34
< OpenCL buffer, 16 elements of type single 
---
> OpenCL buffer, 16 elements of type double
Additional issues

CRAN check page ↗

Slowest check: 36 s · r-devel-linux-x86_64-debian-clang
Status changes
  • ERROR8 NOTE, 2 ERRORNow
  • ERROR9 NOTE, 3 ERROR2026-03-10
Advisories

none known

Documentation

In release 0.2-11
READMENoVignettesNoNEWSYes · 67% structured · mentions 0.2-11Citation fileNoWebsiteYes
Help pages
9
Examples that run
100%7 run in a plain check
Exported functions with examples
78%
Documented parameters
not tracked
Return-value docs
not tracked
Help pages citing references
11%

Downloads

4.3K
CRAN downloads in the past year
Rank #11,029 · ~12/day · ~355/mo
Daily download trend is not available in this view yet.
32830 days
94290 days
4.3K1 year
Compare downloads with other packages →
Also on375 r2u43 autocran

Repository

19Stars
10Forks
2Open issues
4Open PRs
0Releases
158Commits
4Commit identities
158 commits · Last activity 2026-04-19 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
50%
Median days to close, 50 most recently updated closed issues
17
Median days to close, 50 most recently updated closed PRs
164

Stars over time

2025-06-10 · 172026-07-07 · 19
PracticesBeta

Checks run against github.com/s-u/opencl on 2026-10-11.

No development-tooling practices detected in the upstream repository.

How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
0 external dependencies (excludes base and recommended)

Installing OpenCL adds no packages beyond those that come with R.

Depends (1)
R >= 2.0.0
Imports (0)
none
LinkingTo (0)
none
Suggests (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 2
Suggests, most downloaded first

People & History

People (2)
Author, Maintainer since 0.1-0, Copyright holder
https://urbanek.nz
Author · added in 0.2-1
Releases (10)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.2-11Latest
    record
    2026-01-19 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.2-10
    record
    2023-12-22 · diff ↗
  • 0.2-9
    record
    2023-11-30 · diff ↗ ·
    added 1 export
    pattern:clLocal$
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 0.2-2
    record
    2021-07-24 · diff ↗ ·
    removed 1 export
    pattern:^ocl
    added 1 export
    pattern:^ocl[A-Z]+
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2-1
    record
    2020-03-09 · diff ↗ ·
    removed 1 export
    pattern:clFloat$
    added 1 export
    pattern:clBuffer$
  • R
    R 3.6.0 released · 2019-04-26
  • 0.1-3.1
    record
    2019-01-31 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
Show 11 earlier eventsHide 11 earlier events
  • R
    R 3.3.0 released · 2016-05-03
  • R
    R 3.2.0 released · 2015-04-16
  • R
    R 3.1.0 released · 2014-04-10
  • R
    R 3.0.0 released · 2013-04-03
  • 0.1-3
    record
    2012-05-26 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 0.1-2
    record
    2012-03-08 · diff ↗
  • R
    R 2.14.0 released · 2011-10-31
  • 0.1-1
    record
    2011-08-10 · diff ↗ ·
    added 1 export
    pattern:clFloat$
  • 0.1-0
    record
    2011-08-08
  • R
    R 2.13.0 released · 2011-04-13

Package metadata

First published
2011-08-08
Total releases
10 / 15 yrs
License
BSD_3_clause + file LICENSE OSI
Minimum R
≥ 2.0.0
Download size
31 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("OpenCL")
Urbanek, S., & Puchert, A. (2026). OpenCL: Interface allowing R to use OpenCL (Version 0.2-11) [Computer software]. https://doi.org/10.32614/CRAN.package.OpenCL

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for OpenCL version 0.2-11 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy