Giter Club home page Giter Club logo

clrng's Introduction

clRNG Library

A library for uniform random number generation in OpenCL.

Streams of random numbers act as virtual random number generators. They can be created on the host computer in unlimited numbers, and then used either on the host or on computing devices by work items to generate random numbers. Each stream also has equally-spaced substreams, which are occasionally useful. The API is currently implemented for four different RNGs, namely the MRG31k3p, MRG32k3a, LFSR113 and Philox-4ร—32-10 generators.

Documentation

What's New

Libraries related to clRNG, for probability distributions and quasi-Monte Carlo methods, are available:

Releases

The first public version of clRNG is v1.0.0 beta. Please go to releases for downloads.

Building

  1. Install the runtime dependency:

  2. Install the build dependencies:

  3. Get the clRNG source code.

  4. Configure the project using CMake (to generate standard makefiles) or CMake Tools for Visual Studio (to generate solution and project files).

  5. Build the project.

  6. Install the project (by default, the library will be installed in the package directory under the build directory).

  7. Point the environment variable CLRNG_ROOT to the installation directory, i.e., the directory under which include/clRNG can be found. This step is optional if the library is installed under /usr, which is the default.

  8. In order to execute the example programs (under the bin subdirectory of the installation directory) or to link clRNG into other software, the dynamic linker must be informed where to find the clRNG shared library. The name and location of the shared library generally depend on the platform.

  9. Optionally run the tests.

Example Instructions for Linux

On a 64-bit Linux platform, steps 3 through 9 from above, executed in a Bash-compatible shell, could consist of:

git clone https://github.com/clMathLibraries/clRNG.git
mkdir clRNG.build; cd clRNG.build; cmake ../clRNG/src
make
make install
export CLRNG_ROOT=$PWD/package
export LD_LIBRARY_PATH=$CLRNG_ROOT/lib64:$LD_LIBRARY_PATH
$CLRNG_ROOT/bin/CTest

Examples

Examples can be found in src/client. The compiled client program examples can be found under the bin subdirectory of the installation package ($CLRNG_ROOT/bin under Linux). Note that the examples expect an OpenCL GPU device to be available.

Simple example

The simple example below shows how to use clRNG to generate random numbers by directly using device side headers (.clh) in your OpenCL kernel.

#include <stdlib.h>
#include <string.h>

#include "clRNG/clRNG.h"
#include "clRNG/mrg31k3p.h"

