     (equals-ge ctx queue prog ^CLGEMatrix a ^CLGEMatrix b))
   BLAS
   (swap [_ a b]
-    (ge-swap-copy queue CLBlast/CLBlastSswap ^CLGEMatrix a ^CLGEMatrix b)
+    (ge-swap queue CLBlast/CLBlastSswap ^CLGEMatrix a ^CLGEMatrix b)
     a)
   (copy [_ a b]
-    (ge-swap-copy queue CLBlast/CLBlastScopy ^CLGEMatrix a ^CLGEMatrix b)
+    (ge-copy queue CLBlast/CLBlastSomatcopy ^CLGEMatrix a ^CLGEMatrix b)
     b)
   (scal [_ alpha a]
     (ge-scal-set queue CLBlast/CLBlastSscal alpha ^CLGEMatrix a)


;; =============== Common GE matrix macros and functions =======================

(defmacro ^:private ge-swap-copy [queue method a b]
  `(when (< 0 (.count ~a))
     (let [ld-a# (.stride ~a)
           sd-a# (.sd ~a)

    (equals-ge ctx queue prog ^CLGEMatrix a ^CLGEMatrix b))
  BLAS
  (swap [_ a b]
    (ge-swap queue CLBlast/CLBlastDswap ^CLGEMatrix a ^CLGEMatrix b)
    a)
  (copy [_ a b]
    (ge-copy queue CLBlast/CLBlastDomatcopy ^CLGEMatrix a ^CLGEMatrix b)
    b)
  (scal [_ alpha a]
    (ge-scal-set queue CLBlast/CLBlastDscal alpha ^CLGEMatrix a)
