Skip to content

Commit

Permalink
small fix to QUDA wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosborn committed Dec 16, 2024
1 parent 260379b commit 8729615
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/quda/quda.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import enum_quda, quda_constants
import base/stdUtils

## *
## @file quda.h
Expand All @@ -10,7 +11,7 @@ import enum_quda, quda_constants
##

type
ConstInt* {.importc:"const int".} = cint
#ConstInt* {.importc:"const int".} = cint
double_complex* {.importc:"double _Complex".} = object
converter toDoubleComplex*(x: array[2,float]): double_complex =
var r = cast[ptr array[2,float]](addr result)
Expand Down
3 changes: 2 additions & 1 deletion src/quda/qudaWrapperImpl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ proc qudaSetup*(l: Layout, verbosity = QUDA_SILENT): Layout[1] =
let coords = cast[ptr UncheckedArray[cint]](coords0)
let r = pl[].rankFromRankCoords(coords)
r.cint
initCommsGridQuda(qudaParam.rankGeom.len.cint, qudaParam.rankGeom[0].addr,
initCommsGridQuda(qudaParam.rankGeom.len.cint,
cast[ptr ConstInt](qudaParam.rankGeom[0].addr),
qudaCommsMap, unsafeAddr(l))
qudaInit(qudaParam.initArg)
qudaParam.layout = l.physGeom.newLayout 1
Expand Down

0 comments on commit 8729615

Please sign in to comment.