Skip to content

[cpp] use smart pointers everywhere#26

Open
vmedv wants to merge 2 commits intoITMO-PTDC-Team:masterfrom
vmedv:cpp-make-key-value-hardcoded
Open

[cpp] use smart pointers everywhere#26
vmedv wants to merge 2 commits intoITMO-PTDC-Team:masterfrom
vmedv:cpp-make-key-value-hardcoded

Conversation

@vmedv
Copy link
Copy Markdown
Contributor

@vmedv vmedv commented Mar 16, 2026

this PR remove all templates in prior to truly hardcoded types since since global extern defines anyway did not work flawlessly

real support of different types will be introduced later

Closes #5, Replaces #18

@vmedv vmedv force-pushed the cpp-make-key-value-hardcoded branch from 38bf018 to d59e6ec Compare March 16, 2026 21:35
std::shared_ptr<ArgsGenerator<K>> range_generator_;
ArgsGeneratorPtr get_generator_;
ArgsGeneratorPtr insert_generator_;
ArgsGeneratorPtr remove_generator_;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

один генератор может отвечать за несколько разных операций

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

все перевел на шареды

@@ -1,6 +0,0 @@
all:
g++ -I. -I.. -I../../common -I../.. -I../../ -pthread -ldl -mrtm json_example.cpp -o json_example.out
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделай здесь же cmake файл для компиляции примера

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пока не получится, так как оно зависит от DS, а внутри microbench мы про DS не знаем. это можно будет, когда я развяжу микробенч и все остальное

Parameters* warmUp;
Parameters test{};
Parameters prefill{};
Parameters warmUp{};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай сделаем optional, чтобы можно было скипать один из этапов

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделал, проверил, example json соответствующе изменил

Comment thread cpp/example.json Outdated
@@ -0,0 +1,85 @@
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

надо выпилить (оставив все примеры в json_example)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

- remove extra file
- use shared pointers everywhere to pessimise state sharing
- introduce optionals to bench params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run sanitizer and detect memory leaks

2 participants