Skip to content

Commit

Permalink
add requiresCopy for execCuda macro logic back in
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed Oct 9, 2024
1 parent 6f84a73 commit cec52b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions constantine/math_compiler/codegen_nvidia.nim
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ proc getIdent(n: NimNode): NimNode =
proc determineDevicePtrs(r, i: NimNode, iTypes: seq[NimNode]): seq[(NimNode, NimNode)] =
## Returns the device pointer ident and its associated original symbol.
for el in r:
#if not el.requiresCopy:
# error("The argument for `res`: " & $el.repr & " of type: " & $el.getTypeImpl().treerepr &
# " does not require copying. This is not allowed for return values.")
if not el.requiresCopy:
error("The argument for `res`: " & $el.repr & " of type: " & $el.getTypeImpl().treerepr &
" does not require copying. This is not allowed for return values.")
result.add (getIdent(el), el)
for idx in 0 ..< i.len:
let input = i[idx]
Expand Down

0 comments on commit cec52b1

Please sign in to comment.