17inline constexpr std::int32_t
kFieldInf = std::numeric_limits<std::int32_t>::max() / 4;
22 const std::uint8_t*
pass =
nullptr;
24 const std::uint8_t*
target =
nullptr;
constexpr std::int32_t kFieldInf
int field_cpu(const FieldProblem &p, std::vector< std::int32_t > &out)
CPU reference. out is resized to layers*h*w. Returns the number of sweep rounds.
GpuStatus field_gpu(int device_index, const FieldProblem &p, std::vector< std::int32_t > &out)
Compiled GPU backend; on failure (no device, no memory) returns !ok and leaves out empty.
Fills an array with draws 0..n-1 of the RNG stream (seed, stage, item).
const std::uint8_t * via_pass
[h][w]: 1 = a via may be placed (all layers)
const std::uint8_t * target
[layers][h][w]: 1 = distance 0
const std::uint8_t * pass
[layers][h][w]: 1 = may be entered
std::int32_t via
move costs (nm-equivalent)