Commit e4de35fc authored by Etienne Renault's avatar Etienne Renault
Browse files

bricks: adapt with the new bricks

* bricks/brick-hash, spot/ltsmin/ltsmin.cc,
tests/core/bricks.cc: here.
parent 20448060
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
* POSSIBILITY OF SUCH DAMAGE. */ * POSSIBILITY OF SUCH DAMAGE. */
#include "brick-assert" #include "brick-assert"
#include <spot/misc/common.hh>
#include <cstddef> #include <cstddef>
#include <utility> // pair #include <utility> // pair
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <bricks/brick-hashset.h> #include <bricks/brick-hashset>
#include <bricks/brick-hash.h> #include <bricks/brick-hash>
struct both struct both
{ {
...@@ -54,9 +54,6 @@ int main() ...@@ -54,9 +54,6 @@ int main()
// Declare concurrent hash table // Declare concurrent hash table
brick::hashset::FastConcurrent<both , mytest_hasher_both<both>> ht2; brick::hashset::FastConcurrent<both , mytest_hasher_both<both>> ht2;
// Set initial size
ht2.setSize(1024);
// Declare workers and provide them some jobs. // Declare workers and provide them some jobs.
std::vector<std::thread> workers; std::vector<std::thread> workers;
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
...@@ -75,6 +72,7 @@ int main() ...@@ -75,6 +72,7 @@ int main()
for (unsigned i = 0; i < ht2.size(); ++ i) for (unsigned i = 0; i < ht2.size(); ++ i)
if (ht2.valid(i)) if (ht2.valid(i))
std::cout << i << ": {" std::cout << i << ": {"
<< ht2[i].x << ',' << ht2[i].y << "}\n"; << ht2.valueAt(i).x << ','
<< ht2.valueAt(i).y << "}\n";
return 0; return 0;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment