@@ -56,7 +56,7 @@ class implementation {
5656 /* *
5757 * The name of this implementation.
5858 *
59- * const implementation *impl = simdjson::active_implementation ;
59+ * const implementation *impl = simdjson::get_active_implementation() ;
6060 * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl;
6161 *
6262 * @return the name of the implementation, e.g. "haswell", "westmere", "arm64"
@@ -66,7 +66,7 @@ class implementation {
6666 /* *
6767 * The description of this implementation.
6868 *
69- * const implementation *impl = simdjson::active_implementation ;
69+ * const implementation *impl = simdjson::get_active_implementation() ;
7070 * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl;
7171 *
7272 * @return the name of the implementation, e.g. "haswell", "westmere", "arm64"
@@ -95,7 +95,7 @@ class implementation {
9595 /* *
9696 * @private For internal implementation use
9797 *
98- * const implementation *impl = simdjson::active_implementation ;
98+ * const implementation *impl = simdjson::get_active_implementation() ;
9999 * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl;
100100 *
101101 * @param capacity The largest document that will be passed to the parser.
@@ -189,10 +189,10 @@ class available_implementation_list {
189189 *
190190 * Case sensitive.
191191 *
192- * const implementation *impl = simdjson::available_implementations ["westmere"];
192+ * const implementation *impl = simdjson::get_available_implementations() ["westmere"];
193193 * if (!impl) { exit(1); }
194194 * if (!imp->supported_by_runtime_system()) { exit(1); }
195- * simdjson::active_implementation = impl;
195+ * simdjson::get_active_implementation() = impl;
196196 *
197197 * @param name the implementation to find, e.g. "westmere", "haswell", "arm64"
198198 * @return the implementation, or nullptr if the parse failed.
@@ -210,7 +210,7 @@ class available_implementation_list {
210210 * This is used to initialize the implementation on startup.
211211 *
212212 * const implementation *impl = simdjson::available_implementation::detect_best_supported();
213- * simdjson::active_implementation = impl;
213+ * simdjson::get_active_implementation() = impl;
214214 *
215215 * @return the most advanced supported implementation for the current host, or an
216216 * implementation that returns UNSUPPORTED_ARCHITECTURE if there is no supported
@@ -242,14 +242,14 @@ class atomic_ptr {
242242/* *
243243 * The list of available implementations compiled into simdjson.
244244 */
245- extern SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list available_implementations ;
245+ extern SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations () ;
246246
247247/* *
248248 * The active implementation.
249249 *
250250 * Automatically initialized on first use to the most advanced implementation supported by this hardware.
251251 */
252- extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation> active_implementation ;
252+ extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation>& get_active_implementation () ;
253253
254254} // namespace simdjson
255255
0 commit comments