Skip to content

Commit

Permalink
Disable the remaining `'=destroy' hook which takes a 'var T' paramete…
Browse files Browse the repository at this point in the history
…r is deprecated` warning

We cannot really fix that warning because it is due to the fact that (as for 2.0.2) nim creates a var destructor when `new X, T` is called. Since we cannot fix it we simply disable it.
  • Loading branch information
AngelEzquerra committed Mar 16, 2024
1 parent 17f2151 commit ddd24a3
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,14 @@ proc newTiles*(
# - kc * nr in L1 cache µkernel
# - mc * kc in L2 cache Ã
# - kc * nc in L3 cache ~B (no L3 in Xeon Phi ¯\_(ツ)_/¯)

# The following line implictly creates a destructor which, as of nim 2.0.2,
# creates a "non var `=destroy`" which generates a warning
# We temporary disable that warning because there is nothing we can do about it
{.push warning[Deprecated]:off.}
new result, deallocTiles[T]
{.pop.}

const
nr = ukernel.nr
mr = ukernel.mr
Expand Down

0 comments on commit ddd24a3

Please sign in to comment.