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