aboutsummaryrefslogtreecommitdiff
path: root/C/MtCoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'C/MtCoder.h')
-rw-r--r--C/MtCoder.h7
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
22023-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