Writing a value involves reading the value.
Since each thread is just a sequence of instructions. We can log each step of its insertion way and compare the results afterwards.
Yeah, but those instructions run in parallel, hence it's guaranteed that, without an access sync, at some point, a r/w race condition will occur. You should know best what'ya doin', so I won't insist.
Or are you saying this can never happen:
X = 0
Cycle T0 T1
0 read X read X // T0: is X 0 or 32? T1: is X 0 or 8?
1 set x[3] set X[5] // T0: is X 8 or 40? T1: is X 32 or 40?
2 write X write X // what X is final? what about cache lines refresh?
3 X = ???????? // one of 8, 32, or 40
The most amusing stuff using with locks and creating bloomfilters with the same inputs two times in row.
alexander@alexander-home:~/Documents/Test_Dir/Point_Search_GMP$ diff bloom1B.bf bloom1.bf
Binary files bloom1B.bf and bloom1.bf differ
alexander@alexander-home:~/Documents/Test_Dir/Point_Search_GMP$ diff bloom2B.bf bloom2.bf
Binary files bloom2B.bf and bloom2.bf differ
alexander@alexander-home:~/Documents/Test_Dir/Point_Search_GMP$ xxd bloom1.bf > 1.hex
alexander@alexander-home:~/Documents/Test_Dir/Point_Search_GMP$ xxd bloom1B.bf > 2.hex
alexander@alexander-home:~/Documents/Test_Dir/Point_Search_GMP$ diff 1.hex 2.hex
22207627c22207627
< 152dc8a0: 3ad7 2abf 9562 b27b 8582 d16f 1141 f67c :.*..b.{...o.A.|
---
> 152dc8a0: 3ad7 2abf 9562 b27b 8580 d16f 1141 f67c :.*..b.{...o.A.|
alexander@alexander-home:~/Documents/Test_Dir/Point_Search_GMP$ ./point_search_batch
[12:23:11] S_table generated
[12:23:11] Range Start: 54 bits
[12:23:11] Range End : 57 bits
[12:23:11] Block Width: 2^26
[12:23:11] Search Pub : 03752210872cdc16aef43c804271c1799f7198d1201e0db6fd997fac674ac60169
[12:23:11] Loading Bloomfilter bloom1.bf
[12:23:11] Loading Bloomfilter bloom2.bf
[12:23:11] Search in progress...
[12:23:28] BloomFilter Hit bloom1.bf (Even Point) [Higher Range Half]
[12:23:28] Privatekey: 000000000000000000000000000000000000000000000000007259db92c35ed8
[12:23:28] Elapsed time: (0)hours (0)minutes (17)seconds
alexander@alexander-home:~/Documents/Test_Dir/Point_Search_GMP$ ./point_search_batch
[12:23:57] S_table generated
[12:23:57] Range Start: 54 bits
[12:23:57] Range End : 57 bits
[12:23:57] Block Width: 2^26
[12:23:57] Search Pub : 03752210872cdc16aef43c804271c1799f7198d1201e0db6fd997fac674ac60169
[12:23:57] Loading Bloomfilter bloom1.bf
[12:23:57] Loading Bloomfilter bloom2.bf
[12:23:57] Search in progress...
[12:24:16] BloomFilter Hit bloom1.bf (Even Point) [Higher Range Half]
[12:24:16] Privatekey: 000000000000000000000000000000000000000000000000007259db92c35ed8
[12:24:16] Elapsed time: (0)hours (0)minutes (18)seconds
But anyway works like a charm. Today tested range 68-69 bits with 2^32 bloomfilter size.