Commit ca9fc40f authored by Tat Dat Duong's avatar Tat Dat Duong
Browse files

chore: refactor size modifications

parent 4c4b7204
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
        using Tree = BTreeContainer<KeyType, ValueType, Order,
                                    TNL::Devices::Cuda, BPlusTree>;

        Tree container(getContainerSize(input.size(), Order));
        Tree container(input.size());

        KeyArray keys(input);
        ValueArray values(input);
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
        using Tree = BTreeContainer<KeyType, ValueType, Order,
                                    TNL::Devices::Host, BPlusTree>;

        Tree container(getContainerSize(input.size(), Order));
        Tree container(input.size());

        KeyArray keys(input);
        ValueArray values(input);
+1 −2
Original line number Diff line number Diff line
@@ -112,8 +112,7 @@ void executeMesh(std::string index, Benchmark::BenchTimer<BenchDevice> &timer) {
  loadPoints("./mesh/cube1m_" + index + "_points.txt", keys, values);

  const int cellCount = cells.getSize();
  BTreeContainer<int, Point, 15, Device, BTree> points(
      getContainerSize(keys.getSize(), 15));
  BTreeContainer<int, Point, 15, Device, BTree> points(keys.getSize());
  expect.setSize(cellCount);
  actual.setSize(cellCount);

+4 −4
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@ int main(int argc, char **argv) {

  Benchmark::execute<Benchmark::Device::Cuda, KeyType>(
      "bplustree::cuda", [](auto &timer, auto input) {
        size_t size = getContainerSize(input.size(), Order);
        BTreeContainer<KeyType, ValueType, Order, TNL::Devices::Cuda, BPlusTree> container(size);
        BTreeContainer<KeyType, ValueType, Order, TNL::Devices::Cuda, BPlusTree> container(
            input.size());

        Containers::Array<KeyType, TNL::Devices::Cuda> keys(input);
        Containers::Array<ValueType, TNL::Devices::Cuda> values(input);
@@ -36,8 +36,8 @@ int main(int argc, char **argv) {

  Benchmark::execute<Benchmark::Device::Cuda, KeyType>(
      "blinktree::cuda", [](auto &timer, auto input) {
        size_t size = getContainerSize(input.size(), Order);
        BTreeContainer<KeyType, ValueType, Order, TNL::Devices::Cuda, BLinkTree> container(size);
        BTreeContainer<KeyType, ValueType, Order, TNL::Devices::Cuda, BLinkTree> container(
            input.size());

        Containers::Array<KeyType, TNL::Devices::Cuda> keys(input);
        Containers::Array<ValueType, TNL::Devices::Cuda> values(input);
+2 −2
Original line number Diff line number Diff line
@@ -11,8 +11,8 @@ int main(int argc, char **argv) {

  Benchmark::execute<Benchmark::Device::Host, KeyType>(
      "btree_host_v7", [](auto &timer, auto input) {
        size_t size = getContainerSize(input.size(), Order);
        BTreeContainer<KeyType, ValueType, Order, TNL::Devices::Host, BLinkTree> container(size);
        BTreeContainer<KeyType, ValueType, Order, TNL::Devices::Host, BLinkTree> container(
            input.size());

        Containers::Array<KeyType, TNL::Devices::Host> keys(input);
        Containers::Array<ValueType, TNL::Devices::Host> values(input);
Loading