Skip to content

Commit

Permalink
Correct tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJaHa95 committed May 30, 2019
1 parent 75f2759 commit 39e53e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion AnnService/inc/IndexBuilder/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BuilderOptions : public Helper::ArgumentsParser

std::string m_vectorDelimiter;

bool m_append;
bool m_append;

SPTAG::VectorValueType m_inputValueType;

Expand Down
4 changes: 2 additions & 2 deletions AnnService/src/IndexBuilder/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ BuilderOptions::BuilderOptions()
AddRequiredOption(m_inputFiles, "-i", "--input", "Input raw data.");
AddRequiredOption(m_outputFolder, "-o", "--outputfolder", "Output folder.");
AddRequiredOption(m_indexAlgoType, "-a", "--algo", "Index Algorithm type.");
AddOptionalOption(m_builderConfigFile, "-c", "--config", "Config file for builder.");
AddOptionalOption(m_append, "-p", "--append", "Append to existing index.");
AddOptionalOption(m_builderConfigFile, "-c", "--config", "Config file for builder.");
AddOptionalOption(m_append, "-p", "--append", "Append to existing index.");
}


Expand Down
28 changes: 14 additions & 14 deletions AnnService/src/IndexBuilder/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ int main(int argc, char* argv[])
indexBuilder->SetParameter(iter.first.c_str(), iter.second.c_str());
}

std::shared_ptr<VectorSet> p_vectorSet = nullptr;
std::shared_ptr<MetadataSet> p_metaSet = nullptr;
std::shared_ptr<VectorSet> p_vectorSet = nullptr;
std::shared_ptr<MetadataSet> p_metaSet = nullptr;

if (options->m_inputFiles.find("BIN:") == 0) {
std::vector<std::string> files = SPTAG::Helper::StrUtils::SplitString(options->m_inputFiles.substr(4), ",");
Expand Down Expand Up @@ -88,20 +88,20 @@ int main(int argc, char* argv[])
exit(1);
}

p_vectorSet = vectorReader->GetVectorSet();
p_metaSet = vectorReader->GetMetadataSet();
p_vectorSet = vectorReader->GetVectorSet();
p_metaSet = vectorReader->GetMetadataSet();
}

ErrorCode code;
std::shared_ptr<SPTAG::VectorIndex> vecIndex;
if (options->m_append && ErrorCode::Success == indexBuilder->LoadIndex(options->m_outputFolder, vecIndex) && nullptr != vecIndex) {
code = vecIndex->AddIndex(p_vectorSet, p_metaSet);
indexBuilder = vecIndex;
}
else {
code = indexBuilder->BuildIndex(p_vectorSet, p_metaSet);
}
indexBuilder->SaveIndex(options->m_outputFolder);
ErrorCode code;
std::shared_ptr<SPTAG::VectorIndex> vecIndex;
if (options->m_append && ErrorCode::Success == indexBuilder->LoadIndex(options->m_outputFolder, vecIndex) && nullptr != vecIndex) {
code = vecIndex->AddIndex(p_vectorSet, p_metaSet);
indexBuilder = vecIndex;
}
else {
code = indexBuilder->BuildIndex(p_vectorSet, p_metaSet);
}
indexBuilder->SaveIndex(options->m_outputFolder);

if (ErrorCode::Success != code)
{
Expand Down

0 comments on commit 39e53e7

Please sign in to comment.