BIDData/BIDMat

Inconsistent pow and atan2 implementation of matrix functions for GPU and CPU

Opened this issue · 1 comments

Hi,

I'm running into issues using the pow and atan2 functions on GPU and CPU matrices. The issue is really that the math works on the CPU and doesn't on the GPU. The following snippet works:

val m = rand(10,10)
val p = zeros(10,10) + 2
val buff = ones(10,10)
pow(m,p,buff)

And the similar GPU implementation hangs forever:

val m = grand(10,10)
val p = gzeros(10,10) + 2
val buff = gones(10,10)
pow(m,p,buff)

This is easy enough to work around with e.g.

exp(p *@ ln(m))

but was somewhat confusing when code that ran fine on a cpu hung forever on a GPU.

I see that the ^ operator is now available for matrices which is a nicer way to use the power function.