summaryrefslogtreecommitdiff
path: root/BS/support
diff options
context:
space:
mode:
authorYun-Ze Li <p76091292@gs.ncku.edu.tw>2021-12-23 09:05:17 +0100
committerYun-Ze Li <p76091292@gs.ncku.edu.tw>2021-12-23 09:05:17 +0100
commit875271995b12c00b24f38124b2b19e3fc94d2057 (patch)
treef9475ddb71f805ce33901be3b5bd552ef9218919 /BS/support
parent196683d2ec21da97764a17b5683539588715d1de (diff)
bs_bug_fix: Modify boundary case handlings in BS
Current boundary case handling may discard some numbers obliged to be compared with `searching_for`, which in my opinion can result in false positives (BS fails to identify the number which is indeed in the input array). This commit changed the boundary check condition to `if(current_mram_block_addr_A < start_mram_block_addr_A + BLOCK_SIZE)`, where the expression returns true if and only if the length of the range [start_mram_block_addr_A, end_mram_block_addr_A) has become smaller than 2*BLOCK_SIZE. When this happens, we can then finalize the BS result by checking if `searching_for` exists within [start_mram_block_addr_A, end_mram_block_addr_A) without overlooking any number that should be checked. Signed-off-by: Yun-Ze Li <p76091292@gs.ncku.edu.tw>
Diffstat (limited to 'BS/support')
0 files changed, 0 insertions, 0 deletions