Skip to content

Commit

Permalink
Replace np.uint32(~0) with np.iinfo(np.uint32).max
Browse files Browse the repository at this point in the history
  • Loading branch information
perara committed Jun 21, 2024
1 parent 17c22b3 commit c54e932
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tmu/clause_bank/clause_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def initialize_clauses(self):
order="c"
)

self.clause_bank[:, :, 0: self.number_of_state_bits_ta - 1] = np.uint32(~0)
self.clause_bank[:, :, 0: self.number_of_state_bits_ta - 1] = np.iinfo(np.uint32).max #np.uint32(~0)
self.clause_bank[:, :, self.number_of_state_bits_ta - 1] = 0
self.clause_bank = np.ascontiguousarray(self.clause_bank.reshape(
(self.number_of_clauses * self.number_of_ta_chunks * self.number_of_state_bits_ta)))
Expand All @@ -141,7 +141,7 @@ def initialize_clauses(self):

self.clause_bank_ind = np.empty(
(self.number_of_clauses, self.number_of_ta_chunks, self.number_of_state_bits_ind), dtype=np.uint32)
self.clause_bank_ind[:, :, :] = np.uint32(~0)
self.clause_bank_ind[:, :, :] = np.iinfo(np.uint32).max #np.uint32(~0)

self.clause_bank_ind = np.ascontiguousarray(self.clause_bank_ind.reshape(
(self.number_of_clauses * self.number_of_ta_chunks * self.number_of_state_bits_ind)))
Expand Down

0 comments on commit c54e932

Please sign in to comment.