int main( void )
{
    cl_int err;
    cl_platform_id platform = 0;
    cl_device_id device = 0;
    cl_context_properties props[3] = { CL_CONTEXT_PLATFORM, 0, 0 };
    cl_context ctx = 0;
    cl_command_queue queue = 0;
    cl_program program = 0;
    cl_kernel kernel = 0;
    cl_event event = 0;
    cl_mem bufIn, bufOut;
    float *out;
    char *clrng_root;
    char include_str[1024];
    char build_log[4096];
    size_t i = 0;
    size_t numWorkItems = 64;
    clrngMrg31k3pStream *streams = 0;
    size_t streamBufferSize = 0;
    size_t kernelLines = 0;

    /* Sample kernel that calls clRNG device-side interfaces to generate random numbers */
    const char *kernelSrc[] = {
    "    #define CLRNG_SINGLE_PRECISION                                   \n",
    "    #include <clRNG/mrg31k3p.clh>                                    \n",
    "                                                                     \n",
    "    __kernel void example(__global clrngMrg31k3pHostStream *streams, \n",
    "                          __global float *out)                       \n",
    "    {                                                                \n",
    "        int gid = get_global_id(0);                                  \n",
    "                                                                     \n",
    "        clrngMrg31k3pStream workItemStream;                          \n",
    "        clrngMrg31k3pCopyOverStreamsFromGlobal(1, &workItemStream,   \n",
    "                                                     &streams[gid]); \n",
    "                                                                     \n",
    "        out[gid] = clrngMrg31k3pRandomU01(&workItemStream);          \n",
    "    }                                                                \n",
    "                                                                     \n",
    };

    /* Setup OpenCL environment. */
    err = clGetPlatformIDs( 1, &platform, NULL );
    err = clGetDeviceIDs( platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL );

    props[1] = (cl_context_properties)platform;
    ctx = clCreateContext( props, 1, &device, NULL, NULL, &err );
    queue = clCreateCommandQueue( ctx, device, 0, &err );

    /* Make sure CLRNG_ROOT is specified to get library path */
    clrng_root = getenv("CLRNG_ROOT");
    if(clrng_root == NULL) printf("\nSpecify environment variable CLRNG_ROOT as described\n");
    strcpy(include_str, "-I ");
    strcat(include_str, clrng_root);
    strcat(include_str, "/include");

    /* Create sample kernel */
    kernelLines = sizeof(kernelSrc) / sizeof(kernelSrc[0]);
    program = clCreateProgramWithSource(ctx, kernelLines, kernelSrc, NULL, &err);
    err = clBuildProgram(program, 1, &device, include_str, NULL, NULL);
    if(err != CL_SUCCESS)
    {
        printf("\nclBuildProgram has failed\n");
        clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, 4096, build_log, NULL);
        printf("%s", build_log);
    }
    kernel = clCreateKernel(program, "example", &err);

    /* Create streams */
    streams = clrngMrg31k3pCreateStreams(NULL, numWorkItems, &streamBufferSize, (clrngStatus *)&err);

    /* Create buffers for the kernel */
    bufIn = clCreateBuffer(ctx, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, streamBufferSize, streams, &err);
    bufOut = clCreateBuffer(ctx, CL_MEM_WRITE_ONLY | CL_MEM_HOST_READ_ONLY, numWorkItems * sizeof(cl_float), NULL, &err);

    /* Setup the kernel */
    err = clSetKernelArg(kernel, 0, sizeof(bufIn),  &bufIn);
    err = clSetKernelArg(kernel, 1, sizeof(bufOut), &bufOut);

    /* Execute the kernel and read back results */
    err = clEnqueueNDRangeKernel(queue, kernel, 1, NULL, &numWorkItems, NULL, 0, NULL, &event);
    err = clWaitForEvents(1, &event);
    out = (float *)malloc(numWorkItems * sizeof(out[0]));
    err = clEnqueueReadBuffer(queue, bufOut, CL_TRUE, 0, numWorkItems * sizeof(out[0]), out, 0, NULL, NULL);

    /* Release allocated resources */
    clReleaseEvent(event);
    free(out);
    clReleaseMemObject(bufIn);
    clReleaseMemObject(bufOut);

    clReleaseKernel(kernel);
    clReleaseProgram(program);

    clReleaseCommandQueue(queue);
    clReleaseContext(ctx);

    return 0;
}

Building the documentation manually

The documentation can be generated by running make from within the doc directory. This requires Doxygen to be installed.

clrng's People

Contributors

bragadeesh avatar mungerd avatar nabilkem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clrng's Issues

