- using R version 4.4.0 RC (2024-04-16 r86468 ucrt)
- using platform: x86_64-w64-mingw32
- R was compiled by
gcc.exe (GCC) 13.2.0
GNU Fortran (GCC) 13.2.0
- running under: Windows Server 2022 x64 (build 20348)
- using session charset: UTF-8
- checking for file 'OpenCL/DESCRIPTION' ... OK
- this is package 'OpenCL' version '0.2-10'
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking whether package 'OpenCL' can be installed ... OK
See the install log for details.
- used C compiler: 'gcc.exe (GCC) 13.2.0'
- checking installed package size ... OK
- checking package directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [0s] OK
- checking whether the package can be loaded with stated dependencies ... [0s] OK
- checking whether the package can be unloaded cleanly ... [0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s] OK
- checking whether the namespace can be unloaded cleanly ... [0s] OK
- checking loading without being on the library search path ... [0s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [2s] OK
- checking Rd files ... [1s] OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking compilation flags in Makevars ... OK
- checking for GNU extensions in Makefiles ... NOTE
GNU make is a SystemRequirements.
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking use of PKG_*FLAGS in Makefiles ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compiled code ... OK
- checking examples ... [1s] OK
- checking for unstated dependencies in 'tests' ... OK
- checking tests ... [1s] OK
Running 'buffer.R' [0s]
Comparing 'buffer.Rout' to 'buffer.Rout.save' ...4a5,81
> > ctx<-oclContext()
> >
> > # 1. Create single-precision buffer and fill with values
> > buf <- clBuffer(ctx, 16, "single")
> > buf[] <- 1:16
> >
> > # Inspect the resulting buffer
> > class(buf)
> [1] "clBuffer"
> > print(attributes(buf)$mode)
> [1] "single"
> > print(buf)
> OpenCL buffer, 16 elements of type single
> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
> > length(buf)
> [1] 16
> >
> > # subsetting
> > buf[2:5] # contiguous
> [1] 2 3 4 5
> > buf[c(1,6)] # non-contiguous
> [1] 1 6
> > buf[-1] # negative
> [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
> > buf[buf[] > 6] # logical
> [1] 7 8 9 10 11 12 13 14 15 16
> > buf[c(NA, 4)] # NA
> [1] NA 4
> >
> > # subassignment
> > buf[2:3] = 0 # contiguous
> > buf[1:5]
> [1] 1 0 0 4 5
> > sum(buf[1:4])
> [1] 5
> > buf[5:4] = c(1,2) # non-contiguous (reversed)
> > buf[1:5]
> [1] 1 0 0 2 1
> >
> > # Check if memory accounting works.
> > oclMemLimits()$used
> [1] 64
> > rm(buf)
> > invisible(gc())
> > oclMemLimits()$used
> [1] 0
> >
> > # 2. The same for an integer buffer
> > ints <- clBuffer(ctx, 32, "integer")
> > ints[] <- 16:47
> >
> > # Inspect the resulting buffer
> > class(ints)
> [1] "clBuffer"
> > print(attributes(ints)$mode)
> [1] "integer"
> > print(ints)
> OpenCL buffer, 32 elements of type integer
> [1] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
> [26] 41 42 43 44 45 46 47
> > length(ints)
> [1] 32
> >
> > # 3. Let's see if we can guess the type correctly
> > numeric.buf <- as.clBuffer(sqrt(3:18), ctx)
> > print(numeric.buf)
> OpenCL buffer, 16 elements of type double
> [1] 1.732051 2.000000 2.236068 2.449490 2.645751 2.828427 3.000000 3.162278
> [9] 3.316625 3.464102 3.605551 3.741657 3.872983 4.000000 4.123106 4.242641
> > integer.buf <- as.clBuffer(-1:14, ctx)
> > print(integer.buf)
> OpenCL buffer, 16 elements of type integer
> [1] -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
> >
> > # 4. Other functions
> > c(is.clBuffer(ints), is.clBuffer(1:16), is.clBuffer(ctx))
> [1] TRUE FALSE FALSE
6,15d82
< > if (!length(oclPlatforms())) {
< + cat("== Cannot run tests as there is no platform")
< + q("no")
< + }
< == Cannot run tests as there is no platform> proc.time()
< user system elapsed
< 0.15 0.09 0.21
< Warning message:
< In oclPlatforms() :
< No OpenCL platforms found - try adding Installable Client Drivers (ICD) for your hardware.
Running 'kernel.R' [0s]
Comparing 'kernel.Rout' to 'kernel.Rout.save' ...4a5,36
> > ctx <- oclContext()
> > code <- readChar("kernel.cl", nchars=file.info("kernel.cl")$size)
> >
> > # 1. Create kernel without inputs and run it
> > linear <- oclSimpleKernel(ctx, "linear", code, "integer")
> > oclRun(linear, 4)
> OpenCL buffer, 4 elements of type integer
> [1] 0 1 2 3
> > oclRun(linear, 32)
> OpenCL buffer, 32 elements of type integer
> [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
> [26] 25 26 27 28 29 30 31
> >
> > # 2. Run kernel with a numeric input buffer
> > square <- oclSimpleKernel(ctx, "square", code)
> > input <- as.clBuffer(sqrt(1:16), ctx)
> > output <- oclRun(square, 16, input)
> > output
> OpenCL buffer, 16 elements of type double
> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
> > oclRun(square, 16, output)
> OpenCL buffer, 16 elements of type double
> [1] 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256
> >
> > # 3. Run kernel with a buffer argument and a scalar argument
> > multiply <- oclSimpleKernel(ctx, "multiply", code)
> > input <- as.clBuffer((1:16)^2, ctx)
> > output <- oclRun(multiply, 16, input, 2.5)
> > output
> OpenCL buffer, 16 elements of type double
> [1] 2.5 10.0 22.5 40.0 62.5 90.0 122.5 160.0 202.5 250.0 302.5 360.0
> [13] 422.5 490.0 562.5 640.0
6,15d37
< > if (!length(oclPlatforms())) {
< + cat("== Cannot run tests as there is no platform")
< + q("no")
< + }
< == Cannot run tests as there is no platform> proc.time()
< user system elapsed
< 0.20 0.03 0.23
< Warning message:
< In oclPlatforms() :
< No OpenCL platforms found - try adding Installable Client Drivers (ICD) for your hardware.
- checking PDF version of manual ... [21s] OK
- checking HTML version of manual ... [2s] OK
- DONE
Status: 1 NOTE