Skip to content

Commit

Permalink
more erros in circular :(
Browse files Browse the repository at this point in the history
  • Loading branch information
lpawela committed Aug 23, 2019
1 parent 2e08c77 commit 669b24f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions curandommatrices/src/circular.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# FIXME: this can be accelerated by writing a custom kernel
function angle!(a)
a = CuArray(a)
# @cuprintf("thread %ld", Int64(1))
= real.(a)
# @cuprintf("thread %ld", Int64(1))
Expand All @@ -10,9 +11,11 @@ function angle!(a)
# @cuprintf("thread %ld", Int64(1))
stride = blockDim().x * gridDim().x
# @cuprintf("thread %ld", Int64(1))
for i=index:stride:length(ℜ)
a[i] = (ℑ[i], ℜ[i])
end
i = (blockIdx().x-1) * blockDim().x + threadIdx().x
a[i] = ℜ[i] + ℑ[i]
# for i=index:stride:length(ℜ)
# a[i] = +(ℑ[i], ℜ[i])
# end
return nothing
end

Expand Down
2 changes: 1 addition & 1 deletion curandommatrices/src/ginibre.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
curand(g::GinibreEnsemble{1}) = CuArrays.randn(g.m, g.n)
curand(g::GinibreEnsemble{2}) = CuArrays.randn( g.m, g.n)+1im*CuArrays.randn(g.m, g.n)
curand(g::GinibreEnsemble{2}) = CuArrays.randn(g.m, g.n)+1im*CuArrays.randn(g.m, g.n)

function curand(g::GinibreEnsemble{4})
q0=CuArrays.randn(g.m, g.n)
Expand Down

0 comments on commit 669b24f

Please sign in to comment.