diff options
| author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2025-07-05 00:00:00 +0000 |
|---|---|---|
| committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2025-07-05 19:27:33 +0500 |
| commit | 395149956d696e6e3099d8b76d797437f94a6942 (patch) | |
| tree | 6ed5013a637078ae2dfdc4acf1ad93bf29cea356 /C/MtCoder.h | |
| parent | e5431fa6f5505e385c6f9367260717e9c47dc2ee (diff) | |
| download | 7zip-25.00.tar.gz 7zip-25.00.tar.bz2 7zip-25.00.zip | |
25.0025.00
Diffstat (limited to 'C/MtCoder.h')
| -rw-r--r-- | C/MtCoder.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/C/MtCoder.h b/C/MtCoder.h index 1231d3c..8166cca 100644 --- a/C/MtCoder.h +++ b/C/MtCoder.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* MtCoder.h -- Multi-thread Coder | 1 | /* MtCoder.h -- Multi-thread Coder |
| 2 | 2023-04-13 : Igor Pavlov : Public domain */ | 2 | : Igor Pavlov : Public domain */ |
| 3 | 3 | ||
| 4 | #ifndef ZIP7_INC_MT_CODER_H | 4 | #ifndef ZIP7_INC_MT_CODER_H |
| 5 | #define ZIP7_INC_MT_CODER_H | 5 | #define ZIP7_INC_MT_CODER_H |
| @@ -16,7 +16,7 @@ EXTERN_C_BEGIN | |||
| 16 | 16 | ||
| 17 | #ifndef Z7_ST | 17 | #ifndef Z7_ST |
| 18 | #define MTCODER_GET_NUM_BLOCKS_FROM_THREADS(numThreads) ((numThreads) + (numThreads) / 8 + 1) | 18 | #define MTCODER_GET_NUM_BLOCKS_FROM_THREADS(numThreads) ((numThreads) + (numThreads) / 8 + 1) |
| 19 | #define MTCODER_THREADS_MAX 64 | 19 | #define MTCODER_THREADS_MAX 256 |
| 20 | #define MTCODER_BLOCKS_MAX (MTCODER_GET_NUM_BLOCKS_FROM_THREADS(MTCODER_THREADS_MAX) + 3) | 20 | #define MTCODER_BLOCKS_MAX (MTCODER_GET_NUM_BLOCKS_FROM_THREADS(MTCODER_THREADS_MAX) + 3) |
| 21 | #else | 21 | #else |
| 22 | #define MTCODER_THREADS_MAX 1 | 22 | #define MTCODER_THREADS_MAX 1 |
| @@ -77,6 +77,7 @@ typedef struct CMtCoder_ | |||
| 77 | 77 | ||
| 78 | size_t blockSize; /* size of input block */ | 78 | size_t blockSize; /* size of input block */ |
| 79 | unsigned numThreadsMax; | 79 | unsigned numThreadsMax; |
| 80 | unsigned numThreadGroups; | ||
| 80 | UInt64 expectedDataSize; | 81 | UInt64 expectedDataSize; |
| 81 | 82 | ||
| 82 | ISeqInStreamPtr inStream; | 83 | ISeqInStreamPtr inStream; |
| @@ -125,6 +126,8 @@ typedef struct CMtCoder_ | |||
| 125 | CMtProgress mtProgress; | 126 | CMtProgress mtProgress; |
| 126 | CMtCoderBlock blocks[MTCODER_BLOCKS_MAX]; | 127 | CMtCoderBlock blocks[MTCODER_BLOCKS_MAX]; |
| 127 | CMtCoderThread threads[MTCODER_THREADS_MAX]; | 128 | CMtCoderThread threads[MTCODER_THREADS_MAX]; |
| 129 | |||
| 130 | CThreadNextGroup nextGroup; | ||
| 128 | } CMtCoder; | 131 | } CMtCoder; |
| 129 | 132 | ||
| 130 | 133 | ||
