   (ptr [this]
     "JOCL `Pointer` to this object.")
   (size [this]
-    "Memory size of this cl object in bytes."))
+    "Memory size of this cl or host object in bytes."))
 
 (defprotocol Contextual
   "An object that has some dependency on a `cl_context`."

      (set-args! my-kernel cl-buffer-0)
      (set-args! my-kernel cl-buffer-0 cl-buffer-1 (int-array 8) 42)
      (set-args! my-kernel 2 cl-buffer-2 cl-buffer-3 (int-array 8) 42)
"
  ([kernel x & values]
   (if (integer? x)
     (loop [i x values values]
       (if-let [mem (first values)]
         (do (set-arg! kernel i mem)
             (recur (inc i) (next values)))
         kernel))
     (apply set-args! kernel 0 (cons x values)))))

  ([^long size]
   (svm-buffer* *context* size 0 0)))

(extend-type Long
  Argument
  (set-arg [this kernel n]
    (with-check (CL/clSetKernelArg kernel n this nil)
      kernel)))

(extend-type Integer
  Argument
  (set-arg [this kernel n]
    (with-check (CL/clSetKernelArg kernel n this nil)
      kernel)))

(extend-type (Class/forName "[F")
