when ismain
This commit is contained in:
parent
2c77490357
commit
784e88319f
|
@ -35,6 +35,7 @@ proc `$`(n: HtmlNode): string =
|
|||
result = newStringOfCap(1000)
|
||||
toString n, result
|
||||
|
||||
when isMainModule:
|
||||
import drchaos
|
||||
|
||||
proc default(_: typedesc[HtmlNode]): HtmlNode =
|
||||
|
|
|
@ -44,8 +44,11 @@ proc eye*(N: static[int], A: typedesc[float32], order: OrderType = colMajor): Ma
|
|||
for i in 0 ..< N:
|
||||
result.data[i + N * i] = 1'f32
|
||||
|
||||
when isMainModule:
|
||||
import drchaos
|
||||
|
||||
{.experimental: "strictFuncs".}
|
||||
|
||||
proc default[M, N: static[int]](_: typedesc[Matrix32[M, N]]): Matrix32[M, N] =
|
||||
zeros(M, N, float32)
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
@end
|
||||
--passC: "-fsanitize=address,undefined"
|
||||
--passL: "-fsanitize=address,undefined"
|
||||
#--define: release
|
||||
#--define: danger
|
||||
--debugger: native
|
||||
--path: "../"
|
||||
|
|
Loading…
Reference in New Issue