Skip to content

Commit

Permalink
misspelled word: muti-thread rename to multi-thread
Browse files Browse the repository at this point in the history
  • Loading branch information
housisong committed Jan 3, 2024
1 parent 1ad2ce1 commit e1e9bf1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ full changelog at: https://github.com/sisong/HDiffPatch/commits

## [v4.5.2](https://github.com/sisong/HDiffPatch/tree/v4.5.2) - 2022-12-25
### Fixed
* fix a bug when run dir_diff by muti-thread parallel;
* fix a bug when run dir_diff by multi-thread parallel;

## [v4.5.0](https://github.com/sisong/HDiffPatch/tree/v4.5.0) - 2022-11-23
### Added
Expand All @@ -41,7 +41,7 @@ full changelog at: https://github.com/sisong/HDiffPatch/commits

## [v4.4.0](https://github.com/sisong/HDiffPatch/tree/v4.4.0) - 2022-10-09
### Changed
* optimize diff -m & -s speed by muti-thread parallel, requires C++11.
* optimize diff -m & -s speed by multi-thread parallel, requires C++11.

## [v4.3.0](https://github.com/sisong/HDiffPatch/tree/v4.3.0) - 2022-09-23
### Changed
Expand Down
2 changes: 1 addition & 1 deletion dirDiffPatch/dir_diff/dir_diff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ void dir_diff(IDirDiffListener* listener,const TManifest& oldManifest,
_pushv(out_diff);
}
}else{
const bool newAndOldDataIsMTSameRes=true; // NOTE: now resLimit not muti-thread safe
const bool newAndOldDataIsMTSameRes=true; // NOTE: now resLimit not multi-thread safe
const hdiff_TMTSets_s mtsets={hdiffSets.threadNum,hdiffSets.threadNumSearch_s,false,false,
newAndOldDataIsMTSameRes};
TOffsetStreamOutput ofStream(outDiffStream,writeToPos);
Expand Down
4 changes: 2 additions & 2 deletions libHDiffPatch/HDiff/diff_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ extern "C"
void (*search_cover_finish)(ICoverLinesListener* listener,void* pcovers,size_t* pcoverCount,bool isCover32,
hpatch_StreamPos_t* newSize,hpatch_StreamPos_t* oldSize);
int (*get_max_match_deep)(const ICoverLinesListener* listener); //if null, default kDefaultMaxMatchDeepForLimit
// *search_block* for muti-thread parallel match,can null
// *search_block* for multi-thread parallel match,can null
void (*begin_search_block)(ICoverLinesListener* listener,hpatch_StreamPos_t newSize,
size_t searchBlockSize,size_t kPartPepeatSize);
hpatch_BOOL (*next_search_block_MT)(ICoverLinesListener* listener,hdiff_TRange* out_newRange);//must thread safe
};

struct hdiff_TMTSets_s{ // used by $hdiff -s
size_t threadNum;
size_t threadNumForSearch; // NOTE: muti-thread search need frequent random disk read
size_t threadNumForSearch; // NOTE: multi-thread search need frequent random disk read
bool newDataIsMTSafe;
bool oldDataIsMTSafe;
bool newAndOldDataIsMTSameRes; //for dir diff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ void TDigestMatcher::search_cover(hpatch_TOutputCovers* out_covers){
mt_data_t mt_data;
mt_data.workCount=(uint_work)workCount;
if ((sizeof(mt_data.workCount)<sizeof(workCount))&&(mt_data.workCount!=workCount))
throw std::runtime_error("TDigestMatcher::search_cover() muti-thread workCount error!");
throw std::runtime_error("TDigestMatcher::search_cover() multi-thread workCount error!");
mt_data.workIndex=0;
const size_t threadCount=threadNum-1;
std::vector<std::thread> threads(threadCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TDigestMatcher{
void _search_cover(const hpatch_TStreamInput* newData,hpatch_StreamPos_t newOffset,
hpatch_TOutputCovers* out_covers,unsigned char* pmem,
void* dataLocker=0,void* newDataLocker=0);
public: //private for muti-thread
public: //private for multi-thread
void _search_cover_thread(hpatch_TOutputCovers* out_covers,unsigned char* pmem,void* mt_data);
};

Expand Down
2 changes: 1 addition & 1 deletion libHDiffPatch/HPatch/patch_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ typedef hpatch_BOOL hpatch_FileError_t;// 0: no error; other: error;
//output covers
typedef struct hpatch_TOutputCovers{
hpatch_BOOL (*push_cover)(struct hpatch_TOutputCovers* out_covers,const hpatch_TCover* cover);
void (*collate_covers)(struct hpatch_TOutputCovers* out_covers); // for support search covers by muti-thread
void (*collate_covers)(struct hpatch_TOutputCovers* out_covers); // for support search covers by multi-thread
} hpatch_TOutputCovers;

typedef struct{
Expand Down
2 changes: 1 addition & 1 deletion libhsync/sync_client/match_in_old.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace sync_private{
static const int kMatchHitOutLimit =16; //limit match deep
static const size_t kBestReadSize =1024*256; //for sequence read
#if (_IS_USED_MULTITHREAD)
static const size_t kBestMTClipSize=1*1024*1024; //for muti-thread read once
static const size_t kBestMTClipSize=1*1024*1024; //for multi-thread read once
struct _TMatchDatas;
namespace{
struct TMt:public TMtByChannel{
Expand Down

0 comments on commit e1e9bf1

Please sign in to comment.