You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to apply a bit shifting shr operator in a do loop that I found in built-in.lisp (line 127) like so:
(defkernel reduce-array (void ((in float*) (out float*)))
(let ((x thread-idx-x))
(with-shared-memory ((acc float 64))
(set (aref acc x) (aref in x))
(syncthreads)
(do ((j 32 (shr j 1)))
((< j 1))
(when (< x j)
(set (aref acc x) (+ (aref acc x)
(aref acc (+ x j)))))
(syncthreads))
(when (= x 0)
(set (aref out 0) (aref acc 0)))))
However in a Ubuntu 16.04 sbcl I am getting a function undefined error:
The function SHR is undefined.
[Condition of type SIMPLE-ERROR]
The symbol appears to be exported in the built-in.lisp file but it seems like it cannot be found for some reason, when one tries to list all autocomplete symbols in slime, the shr symbol does not appear to be there:
The CL ASH function does not appear (expectedly) to work inside the kernel definition either, so how do I go about applying bit shifting in defkernel? Please excuse me if I am asking something entirely obvious, I am quite rusty on my Lisp skills after all these years.
The text was updated successfully, but these errors were encountered:
I am trying to apply a bit shifting shr operator in a do loop that I found in built-in.lisp (line 127) like so:
However in a Ubuntu 16.04 sbcl I am getting a function undefined error:
The symbol appears to be exported in the built-in.lisp file but it seems like it cannot be found for some reason, when one tries to list all autocomplete symbols in slime, the shr symbol does not appear to be there:
The CL ASH function does not appear (expectedly) to work inside the kernel definition either, so how do I go about applying bit shifting in defkernel? Please excuse me if I am asking something entirely obvious, I am quite rusty on my Lisp skills after all these years.
The text was updated successfully, but these errors were encountered: