diff --git a/src/base/basicOps.nim b/src/base/basicOps.nim index af0fc96..5498451 100644 --- a/src/base/basicOps.nim +++ b/src/base/basicOps.nim @@ -256,6 +256,7 @@ template setUnopT*(op,fun,t1,t2: untyped) {.dirty.} = rSetUnopT template setBinopP*(op,fun,t1,t2,t3: untyped) {.dirty.} = + getOptimPragmas() #template op*(x: typedesc[t1]; y: typedesc[t2]): typedesc = t3 proc op*(x: t1; y: t2): auto {.alwaysInline,noInit.} = var r{.noInit.}: t3 diff --git a/src/base/profile.nim b/src/base/profile.nim index 7197cbf..f577bec 100644 --- a/src/base/profile.nim +++ b/src/base/profile.nim @@ -822,7 +822,7 @@ proc makeHotspotTable(lrti: List[RTInfoObj]): tuple[ns:int64,oh:int64] = t.children.add ri.children[i] do: # loc not found hs[loc] = ri - let tot = makeHotSpotTable(List[RTInfoObj](ri.children)) + #let tot = makeHotSpotTable(List[RTInfoObj](ri.children)) return (nstot, ohtot) proc echoHotspots* = diff --git a/src/examples/heatbath2dclockt.nim b/src/examples/heatbath2dclockt.nim index ed7d8cb..ba7997f 100644 --- a/src/examples/heatbath2dclockt.nim +++ b/src/examples/heatbath2dclockt.nim @@ -2,7 +2,7 @@ import qex import gauge, physics/qcdTypes import os, strutils, times -proc sumEnergy(fr,fi:any, J, h:any, g:any, p:seq[float], sf,sb:any) = +proc sumEnergy(fr,fi:auto, J, h:auto, g:auto, p:seq[float], sf,sb:auto) = fr := 0 fi := 0 for nu in 0..`(x) template TXT(x: untyped): untyped = xmltree.newText(x) diff --git a/src/examples/staghmc.nim b/src/examples/staghmc.nim index dc1746e..d040e46 100644 --- a/src/examples/staghmc.nim +++ b/src/examples/staghmc.nim @@ -134,9 +134,9 @@ proc mdvf(t: float) = p[mu] -= s*f[mu] toc("mdvf") -proc mdvf2(t: float) = - mdv(t) - mdvf(t) +#proc mdvf2(t: float) = +# mdv(t) +# mdvf(t) # For force gradient update #const useFG = true @@ -175,7 +175,7 @@ proc mdvAll(t: openarray[float]) = # For now, just do it separately. if t[0] != 0: mdv t[0] if t[1] != 0: mdvf t[1] -proc mdvAllfga(ts,gs:openarray[float]) = +proc mdvAllfga(ts,gs:openarray[float]) {.used.} = # TODO: actually share computation. # For now, just do it separately. let diff --git a/src/examples/staghmc_h.nim b/src/examples/staghmc_h.nim index 2643c1a..8af3801 100644 --- a/src/examples/staghmc_h.nim +++ b/src/examples/staghmc_h.nim @@ -80,7 +80,7 @@ template pnorm2(p2:float) = threadMaster: p2 = p2t g.rephase -proc gaction(g:any, f2:seq[float], p2:float):auto = +proc gaction(g:auto, f2:seq[float], p2:float):auto = let ga = gc.actionA g fa = f2.mapit(0.5*it) @@ -100,14 +100,14 @@ template faction(fa:seq[float]) = threadMaster: fa[i] = psi2 g.rephase -proc olf(f: var any, v1: any, v2: any) = +proc olf(f: var auto, v1: auto, v2: auto) = var t {.noInit.}: type(f) for i in 0..