               CL/CL_DEVICE_DOUBLE_FP_CONFIG
               exec-capabilities-table))
 
-(defn info-extensions [device]
-  (str/split (info-string* CL/clGetDeviceInfo device
-                           CL/CL_DEVICE_EXTENSIONS)
-             #" "))
+(defn info-extensions [clid]
+  (str/split
+   (cond
+    (instance? cl_device_id clid)
+    (info-string* CL/clGetDeviceInfo clid CL/CL_DEVICE_EXTENSIONS)
+    (instance? cl_platform_id clid)
+    (info-string* CL/clGetPlatformInfo clid CL/CL_PLATFORM_EXTENSIONS)
+    :default nil)
+   #" "))
 
 (defn info-global-mem-cache-size [device]
   (info-long* CL/clGetDeviceInfo device CL/CL_DEVICE_GLOBAL_MEM_CACHE_SIZE))

           (String. res# 0 (dec size#))
           (throw (error err#))))
       (throw (error err#)))))

(defmacro info-mask* [method clobject info table]
  `(let [mask# (info-long* ~method ~clobject ~info)]

          (cl_context_properties.)
          props))

;;TODO Callback function
(defn ^:private context* [^objects devices ^objects properties]
  (let [err (int-array 1)
        res (CL/clCreateContext properties
