Skip to content

Commit

Permalink
rm exchange.cu
Browse files Browse the repository at this point in the history
  • Loading branch information
barnex committed Mar 15, 2013
1 parent d7db800 commit 83f21aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 63 deletions.
47 changes: 0 additions & 47 deletions cuda/exchange.cu

This file was deleted.

12 changes: 4 additions & 8 deletions cuda/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"github.com/barnex/cuda5/cu"
)

// TODO: m should be normalized.
func Exchange(Hex *data.Slice, M *data.Slice, Aex float64) {
// Add exchange field to Heff. m must be normalized to unit length.
func AddExchange(Heff *data.Slice, m *data.Slice, Aex float64) {
// TODO: size check
mesh := Hex.Mesh()
mesh := Heff.Mesh()
N := mesh.Size()
c := mesh.CellSize()
Aex *= 2 * mag.Mu0
Expand All @@ -20,13 +20,9 @@ func Exchange(Hex *data.Slice, M *data.Slice, Aex float64) {

str := [3]cu.Stream{stream(), stream(), stream()}
for c := 0; c < 3; c++ {
k_exchange1comp_async(Hex.DevPtr(c), M.DevPtr(c), w0, w1, w2, N[0], N[1], N[2], cfg, str[c])
k_exchange1comp_async(Heff.DevPtr(c), m.DevPtr(c), w0, w1, w2, N[0], N[1], N[2], cfg, str[c])
}
syncAndRecycle(str[0])
syncAndRecycle(str[1])
syncAndRecycle(str[2])

// k_exchange(Hex.DevPtr(0), Hex.DevPtr(1), Hex.DevPtr(2),
// M.DevPtr(0), M.DevPtr(1), M.DevPtr(2),
// w0, w1, w2, N[0], N[1], N[2], cfg)
}
8 changes: 0 additions & 8 deletions cuda/exchange.h

This file was deleted.

0 comments on commit 83f21aa

Please sign in to comment.