Use uintptr_t instead of size_t to store funtion id (#916)

Also does some small cleanup of the compile cache code.
This commit is contained in:
Cheng
2024-03-28 22:37:59 +09:00
committed by GitHub
parent c4fd0e5ede
commit a7b404ff53
3 changed files with 32 additions and 30 deletions

View File

@@ -20,12 +20,12 @@ std::vector<array> vmap_replace(
// idea.
std::function<std::vector<array>(const std::vector<array>&)> compile(
const std::function<std::vector<array>(const std::vector<array>&)>& fun,
size_t fun_id,
std::uintptr_t fun_id,
bool shapeless = false,
std::vector<uint64_t> constants = {});
// Erase cached compile functions
void compile_erase(size_t fun_id);
void compile_erase(std::uintptr_t fun_id);
// Create an InTracing object during tracing operations to signify to the rest
// of the codebase that we are during tracing so evals should not throw away