Skip to content
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
6 changes: 5 additions & 1 deletion Modules/private/PhlexSymbolVisibility.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ include(GenerateExportHeader)

function(phlex_apply_symbol_visibility target)
set(EXPORT_HEADER "${PROJECT_BINARY_DIR}/include/phlex/${target}_export.hpp")
set(EXPORT_MACRO_NAME "${target}_EXPORT")

# Macro names follow the "UPPER_CASE" convention as described in the .clang-tidy file.
string(TOUPPER "${target}" target_upper)
set(EXPORT_MACRO_NAME "${target_upper}_EXPORT")

generate_export_header(
${target}
BASE_NAME ${target}
EXPORT_FILE_NAME ${EXPORT_HEADER}
EXPORT_MACRO_NAME ${EXPORT_MACRO_NAME}
STATIC_DEFINE "${target}_STATIC_DEFINE"
INCLUDE_GUARD_NAME "${target_upper}_EXPORT_HPP"
)

if(PHLEX_HIDE_SYMBOLS)
Expand Down
8 changes: 4 additions & 4 deletions phlex/app/load_module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ namespace phlex::experimental {
namespace detail {
// Adjust_config adds the module_label as a parameter, and it checks if the 'py'
// parameter exists, inserting the 'cpp: "pymodule"' configuration if necessary.
run_phlex_EXPORT boost::json::object adjust_config(std::string const& label,
RUN_PHLEX_EXPORT boost::json::object adjust_config(std::string const& label,
boost::json::object raw_config);
}

run_phlex_EXPORT void load_module(framework_graph& g,
RUN_PHLEX_EXPORT void load_module(framework_graph& g,
std::string const& label,
boost::json::object config);
run_phlex_EXPORT void load_source(framework_graph& g,
RUN_PHLEX_EXPORT void load_source(framework_graph& g,
std::string const& label,
boost::json::object config);
run_phlex_EXPORT driver_bundle load_driver(boost::json::object const& config);
RUN_PHLEX_EXPORT driver_bundle load_driver(boost::json::object const& config);
}

#endif // PHLEX_APP_LOAD_MODULE_HPP
2 changes: 1 addition & 1 deletion phlex/app/run.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <optional>

namespace phlex::experimental {
run_phlex_EXPORT void run(boost::json::object const& configurations, int max_parallelism);
RUN_PHLEX_EXPORT void run(boost::json::object const& configurations, int max_parallelism);
}

#endif // PHLEX_APP_RUN_HPP
2 changes: 1 addition & 1 deletion phlex/app/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
#include "phlex/run_phlex_export.hpp"

namespace phlex::experimental {
run_phlex_EXPORT char const* version();
RUN_PHLEX_EXPORT char const* version();
}
#endif // PHLEX_APP_VERSION_HPP
6 changes: 3 additions & 3 deletions phlex/concurrency.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <cstddef>

namespace phlex {
struct phlex_core_EXPORT concurrency {
static phlex_core_EXPORT concurrency const unlimited;
static phlex_core_EXPORT concurrency const serial;
struct PHLEX_CORE_EXPORT concurrency {
static PHLEX_CORE_EXPORT concurrency const unlimited;
static PHLEX_CORE_EXPORT concurrency const serial;

std::size_t value;
};
Expand Down
10 changes: 5 additions & 5 deletions phlex/configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace phlex {
}

// Used later for product_query
phlex_configuration_internal_EXPORT std::optional<phlex::experimental::identifier>
PHLEX_CONFIGURATION_INTERNAL_EXPORT std::optional<phlex::experimental::identifier>
value_if_exists(boost::json::object const& obj, std::string_view parameter);

// helper for unpacking json array
Expand All @@ -36,7 +36,7 @@ namespace phlex {
}
}

class phlex_configuration_internal_EXPORT configuration {
class PHLEX_CONFIGURATION_INTERNAL_EXPORT configuration {
public:
configuration() = default;
explicit configuration(boost::json::object const& config) : config_{config} {}
Expand Down Expand Up @@ -91,14 +91,14 @@ namespace phlex {
// To enable direct conversions from Boost JSON types to our own types, we implement
// tag_invoke(...) function overloads, which are the customization points Boost JSON
// provides.
phlex_configuration_internal_EXPORT configuration
PHLEX_CONFIGURATION_INTERNAL_EXPORT configuration
tag_invoke(boost::json::value_to_tag<configuration> const&, boost::json::value const& jv);

phlex_configuration_internal_EXPORT product_query
PHLEX_CONFIGURATION_INTERNAL_EXPORT product_query
tag_invoke(boost::json::value_to_tag<product_query> const&, boost::json::value const& jv);

namespace experimental {
phlex_configuration_internal_EXPORT identifier
PHLEX_CONFIGURATION_INTERNAL_EXPORT identifier
tag_invoke(boost::json::value_to_tag<identifier> const&, boost::json::value const& jv);
}

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/consumer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <vector>

namespace phlex::experimental {
class phlex_core_EXPORT consumer {
class PHLEX_CORE_EXPORT consumer {
public:
consumer(algorithm_name name, std::vector<std::string> predicates);

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/declared_fold.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <utility>

namespace phlex::experimental {
class phlex_core_EXPORT declared_fold : public products_consumer {
class PHLEX_CORE_EXPORT declared_fold : public products_consumer {
public:
declared_fold(algorithm_name name,
std::vector<std::string> predicates,
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/declared_observer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

namespace phlex::experimental {

class phlex_core_EXPORT declared_observer : public products_consumer {
class PHLEX_CORE_EXPORT declared_observer : public products_consumer {
public:
declared_observer(algorithm_name name,
std::vector<std::string> predicates,
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/declared_output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace phlex::experimental {
namespace detail {
using output_function_t = std::function<void(product_store const&)>;
}
class phlex_core_EXPORT declared_output : public consumer {
class PHLEX_CORE_EXPORT declared_output : public consumer {
public:
declared_output(algorithm_name name,
std::size_t concurrency,
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/declared_predicate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

namespace phlex::experimental {

class phlex_core_EXPORT declared_predicate : public products_consumer {
class PHLEX_CORE_EXPORT declared_predicate : public products_consumer {
public:
declared_predicate(algorithm_name name,
std::vector<std::string> predicates,
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/declared_provider.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace phlex::experimental {

class phlex_core_EXPORT declared_provider {
class PHLEX_CORE_EXPORT declared_provider {
public:
declared_provider(algorithm_name name, product_query output_product);
virtual ~declared_provider();
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/declared_transform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

namespace phlex::experimental {

class phlex_core_EXPORT declared_transform : public products_consumer {
class PHLEX_CORE_EXPORT declared_transform : public products_consumer {
public:
declared_transform(algorithm_name name,
std::vector<std::string> predicates,
Expand Down
4 changes: 2 additions & 2 deletions phlex/core/declared_unfold.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

namespace phlex::experimental {

class phlex_core_EXPORT generator {
class PHLEX_CORE_EXPORT generator {
public:
explicit generator(product_store_const_ptr const& parent,
algorithm_name node_name,
Expand All @@ -55,7 +55,7 @@ namespace phlex::experimental {
std::map<data_cell_index::hash_type, std::size_t> child_counts_;
};

class phlex_core_EXPORT declared_unfold : public products_consumer {
class PHLEX_CORE_EXPORT declared_unfold : public products_consumer {
public:
declared_unfold(algorithm_name name,
std::vector<std::string> predicates,
Expand Down
4 changes: 2 additions & 2 deletions phlex/core/detail/filter_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace phlex::experimental {
return value == true_value;
}

class phlex_core_EXPORT decision_map {
class PHLEX_CORE_EXPORT decision_map {
using decisions_t = oneapi::tbb::concurrent_hash_map<std::size_t, unsigned int>;

public:
Expand All @@ -49,7 +49,7 @@ namespace phlex::experimental {
decisions_t results_;
};

class phlex_core_EXPORT data_map {
class PHLEX_CORE_EXPORT data_map {
using stores_t =
oneapi::tbb::concurrent_hash_map<std::size_t, std::vector<product_store_const_ptr>>;

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/detail/make_algorithm_name.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace phlex::experimental {
class algorithm_name;

namespace detail {
phlex_core_EXPORT algorithm_name make_algorithm_name(configuration const* config,
PHLEX_CORE_EXPORT algorithm_name make_algorithm_name(configuration const* config,
std::string_view name);
}
}
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/detail/maybe_predicates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace phlex {
}

namespace phlex::experimental::detail {
phlex_core_EXPORT std::optional<std::vector<std::string>> maybe_predicates(
PHLEX_CORE_EXPORT std::optional<std::vector<std::string>> maybe_predicates(
configuration const* config);
}

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/detail/repeater_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace phlex::experimental::detail {

using repeater_node_input = std::tuple<message, indexed_end_token, index_message>;

class phlex_core_EXPORT repeater_node :
class PHLEX_CORE_EXPORT repeater_node :
public tbb::flow::composite_node<repeater_node_input, message_tuple<1>> {
public:
repeater_node(tbb::flow::graph& g, std::string node_name, identifier layer_name);
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/edge_creation_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace phlex::experimental {
using product_suffix_t = identifier;

class phlex_core_EXPORT edge_creation_policy {
class PHLEX_CORE_EXPORT edge_creation_policy {
public:
template <typename... Args>
edge_creation_policy(Args&... producers);
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/edge_maker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace phlex::experimental {
index_router::provider_input_ports_t make_provider_edges(index_router::head_ports_t head_ports,
declared_providers& providers);

class phlex_core_EXPORT edge_maker {
class PHLEX_CORE_EXPORT edge_maker {
public:
template <typename... Args>
edge_maker(Args&... args);
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace phlex::experimental {
oneapi::tbb::flow::composite_node<std::tuple<message, predicate_result>,
std::tuple<oneapi::tbb::flow::continue_msg>>;

class phlex_core_EXPORT filter : public filter_base {
class PHLEX_CORE_EXPORT filter : public filter_base {
using indexer_t = oneapi::tbb::flow::indexer_node<message, predicate_result>;
using tag_t = indexer_t::output_type;

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/framework_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace phlex {
}

namespace phlex::experimental {
class phlex_core_EXPORT framework_graph {
class PHLEX_CORE_EXPORT framework_graph {
public:
explicit framework_graph(int max_parallelism = oneapi::tbb::info::default_concurrency());
explicit framework_graph(detail::next_index_t next_index,
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/glue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace phlex::experimental {
struct node_catalog;

namespace detail {
phlex_core_EXPORT void verify_name(std::string const& name, configuration const* config);
PHLEX_CORE_EXPORT void verify_name(std::string const& name, configuration const* config);
}

// ==============================================================================
Expand Down
6 changes: 3 additions & 3 deletions phlex/core/index_router.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace phlex::experimental {
// join operation. It:
// (a) routes index messages to either the matching layer or its data-layer parent, and
// (b) emits flush tokens to the repeater to evict a cached data product from memory.
class phlex_core_EXPORT multilayer_slot {
class PHLEX_CORE_EXPORT multilayer_slot {
public:
multilayer_slot(tbb::flow::graph& g,
identifier layer,
Expand All @@ -57,7 +57,7 @@ namespace phlex::experimental {
// A layer_scope object is an RAII object that manages layer-scoped operations during
// data-cell-index routing. It updates flush counters on construction and ensures cleanup
// (flushing end tokens and releasing fold results) on destruction.
class phlex_core_EXPORT layer_scope {
class PHLEX_CORE_EXPORT layer_scope {
public:
layer_scope(flush_counters& counters,
flusher_t& flusher,
Expand All @@ -76,7 +76,7 @@ namespace phlex::experimental {
};
}

class phlex_core_EXPORT index_router {
class PHLEX_CORE_EXPORT index_router {
public:
struct named_input_port {
product_query input_product;
Expand Down
6 changes: 3 additions & 3 deletions phlex/core/message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace phlex::experimental {
std::size_t id;
};

struct phlex_core_EXPORT message_matcher {
struct PHLEX_CORE_EXPORT message_matcher {
std::size_t operator()(message const& msg) const noexcept;
};

Expand All @@ -64,12 +64,12 @@ namespace phlex::experimental {
using named_index_ports = std::vector<named_index_port>;

// Overload for use with most_derived
phlex_core_EXPORT message const& more_derived(message const& a, message const& b);
PHLEX_CORE_EXPORT message const& more_derived(message const& a, message const& b);

// Non-template overload for single message case
inline message const& most_derived(message const& msg) { return msg; }

phlex_core_EXPORT std::size_t port_index_for(product_queries const& input_products,
PHLEX_CORE_EXPORT std::size_t port_index_for(product_queries const& input_products,
product_query const& input_product);
}

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/node_catalog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <vector>

namespace phlex::experimental {
struct phlex_core_EXPORT node_catalog {
struct PHLEX_CORE_EXPORT node_catalog {
template <typename Ptr>
auto registrar_for(std::vector<std::string>& errors)
{
Expand Down
4 changes: 2 additions & 2 deletions phlex/core/product_query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace phlex {
};
}

struct phlex_core_EXPORT product_query {
struct PHLEX_CORE_EXPORT product_query {
detail::required_creator_name<experimental::identifier> creator;
detail::required_layer_name<experimental::identifier> layer;
std::optional<experimental::identifier> suffix;
Expand Down Expand Up @@ -126,7 +126,7 @@ namespace phlex {

// This lives here rather than as a member-function of product_store because product_store is in model
// and product_query in core, with core depending on model.
phlex_core_EXPORT experimental::product_specification const* resolve_in_store(
PHLEX_CORE_EXPORT experimental::product_specification const* resolve_in_store(
product_query const& query, experimental::product_store const& store);
}

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/products_consumer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <vector>

namespace phlex::experimental {
class phlex_core_EXPORT products_consumer : public consumer {
class PHLEX_CORE_EXPORT products_consumer : public consumer {
public:
products_consumer(algorithm_name name,
std::vector<std::string> predicates,
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/registrar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
namespace phlex::experimental {

namespace detail {
phlex_core_EXPORT void add_to_error_messages(std::vector<std::string>& errors,
PHLEX_CORE_EXPORT void add_to_error_messages(std::vector<std::string>& errors,
std::string const& name);
}

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/registration_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ namespace phlex::experimental {
// ====================================================================================
// Output API

class phlex_core_EXPORT output_api {
class PHLEX_CORE_EXPORT output_api {
public:
output_api(registrar<declared_output_ptr> reg,
configuration const* config,
Expand Down
Loading
Loading