undefined reference to `clReleaseDevice'

suhubdyd@venise:~/Documents/code/clRNG/src$ cmake CMakeLists.txt 
-- UNICODE feature disabled on linux                                                                                                                                                                                                                                           
-- 64bit build - FIND_LIBRARY_USE_LIB64_PATHS TRUE                                                                                                                                                                                                                             
-- Could NOT find GTest (missing:  GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)                                                                                                                                                                                         
-- Detected GNU fortran compiler.                                                                                                                                                                                                                                              
-- CMAKE_CXX_COMPILER flags: -m64 -pthread                                                                                                                                                                                                                                     
-- CMAKE_CXX_COMPILER debug flags: -g
-- CMAKE_CXX_COMPILER release flags: -O3 -DNDEBUG
-- CMAKE_CXX_COMPILER relwithdebinfo flags: -O2 -g -DNDEBUG
-- CMAKE_EXE_LINKER link flags:  
-- Configuring done
-- Generating done
-- Build files have been written to: /u/suhubdyd/Documents/code/clRNG/src
suhubdyd@venise:~/Documents/code/clRNG/src$ make
[ 16%] Built target clRNG
Linking C executable ../staging/HostOnly
CMakeFiles/HostOnly.dir/common.c.o: In function `call_with_opencl':
common.c:(.text+0x809): undefined reference to `clReleaseDevice'
collect2: error: ld returned 1 exit status
client/CMakeFiles/HostOnly.dir/build.make:112: recipe for target 'staging/HostOnly-1.0.0' failed
make[2]: *** [staging/HostOnly-1.0.0] Error 1
CMakeFiles/Makefile2:133: recipe for target 'client/CMakeFiles/HostOnly.dir/all' failed
make[1]: *** [client/CMakeFiles/HostOnly.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

Non standard installation paths for private headers

Apart from the following public header files:

clRNG.version.h
clRNG.h
mrg31k3p.h
mrg32k3a.h
lfsr113.h
philox432.h

which are installed under the standard /usr/include prefix,

The remaining private headers are installed under a /usr/cl/include prefix which is much less common on Linux.

Is there any rationales about why these files are installed here rather than under something like /usr/include/private or /usr/include/clrng for instance?

Running CTest failed - include failed

C02QH2D7G8WM:package userone$ $CLRNG_ROOT/bin/CTest
-- Using OpenCL platform: Apple
OpenCL 1.2 (Feb 7 2016 15:43:50)
-- Using OpenCL device: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
OpenCL 1.2
SUCCESS 11 tests - Mrg31k3p successive states
SUCCESS 10 tests - Mrg31k3p clrngRandomU01() [double]
SUCCESS 5 tests - Mrg31k3p clrngCreateStreams()
SUCCESS 50 tests - Mrg31k3p clrngRewindStreamCreator()
SUCCESS 10 tests - Mrg31k3p clrngChangeStreamsSpacing(0,2)
SUCCESS 10 tests - Mrg31k3p clrngChangeStreamsSpacing(1,0)
SUCCESS 10 tests - Mrg31k3p clrngChangeStreamsSpacing(2,0)
SUCCESS 10 tests - Mrg31k3p clrngChangeStreamsSpacing(0,30)
SUCCESS 10 tests - Mrg31k3p clrngChangeStreamsSpacing(10,0)
SUCCESS 10 tests - Mrg31k3p clrngChangeStreamsSpacing(10,30)
SUCCESS 10 tests - Mrg31k3p clrngChangeStreamsSpacing(10,-30)
SUCCESS 30 tests - Mrg31k3p clrngRandomInteger(0,100) [double]
SUCCESS 30 tests - Mrg31k3p clrngRandomInteger(12345,23456) [double]
SUCCESS 30 tests - Mrg31k3p clrngRandomInteger(0,1073741824) [double]
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(0,2)
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(2,0)
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(0,30)
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(10,0)
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(10,30)
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(5,-31)
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(10,-30)
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(-10,1030)
SUCCESS 10 tests - Mrg31k3p clrngAdvanceStreams(-5,50)
SUCCESS 50 tests - Mrg31k3p clrngRewindStreams()
SUCCESS 5 tests - Mrg31k3p clrngForwardToNextSubstreams() [clrngAdvanceStreams()]
SUCCESS 64 tests - Mrg31k3p clrngMakeSubstreams()
SUCCESS 1 test - Mrg31k3p combined operations [float]
SUCCESS 1 test - Mrg31k3p combined operations [double]

build log:

:2:10: fatal error: 'clRNG/mrg31k3p.clh' file not found

include <clRNG/mrg31k3p.clh>

     ^

Error -11: cannot build program

Compiler Errors

I've built and installed the library as described here on github. My Problem is getting the following errors in the clBuildProgram method when reading the kernel. This happens even when i set up and run the exmaple code. What ive dine wrong? Thanks a lot.

In file included from :2:
In file included from C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clR
NG-1.0.0-Windows-x64\cl\include\mrg31k3p.clh:44:
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\clRNG.clh:50:9: error: use of type 'double' requires cl_khr_fp64 exten
sion to be enabled
typedef double cl_double;
^
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\clRNG.clh:77:34: error: variadic macros not supported in OpenCL

define clrngSetErrorString(err, ...) (err)

                             ^

In file included from :2:
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\mrg31k3p.clh:113:9: error: invalid argument type 'attribute((addre
ss_space(16776963))) clrngMrg31k3pStream *' (aka 'attribute((address_space(1
6776963))) struct clrngMrg31k3pStream_ *') to unary expression
if (!destStreams)
^~~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\mrg31k3p.clh:114:9: warning: implicit declaration of function 'clrngSe
tErrorString' is invalid in C99
return clrngSetErrorString(CLRNG_INVALID_VALUE, "clrngMrg31k3pCopyOverSt
reamsFromGlobal(): destStreams cannot be NULL");
^
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\mrg31k3p.clh:115:9: error: invalid argument type 'const **global clrng
Mrg31k3pHostStream *' (aka 'const global struct clrngMrg31k3pHostStream *') t
o unary expression
if (!srcStreams)
^~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\mrg31k3p.clh:132:9: error: invalid argument type 'global clrngMrg31k
3pHostStream ' (aka '_global struct clrngMrg31k3pHostStream ') to unary expr
ession
if (!destStreams)
^~~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\mrg31k3p.clh:134:9: error: invalid argument type 'const __attribute
(
(address_space(16776963))) clrngMrg31k3pStream *' (aka 'const attribute((add
ress_space(16776963))) struct clrngMrg31k3pStream
*') to unary expression
if (!srcStreams)
^~~~~~~~~~~
In file included from :2:
In file included from C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clR
NG-1.0.0-Windows-x64\cl\include\mrg31k3p.clh:155:
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:85:6: error: invalid argument type 'attribute
((address_space(16776963))) clrngMrg31k3pStream *' (aka 'attribute((address
space(16776963))) struct clrngMrg31k3pStream *') to unary expression
if (!destStreams)
^~~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:87:6: error: invalid argument type 'const attri
bute
((address_space(16776963))) clrngMrg31k3pStream *' (aka 'const *attribute
((address_space(16776963))) struct clrngMrg31k3pStream ') to unary expressio
n
if (!srcStreams)
^~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:181:1: error: invalid argument type '_attribute
_((address_space(16776963))) clrngMrg31k3pStream ' (aka '__attribute
((address
space(16776963))) struct clrngMrg31k3pStream *') to unary expression
IMPLEMENT_GENERATE_FOR_TYPE(cl_float)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:159:7: note: expanded from macro 'IMPLEMENT_GENER
ATE_FOR_TYPE'
if (!stream)
^~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:181:1: error: invalid argument type '**attribute

_((address_space(16776963))) cl_float ' (aka '__attribute
((address_space(1677
6963))) float *') to unary expression
IMPLEMENT_GENERATE_FOR_TYPE(cl_float)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:161:7: note: expanded from macro 'IMPLEMENT_GENER
ATE_FOR_TYPE'
if (!buffer)
^~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:181:1: error: invalid argument type '*attribute_
_((address_space(16776963))) clrngMrg31k3pStream ' (aka '__attribute
((address
space(16776963))) struct clrngMrg31k3pStream *') to unary expression
IMPLEMENT_GENERATE_FOR_TYPE(cl_float)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:169:7: note: expanded from macro 'IMPLEMENT_GENER
ATE_FOR_TYPE'
if (!stream)
^~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:181:1: error: invalid argument type '*attribute_
_((address_space(16776963))) cl_int ' (aka '__attribute
((address_space(167769
63))) int *') to unary expression
IMPLEMENT_GENERATE_FOR_TYPE(cl_float)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:171:7: note: expanded from macro 'IMPLEMENT_GENER
ATE_FOR_TYPE'
if (!buffer)
^~~~~~~
C:\Users\robin\Desktop\clRNG_CPack_Packages\win64\ZIP\clRNG-1.0.0-Windows-x64\c
l\include\private/mrg31k3p.c.h:195:6: error: invalid argument type '*attribute_
_((address_space(16776963))) clrngMrg31k3pStream ' (aka '__attribute
((address
space(16776963))) struct clrngMrg31k3pStream *') to unary expression
if (!streams)
^~~~~~~~

New release

Seems like there have been quite a few changes since v1.0.0-beta. Wondering if we could get a new release with these changes tagged.

Setting seed value

How do you set a seed value in this library? Currently default creators are used, and there appears to be no way to modify them since the implementation of the struct is in a *.c file. Am I overlooking a simple method? I am surprised this is not part of the intro documentation.

seed

Hello everyone,

I'm currently using clRNG Mrg31k3p in my master thesis to produce random parameters for rays that are used in a ray tracer. However the generated random numbers are always the same in each execution of the program. Do I have to write my own StreamCreator to get different random numbers (and therefore different seeds) in each execution?

Best

error C2169: "_mm_set_epi64x": intrinsic function, cannot be defined

Project Files were generated with CMake for Visual Studio 14 2015.
Project File clRNG.sln. Building the Target "ALL_BUILD" fails because clRNG was not built before.
Building the "clRNG" Project fails with

1>------ Erstellen gestartet: Projekt: clRNG, Konfiguration: Debug Win32 ------
1>  philox432.c
1>d:\clrng\src\include\clrng\private\random123\features/sse.h(98): error C2169: "_mm_set_epi64x": Systeminterne Funktion kann nicht definiert werden

The code in the header file is

#if (defined(__ICC) && __ICC<1210) || (defined(_MSC_VER) && !defined(_WIN64))
/* Is there an intrinsic to assemble an __m128i from two 64-bit words? 
   If not, use the 4x32-bit intrisic instead.  N.B.  It looks like Intel
   added _mm_set_epi64x to icc version 12.1 in Jan 2012.
*/
R123_STATIC_INLINE __m128i _mm_set_epi64x(uint64_t v1, uint64_t v0){
    union{
        uint64_t u64;
        uint32_t u32[2];
    } u1, u0;
    u1.u64 = v1;
    u0.u64 = v0;
    return _mm_set_epi32(u1.u32[1], u1.u32[0], u0.u32[1], u0.u32[0]);
}
#endif

Is it me or is it clRNG?
Platform Win 10 x64, Visual Studio 2015 (Configuration "Visual Studio 14 2015" is right, "Visual Studio 2015" won't work).

GPU Hangs at large RNG generation

My GPU seems to hang when I use a private stream to generate more than 1e5 random numbers.

Found first GPU device on platform Intel(R) OpenCL HD Graphics
Vendor: Intel(R) Corporation
Version: OpenCL 3.0
Profile: FULL_PROFILE
Device name: Intel(R) Gen9 HD Graphics NEO

clRNG.clh:79:34: error: variadic macros not supported in OpenCL

Hello.

Both beignet and neo Intel drivers do not support variadic macros, so
#define clrngSetErrorString(err, ...) (err)
does not compile.

I suggest to introduce clrngSetErrorString2 and clrngSetErrorString3 macros to address errors with and without one extra argument. Should I prepare a merge request?

Execution of Test Case Failed

C02QH2D7G8WM:opencl userone$ g++ clrng1.cpp -o clrng1 -lclrng -framework OpenCL
C02QH2D7G8WM:opencl userone$ ./clrng1

clBuildProgram has failed
In file included from :2:
In file included from /Users/userone/Documents/workspace/clRNG.build/package/include/clRNG/mrg31k3p.clh:44:
/Users/userone/Documents/workspace/clRNG.build/package/include/clRNG/clRNG.clh:57:9: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
typedef double cl_double;
^
In file included from :2:
In file included from /Users/userone/Documents/workspace/clRNG.build/package/include/clRNG/mrg31k3p.clh:155:
/Users/userone/Documents/workspace/clRNG.build/package/include/clRNG/private/mrg31k3p.c.h:181:1: warning: double precision constant requires cl_khr_fp64, casting to single precision
IMPLEMENT_GENERATE_FOR_TYPE(cl_float)
^
/Users/userone/Documents/workspace/clRNG.build/package/include/clRNG/private/mrg31k3p.c.h:151:56: note: expanded from macro 'IMPLEMENT_GENERATE_FOR_TYPE'
return clrngMrg31k3pNextState(&stream->current) * mrg31k3p_NORM_##fptype;
^
:11:1: note: expanded from macro 'mrg31k3p_NORM_'
mrg31k3p_NORM_cl_float
^
/Users/userone/Documents/workspace/clRNG.build/package/include/clRNG/private/mrg31k3p.c.h:50:33: note: expanded from macro 'mrg31k3p_NORM_cl_float'

define mrg31k3p_NORM_cl_float 4.6566126e-10

                            ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.