hikyuu 2.6.8.3__py3-none-manylinux2014_aarch64.whl → 2.7.3__py3-none-manylinux2014_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hikyuu/__init__.py +55 -23
- hikyuu/__init__.pyi +626 -595
- hikyuu/analysis/__init__.pyi +589 -563
- hikyuu/analysis/analysis.pyi +590 -564
- hikyuu/core.py +2 -0
- hikyuu/core.pyi +591 -565
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/core310.pyi +587 -130
- hikyuu/cpp/core310.so +0 -0
- hikyuu/cpp/core311.pyi +587 -130
- hikyuu/cpp/core311.so +0 -0
- hikyuu/cpp/core312.pyi +587 -130
- hikyuu/cpp/core312.so +0 -0
- hikyuu/cpp/core313.pyi +587 -130
- hikyuu/cpp/core313.so +0 -0
- hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
- hikyuu/cpp/i18n/zh_CN/hikyuu_plugin.mo +0 -0
- hikyuu/cpp/libboost_atomic.so +0 -0
- hikyuu/cpp/libboost_atomic.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_charconv.so +0 -0
- hikyuu/cpp/libboost_charconv.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_chrono.so +0 -0
- hikyuu/cpp/libboost_chrono.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_container.so +0 -0
- hikyuu/cpp/libboost_container.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_date_time.so +0 -0
- hikyuu/cpp/libboost_date_time.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_locale.so +0 -0
- hikyuu/cpp/libboost_locale.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_random.so +0 -0
- hikyuu/cpp/libboost_random.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_serialization.so +0 -0
- hikyuu/cpp/libboost_serialization.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_thread.so +0 -0
- hikyuu/cpp/libboost_thread.so.1.90.0 +0 -0
- hikyuu/cpp/libboost_wserialization.so +0 -0
- hikyuu/cpp/libboost_wserialization.so.1.90.0 +0 -0
- hikyuu/cpp/libhikyuu.so +0 -0
- hikyuu/cpp/libhku_hdf5.so +0 -0
- hikyuu/cpp/libhku_hdf5.so.200 +0 -0
- hikyuu/cpp/libhku_hdf5.so.200.2.0 +0 -0
- hikyuu/cpp/libhku_hdf5_cpp.so +0 -0
- hikyuu/cpp/libhku_hdf5_cpp.so.200 +0 -0
- hikyuu/cpp/libhku_hdf5_cpp.so.200.2.0 +0 -0
- hikyuu/cpp/libhku_hdf5_hl.so +0 -0
- hikyuu/cpp/libhku_hdf5_hl.so.200 +0 -0
- hikyuu/cpp/libhku_hdf5_hl.so.200.1.0 +0 -0
- hikyuu/cpp/libhku_hdf5_hl_cpp.so +0 -0
- hikyuu/cpp/libhku_hdf5_hl_cpp.so.200 +0 -0
- hikyuu/cpp/libhku_hdf5_hl_cpp.so.200.1.0 +0 -0
- hikyuu/cpp/libhku_hdf5_tools.so +0 -0
- hikyuu/cpp/libhku_hdf5_tools.so.200 +0 -0
- hikyuu/cpp/libhku_hdf5_tools.so.200.1.1 +0 -0
- hikyuu/cpp/libsqlite3.so +0 -0
- hikyuu/data/clickhouse_upgrade/0001.sql +2 -0
- hikyuu/data/clickhouse_upgrade/createdb.sql +105 -105
- hikyuu/data/common.py +3 -3
- hikyuu/data/common_clickhouse.py +1 -3
- hikyuu/data/download_block.py +351 -0
- hikyuu/data/em_block_to_clickhouse.py +26 -74
- hikyuu/data/em_block_to_mysql.py +25 -75
- hikyuu/data/em_block_to_sqlite.py +26 -78
- hikyuu/data/hku_config_template.py +33 -6
- hikyuu/data/mysql_upgrade/0029.sql +2 -0
- hikyuu/data/pytdx_to_clickhouse.py +96 -38
- hikyuu/data/pytdx_to_h5.py +78 -29
- hikyuu/data/pytdx_to_mysql.py +69 -21
- hikyuu/data/pytdx_weight_to_clickhouse.py +3 -1
- hikyuu/data/pytdx_weight_to_mysql.py +3 -1
- hikyuu/data/pytdx_weight_to_sqlite.py +3 -1
- hikyuu/data/sqlite_upgrade/0029.sql +4 -0
- hikyuu/data/tdx_to_clickhouse.py +2 -2
- hikyuu/data/tdx_to_h5.py +11 -11
- hikyuu/data/tdx_to_mysql.py +2 -2
- hikyuu/data/zh_bond10_to_clickhouse.py +1 -1
- hikyuu/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/__init__.pyi +8 -8
- hikyuu/draw/drawplot/bokeh_draw.pyi +610 -583
- hikyuu/draw/drawplot/common.pyi +1 -1
- hikyuu/draw/drawplot/echarts_draw.pyi +612 -585
- hikyuu/draw/drawplot/matplotlib_draw.py +12 -76
- hikyuu/draw/drawplot/matplotlib_draw.pyi +623 -596
- hikyuu/draw/elder.pyi +11 -11
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/examples/notebook/Demo/Demo1.ipynb +48 -33
- hikyuu/extend.py +0 -7
- hikyuu/extend.pyi +599 -573
- hikyuu/fetcher/stock/zh_block_em.py +12 -40
- hikyuu/gui/HikyuuTDX.py +140 -33
- hikyuu/gui/data/CollectSpotThread.py +1 -1
- hikyuu/gui/data/EscapetimeThread.py +8 -14
- hikyuu/gui/data/ImportBlockInfoTask.py +3 -10
- hikyuu/gui/data/MainWindow.py +1300 -761
- hikyuu/gui/data/SchedImportThread.py +2 -2
- hikyuu/gui/data/UsePytdxImportToH5Thread.py +3 -3
- hikyuu/gui/data/UseQmtImportToH5Thread.py +2 -2
- hikyuu/gui/data/UseTdxImportToH5Thread.py +3 -3
- hikyuu/gui/data/tool.py +32 -25
- hikyuu/gui/dataserver.py +5 -3
- hikyuu/gui/images/liandongxiaopu.png +0 -0
- hikyuu/gui/importdata.py +4 -0
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/DataType.h +4 -16
- hikyuu/include/hikyuu/KData.h +6 -3
- hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +1 -1
- hikyuu/include/hikyuu/KDataSharedBufferImp.h +1 -1
- hikyuu/include/hikyuu/KQuery.h +2 -2
- hikyuu/include/hikyuu/Stock.h +4 -1
- hikyuu/include/hikyuu/StockManager.h +29 -4
- hikyuu/include/hikyuu/StrategyContext.h +4 -4
- hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +9 -0
- hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +6 -0
- hikyuu/include/hikyuu/data_driver/KDataDriver.h +24 -1
- hikyuu/include/hikyuu/data_driver/base_info/mysql/MySQLBaseInfoDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/base_info/sqlite/SQLiteBaseInfoDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/block_info/mysql/MySQLBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/block_info/qianlong/QLBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/block_info/sqlite/SQLiteBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/kdata/DoNothingKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/cvs/KDataTempCsvDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/hdf5/H5KDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +6 -2
- hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +2 -2
- hikyuu/include/hikyuu/data_driver/kdata/tdx/TdxKDataDriver.h +1 -1
- hikyuu/include/hikyuu/global/sysinfo.h +24 -5
- hikyuu/include/hikyuu/hikyuu.h +1 -1
- hikyuu/include/hikyuu/indicator/IndicatorImp.h +1 -1
- hikyuu/include/hikyuu/indicator/build_in.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/CYCLE.h +4 -4
- hikyuu/include/hikyuu/indicator/crt/HSL.h +2 -2
- hikyuu/include/hikyuu/indicator/crt/QUANTILE_TRUNC.h +30 -0
- hikyuu/include/hikyuu/indicator/crt/TURNOVER.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/ZSCORE.h +2 -2
- hikyuu/include/hikyuu/indicator/imp/IQuantileTrunc.h +25 -0
- hikyuu/include/hikyuu/lang.h +15 -2
- hikyuu/include/hikyuu/misc.h +38 -0
- hikyuu/include/hikyuu/plugin/KDataToClickHouseImporter.h +40 -0
- hikyuu/include/hikyuu/plugin/KDataToMySQLImporter.h +40 -0
- hikyuu/include/hikyuu/plugin/checkdata.h +20 -0
- hikyuu/include/hikyuu/plugin/dataserver.h +2 -1
- hikyuu/include/hikyuu/plugin/device.h +10 -0
- hikyuu/include/hikyuu/plugin/extind.h +40 -0
- hikyuu/include/hikyuu/plugin/hkuextra.h +1 -17
- hikyuu/include/hikyuu/plugin/interface/CheckDataPluginInterface.h +25 -0
- hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -2
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +2 -0
- hikyuu/include/hikyuu/plugin/interface/ExtendIndicatorsPluginInterface.h +12 -0
- hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +1 -13
- hikyuu/include/hikyuu/plugin/interface/ImportKDataToClickHousePluginInterface.h +44 -0
- hikyuu/include/hikyuu/plugin/interface/ImportKDataToMySQLPluginInterface.h +42 -0
- hikyuu/include/hikyuu/plugin/interface/plugins.h +9 -1
- hikyuu/include/hikyuu/python/convert_any.h +9 -6
- hikyuu/include/hikyuu/python/pybind_utils.h +4 -11
- hikyuu/include/hikyuu/strategy/RunSystemInStrategy.h +3 -0
- hikyuu/include/hikyuu/strategy/Strategy.h +1 -1
- hikyuu/include/hikyuu/trade_manage/Performance.h +4 -4
- hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +10 -2
- hikyuu/include/hikyuu/trade_manage/TradeRecord.h +2 -1
- hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +0 -1
- hikyuu/include/hikyuu/trade_sys/allocatefunds/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_FixedAmount.h +26 -0
- hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/FixAmountFunds.h +18 -0
- hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +0 -1
- hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +0 -1
- hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +0 -1
- hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalFundsMM.h +0 -4
- hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +36 -4
- hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +124 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +124 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/build_in.h +3 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/buildin_norm.h +36 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/buildin_scfilter.h +51 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/GroupSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreLessOrEqualValueSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreNanSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/MinAmountPercentSCFilter.h +25 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/PriceSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/TopNSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/EqualWeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICIRMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/WeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormMinMax.h +23 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantile.h +28 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantileUniform.h +28 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormZScore.h +25 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/__init__.py +1 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/quantile_trunc.h +16 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +20 -13
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/SimplePortfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/WithoutAFPortfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +9 -11
- hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +49 -1
- hikyuu/include/hikyuu/trade_sys/selector/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor2.h +40 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +0 -3
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector2.h +49 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorSelector.h +1 -1
- hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorValueSelector.h +1 -1
- hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +0 -1
- hikyuu/include/hikyuu/trade_sys/signal/imp/BandSignal2.h +0 -4
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +1 -1
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +4 -4
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +0 -1
- hikyuu/include/hikyuu/trade_sys/slippage/build_in.h +5 -1
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_LogNormal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Normal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_TruncNormal.h +25 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Uniform.h +23 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/LogNormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/NormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/TruncNormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/UniformSlippage.h +24 -0
- hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +0 -1
- hikyuu/include/hikyuu/trade_sys/system/System.h +15 -3
- hikyuu/include/hikyuu/utilities/Log.h +6 -7
- hikyuu/include/hikyuu/utilities/Parameter.h +17 -0
- hikyuu/include/hikyuu/utilities/SpendTimer.h +17 -7
- hikyuu/include/hikyuu/utilities/arithmetic.h +55 -0
- hikyuu/include/hikyuu/utilities/config.h +28 -0
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLStatement.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteConnect.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteStatement.h +1 -1
- hikyuu/include/hikyuu/utilities/plugin/PluginBase.h +17 -2
- hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +4 -1
- hikyuu/include/hikyuu/utilities/plugin/PluginManager.h +41 -22
- hikyuu/include/hikyuu/utilities/thread/GlobalStealThreadPool.h +1 -2
- hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +1 -1
- hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +286 -0
- hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -0
- hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +297 -0
- hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +1 -0
- hikyuu/include/hikyuu/utilities/thread/WorkStealQueue.h +9 -8
- hikyuu/include/hikyuu/utilities/thread/algorithm.h +64 -14
- hikyuu/include/hikyuu/version.h +5 -5
- hikyuu/plugin/libbacktest.so +0 -0
- hikyuu/plugin/libcheckdata.so +0 -0
- hikyuu/plugin/libclickhousedriver.so +0 -0
- hikyuu/plugin/libdataserver.so +0 -0
- hikyuu/{cpp/core39.so → plugin/libdataserver_parquet.so} +0 -0
- hikyuu/plugin/libdevice.so +0 -0
- hikyuu/plugin/libextind.so +0 -0
- hikyuu/plugin/libhkuextra.so +0 -0
- hikyuu/plugin/libimport2ch.so +0 -0
- hikyuu/plugin/libimport2hdf5.so +0 -0
- hikyuu/plugin/libimport2mysql.so +0 -0
- hikyuu/plugin/libtmreport.so +0 -0
- hikyuu/trade_manage/__init__.pyi +607 -582
- hikyuu/trade_manage/broker.pyi +3 -3
- hikyuu/trade_manage/broker_easytrader.pyi +1 -1
- hikyuu/trade_manage/trade.py +0 -2
- hikyuu/trade_manage/trade.pyi +607 -582
- hikyuu/trade_sys/trade_sys.py +54 -5
- hikyuu/util/__init__.pyi +2 -2
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.8.3.dist-info → hikyuu-2.7.3.dist-info}/METADATA +42 -32
- {hikyuu-2.6.8.3.dist-info → hikyuu-2.7.3.dist-info}/RECORD +267 -212
- {hikyuu-2.6.8.3.dist-info → hikyuu-2.7.3.dist-info}/top_level.txt +2 -2
- hikyuu/cpp/core39.pyi +0 -14190
- hikyuu/data/pytdx_to_taos.py +0 -736
- hikyuu/data_driver/__init__.py +0 -49
- hikyuu/data_driver/jqdata_data_driver.py +0 -277
- hikyuu/data_driver/pytdx_data_driver.py +0 -292
- hikyuu/fetcher/stock/zh_stock_a_huatai.py +0 -51
- hikyuu/fetcher/stock/zh_stock_a_pytdx.py +0 -129
- hikyuu/gui/data/CollectToMemThread.py +0 -123
- hikyuu/gui/data/CollectToMySQLThread.py +0 -178
- hikyuu/gui/start_huatai_insight.py +0 -510
- hikyuu/include/hikyuu/views/arrow_common.h +0 -38
- hikyuu/include/hikyuu/views/arrow_views.h +0 -117
- hikyuu/tools/update_block_info.py +0 -168
- /hikyuu/include/hikyuu/{views → trade_sys/multifactor/filter}/__init__.py +0 -0
- {hikyuu-2.6.8.3.dist-info → hikyuu-2.7.3.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.8.3.dist-info → hikyuu-2.7.3.dist-info}/entry_points.txt +0 -0
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
#include <vector>
|
|
13
13
|
#include "ThreadPool.h"
|
|
14
14
|
#include "MQThreadPool.h"
|
|
15
|
+
#include "StealThreadPool.h"
|
|
16
|
+
#include "MQStealThreadPool.h"
|
|
15
17
|
|
|
16
18
|
//----------------------------------------------------------------
|
|
17
19
|
// Note: 除 ThreadPool/MQThreadPool 外,其他线程池由于使用
|
|
@@ -23,15 +25,17 @@ namespace hku {
|
|
|
23
25
|
|
|
24
26
|
typedef std::pair<size_t, size_t> range_t;
|
|
25
27
|
|
|
26
|
-
inline std::vector<range_t> parallelIndexRange(size_t start, size_t end) {
|
|
28
|
+
inline std::vector<range_t> parallelIndexRange(size_t start, size_t end, size_t cpu_num = 0) {
|
|
27
29
|
std::vector<std::pair<size_t, size_t>> ret;
|
|
28
30
|
if (start >= end) {
|
|
29
31
|
return ret;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
size_t total = end - start;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
if (cpu_num == 0) {
|
|
36
|
+
cpu_num = std::thread::hardware_concurrency();
|
|
37
|
+
}
|
|
38
|
+
if (cpu_num <= 1) {
|
|
35
39
|
ret.emplace_back(start, end);
|
|
36
40
|
return ret;
|
|
37
41
|
}
|
|
@@ -52,9 +56,13 @@ inline std::vector<range_t> parallelIndexRange(size_t start, size_t end) {
|
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
template <typename FunctionType, class TaskGroup = MQThreadPool>
|
|
55
|
-
void parallel_for_index_void(size_t start, size_t end, FunctionType f) {
|
|
56
|
-
auto ranges = parallelIndexRange(start, end);
|
|
57
|
-
|
|
59
|
+
void parallel_for_index_void(size_t start, size_t end, FunctionType f, int cpu_num = 0) {
|
|
60
|
+
auto ranges = parallelIndexRange(start, end, cpu_num);
|
|
61
|
+
if (ranges.empty()) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
TaskGroup tg(cpu_num == 0 ? std::thread::hardware_concurrency() : cpu_num);
|
|
58
66
|
for (size_t i = 0, total = ranges.size(); i < total; i++) {
|
|
59
67
|
tg.submit([=, range = ranges[i]]() {
|
|
60
68
|
for (size_t ix = range.first; ix < range.second; ix++) {
|
|
@@ -67,9 +75,14 @@ void parallel_for_index_void(size_t start, size_t end, FunctionType f) {
|
|
|
67
75
|
}
|
|
68
76
|
|
|
69
77
|
template <typename FunctionType, class TaskGroup = MQThreadPool>
|
|
70
|
-
auto parallel_for_index(size_t start, size_t end, FunctionType f) {
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
auto parallel_for_index(size_t start, size_t end, FunctionType f, size_t cpu_num = 0) {
|
|
79
|
+
std::vector<typename std::invoke_result<FunctionType, size_t>::type> ret;
|
|
80
|
+
auto ranges = parallelIndexRange(start, end, cpu_num);
|
|
81
|
+
if (ranges.empty()) {
|
|
82
|
+
return ret;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
TaskGroup tg(cpu_num == 0 ? std::thread::hardware_concurrency() : cpu_num);
|
|
73
86
|
std::vector<std::future<std::vector<typename std::invoke_result<FunctionType, size_t>::type>>>
|
|
74
87
|
tasks;
|
|
75
88
|
for (size_t i = 0, total = ranges.size(); i < total; i++) {
|
|
@@ -82,7 +95,6 @@ auto parallel_for_index(size_t start, size_t end, FunctionType f) {
|
|
|
82
95
|
}));
|
|
83
96
|
}
|
|
84
97
|
|
|
85
|
-
std::vector<typename std::invoke_result<FunctionType, size_t>::type> ret;
|
|
86
98
|
for (auto& task : tasks) {
|
|
87
99
|
auto one = task.get();
|
|
88
100
|
for (auto&& value : one) {
|
|
@@ -94,15 +106,19 @@ auto parallel_for_index(size_t start, size_t end, FunctionType f) {
|
|
|
94
106
|
}
|
|
95
107
|
|
|
96
108
|
template <typename FunctionType, class TaskGroup = MQThreadPool>
|
|
97
|
-
auto parallel_for_range(size_t start, size_t end, FunctionType f) {
|
|
98
|
-
|
|
99
|
-
|
|
109
|
+
auto parallel_for_range(size_t start, size_t end, FunctionType f, size_t cpu_num = 0) {
|
|
110
|
+
typename std::invoke_result<FunctionType, range_t>::type ret;
|
|
111
|
+
auto ranges = parallelIndexRange(start, end, cpu_num);
|
|
112
|
+
if (ranges.empty()) {
|
|
113
|
+
return ret;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
TaskGroup tg(cpu_num == 0 ? std::thread::hardware_concurrency() : cpu_num);
|
|
100
117
|
std::vector<std::future<typename std::invoke_result<FunctionType, range_t>::type>> tasks;
|
|
101
118
|
for (size_t i = 0, total = ranges.size(); i < total; i++) {
|
|
102
119
|
tasks.emplace_back(tg.submit([func = f, range = ranges[i]]() { return func(range); }));
|
|
103
120
|
}
|
|
104
121
|
|
|
105
|
-
typename std::invoke_result<FunctionType, range_t>::type ret;
|
|
106
122
|
for (auto& task : tasks) {
|
|
107
123
|
auto one = task.get();
|
|
108
124
|
for (auto&& value : one) {
|
|
@@ -113,4 +129,38 @@ auto parallel_for_range(size_t start, size_t end, FunctionType f) {
|
|
|
113
129
|
return ret;
|
|
114
130
|
}
|
|
115
131
|
|
|
132
|
+
template <typename FunctionType, class TaskGroup = ThreadPool>
|
|
133
|
+
void parallel_for_index_void_single(size_t start, size_t end, FunctionType f, int cpu_num = 0) {
|
|
134
|
+
if (start >= end) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
TaskGroup tg(cpu_num == 0 ? std::thread::hardware_concurrency() : cpu_num);
|
|
139
|
+
for (size_t i = start; i < end; i++) {
|
|
140
|
+
tg.submit([func = f, i]() { func(i); });
|
|
141
|
+
}
|
|
142
|
+
tg.join();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
template <typename FunctionType, class TaskGroup = ThreadPool>
|
|
147
|
+
auto parallel_for_index_single(size_t start, size_t end, FunctionType f, size_t cpu_num = 0) {
|
|
148
|
+
std::vector<typename std::invoke_result<FunctionType, size_t>::type> ret;
|
|
149
|
+
if (start >= end) {
|
|
150
|
+
return ret;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
TaskGroup tg(cpu_num == 0 ? std::thread::hardware_concurrency() : cpu_num);
|
|
154
|
+
std::vector<std::future<typename std::invoke_result<FunctionType, size_t>::type>> tasks;
|
|
155
|
+
for (size_t i = start; i < end; i++) {
|
|
156
|
+
tasks.emplace_back(tg.submit([func = f, i]() { return func(i); }));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
for (auto& task : tasks) {
|
|
160
|
+
ret.push_back(std::move(task.get()));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return ret;
|
|
164
|
+
}
|
|
165
|
+
|
|
116
166
|
} // namespace hku
|
hikyuu/include/hikyuu/version.h
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
#define HKU_VERSION_H
|
|
13
13
|
|
|
14
14
|
// clang-format off
|
|
15
|
-
#define HKU_VERSION "2.
|
|
15
|
+
#define HKU_VERSION "2.7.3"
|
|
16
16
|
#define HKU_VERSION_MAJOR 2
|
|
17
|
-
#define HKU_VERSION_MINOR
|
|
18
|
-
#define HKU_VERSION_ALTER
|
|
19
|
-
#define HKU_VERSION_BUILD
|
|
17
|
+
#define HKU_VERSION_MINOR 7
|
|
18
|
+
#define HKU_VERSION_ALTER 3
|
|
19
|
+
#define HKU_VERSION_BUILD 202601060312
|
|
20
20
|
#define HKU_VERSION_MODE "RELEASE"
|
|
21
|
-
#define HKU_VERSION_GIT "2.
|
|
21
|
+
#define HKU_VERSION_GIT "2.7.3 release.9c144edf (RELEASE)"
|
|
22
22
|
// clang-format on
|
|
23
23
|
|
|
24
24
|
#endif /* HKU_VERSION_H */
|
hikyuu/plugin/libbacktest.so
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
hikyuu/plugin/libdataserver.so
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/plugin/libdevice.so
CHANGED
|
Binary file
|
hikyuu/plugin/libextind.so
CHANGED
|
Binary file
|
hikyuu/plugin/libhkuextra.so
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/plugin/libimport2hdf5.so
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/plugin/libtmreport.so
CHANGED
|
Binary file
|