Restore verbatim functionality (bench 5634666)

This commit is contained in:
2026-03-18 17:29:42 +01:00
parent b847a00b43
commit 11607ddcc4
2 changed files with 6 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ ECHO = $(if $(filter 1,$(SKIP_DEPS)),@,)
CC := clang
EXE_BASE := bin/heimdall
EXE := $(EXE_BASE)$(if $(OS),.exe,)
EVALFILE := ../networks/files/laevateinn-v2.bin
EVALFILE := ../networks/files/laevateinn-v2-verbatim.bin
NET_NAME := $(notdir $(EVALFILE))
NET_ID := $(basename $(NET_NAME))
LD := lld
@@ -29,7 +29,7 @@ OUTPUT_BUCKETS := 8
MERGED_KINGS := 0
EVAL_NORMALIZE_FACTOR := 337
HORIZONTAL_MIRRORING := 1
VERBATIM_NET := 0
VERBATIM_NET := 1
PAIRWISE_NET := 0
HL_SIZE := 1536
FT_SIZE := 768

View File

@@ -91,8 +91,10 @@ proc newEvalState*(networkPath: string = "", verbose: static bool = true): EvalS
else:
when verbose:
echo "info string using verbatim network"
let temp = cast[ptr Network](VERBATIM_NET_DATA)
network = temp[]
# Don't even bother asking me why I need these shenanigans. I couldn't tell you.
# Nim generates invalid C code unless we do this weird dance
let temp = cast[ptr UncheckedArray[byte]](VERBATIM_NET_DATA)
network = cast[ptr Network](temp)[]
else:
network = loadNet(networkPath)