KHR_fp64
WebCL working group (public_webcl 'at' khronos.org)
Tomi Aarnio, Nokia Research
Mikael Bourges-Sevenier, Advanced Micro Devices
Steven Eliuk, Samsung Electronics
Tasneem Brutch, Samsung Electronics
Members of the WebCL working group
Last modified date: August 14, 2014
Revision: 2
WebCL extension #2
Written against the WebCL API 1.0 specification.
This extension exposes the cl_khr_fp64 functionality to WebCL.
There are no WebCL-specific behavioral changes.
Consult the above extension for documentation, issues and new functions and enumerants.
When this extension is enabled:
getInfo
member function in WebCLDevice will
accept the additional enums specified in the IDL below.
build
member function in WebCLProgram will
accept programs containing #pragma OPENCL EXTENSION
cl_khr_fp64 : enable
.
doubleN
datatypes can be used in WebCL
kernel code.
partial interface WebCL { CLenum DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0x100B; CLenum DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE = 0x103B; };
// Enables KHR_fp64 on all devices that support it, and // returns those devices in an array. If there are no // such devices, an empty array is returned. function getFP64Devices() { var devices = []; webcl.getPlatforms().forEach(function(plat) { plat.getDevices().forEach(function(dev) { var isSupported = dev.enableExtension("KHR_fp64"); if (isSupported) devices.push(dev); }); }); if (devices.length === 0) { console.error("Your system does not support KHR_fp64."); } else { console.info("Enabled KHR_fp64 on "+devices.length+" devices."); console.info("Make sure to include '#pragma OPENCL EXTENSION cl_khr_fp64 : enable' in your kernel code."); } return devices; }
Revision 1, 2013/11/19
Revision 2, 2014/08/14