Turi Create  4.0
capi_initialization_internal.hpp
1 /* Copyright © 2018 Apple Inc. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-3-clause license that can
4  * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5  */
6 #ifndef TURI_CAPI_INITIALIZATION_INTERNAL
7 #define TURI_CAPI_INITIALIZATION_INTERNAL
8 
9 namespace turi {
10 void _tc_initialize();
11 
12 extern bool capi_server_initialized;
13 
14 static inline void ensure_server_initialized() {
15  if (!capi_server_initialized) {
16  _tc_initialize();
17  }
18 }
19 
20 } // namespace turi
21 #endif