Skip to content

Commit

Permalink
get_resources should use u32 (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
enricozb authored Jun 20, 2024
2 parents a6e0e9d + 22496af commit 996ee01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ u32 vars_alloc(Net* net, TM* tm, u32 num) {
}

// Gets the necessary resources for an interaction. Returns success.
static inline bool get_resources(Net* net, TM* tm, u8 need_rbag, u8 need_node, u8 need_vars) {
static inline bool get_resources(Net* net, TM* tm, u32 need_rbag, u32 need_node, u32 need_vars) {
u32 got_rbag = 0xFF; // FIXME: implement
u32 got_node = node_alloc(net, tm, need_node);
u32 got_vars = vars_alloc(net, tm, need_vars);
Expand Down
2 changes: 1 addition & 1 deletion src/hvm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ __device__ void link_pair(Net* net, TM* tm, Pair AB) {
// ---------

// Gets the necessary resources for an interaction.
__device__ bool get_resources(Net* net, TM* tm, u8 need_rbag, u8 need_node, u8 need_vars) {
__device__ bool get_resources(Net* net, TM* tm, u32 need_rbag, u32 need_node, u32 need_vars) {
u32 got_rbag = min(RLEN - tm->rbag.lo_end, RLEN - tm->rbag.hi_end);
u32 got_node;
u32 got_vars;
Expand Down

0 comments on commit 996ee01

Please sign in to comment.