Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebCLKernel.setArg fails for scalar double argument #4

Open
Maratyszcza opened this issue Jul 7, 2014 · 1 comment
Open

WebCLKernel.setArg fails for scalar double argument #4

Maratyszcza opened this issue Jul 7, 2014 · 1 comment

Comments

@Maratyszcza
Copy link

WebCLKernel.setArg(..., Float64Array([c])) fails for kernels with scalar double arguments. This seems to be specific to double type: other scalars seem to work well. Reproducer:

<!DOCTYPE html>
<html>
    <head>
        <title>Bug Reproducer</title>
    </head>
    <body>
        <div>
        </div>
        <script type="text/javascript">
            var source = "kernel void init(global double* out, double value){ out[get_global_id(0)] = value; }";

            var platforms = webcl.getPlatforms();
            var platform = platforms[0];
            var devices = platform.getDevices();
            var device = devices[0];
            var context = webcl.createContext(device);
            var program = context.createProgram(source);
            program.build([device]);
            var kernel = program.createKernel("init");
            var buffer = context.createBuffer(webcl.MEM_READ_WRITE, 1024*8);
            kernel.setArg(0, buffer);
            kernel.setArg(1, new Float64Array([0.0])); /* Uncaught OpenCL exception: Unknown */
        </script>
    </body>
</html>
@Maratyszcza
Copy link
Author

Same bug in WebKit-WebCL: #534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant