Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vl/20241209 #108

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[requires]
benchmark/1.8.4
fmt/10.2.1
boost/1.86.0

[generators]
CMakeDeps
CMakeToolchain

[options]
boost/*:shared=True
[layout]
cmake_layout
2 changes: 1 addition & 1 deletion examples/bidder/generator/ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

with open("../data/geo_campaign", "w") as file:
for geo_id, city, country in geo:
max_targetings = random.randint(1, max_campaigns/10)
max_targetings = random.randint(1, int(max_campaigns/10))
start_pos = random.randint(1, max_campaigns-max_targetings)
for i in range(start_pos, start_pos+max_targetings+1):
file.write("%d\t%d\n" % (geo_id, i))
Expand Down
2 changes: 1 addition & 1 deletion examples/bidder/generator/ico.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

file = open("../data/ico_campaign", "w")
for domain, ref_id in ico_domains:
max_targetings = random.randint(1, max_campaigns/10)
max_targetings = random.randint(1, int(max_campaigns/10))
start_pos = random.randint(1, max_campaigns-max_targetings)
for i in range(start_pos, start_pos+max_targetings+1):
file.write("%d\t%d\n" % (ref_id, i))
Expand Down
8 changes: 4 additions & 4 deletions examples/campaign/campaign_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,17 @@ struct BudgetManager {

template <typename Config = CampaignManagerConfig,
typename Memory = typename mpclmi::ipc::Shared,
typename Alloc = typename datacache::entity_cache<Memory, ipc::data::campaign_container, 67108864, CampaignBudget>::char_allocator >
typename Alloc = typename datacache::entity_cache<Memory, ipc::data::campaign_container, CampaignBudget>::char_allocator >
class CampaignCache {
using Cache = datacache::entity_cache<Memory, ipc::data::campaign_container, 67108864, CampaignBudget> ;
using Cache = datacache::entity_cache<Memory, ipc::data::campaign_container, CampaignBudget> ;
using Keys = vanilla::tagged_tuple<
typename ipc::data::campaign_entity<Alloc,CampaignBudget>::campaign_id_tag, uint32_t
>;
using CampaignTag = typename ipc::data::campaign_entity<Alloc,CampaignBudget>::campaign_id_tag;
using insert_handler_type = std::function<bool (const CampaignBudget *budget, uint32_t campaign_id)>;
using remove_handler_type = std::function<bool (uint32_t campaign_id)>;
public:
public:

public:
using DataCollection = std::vector<std::shared_ptr <CampaignBudget> >;
CampaignCache(const Config &config):
config{config}, cache(config.data().ipc_name)
Expand Down
Loading
Loading