Skip to content

Commit

Permalink
change SpaceV to SPTAG
Browse files Browse the repository at this point in the history
  • Loading branch information
cheqi committed Oct 9, 2018
1 parent b91de8e commit 5c81f37
Show file tree
Hide file tree
Showing 97 changed files with 386 additions and 388 deletions.
4 changes: 2 additions & 2 deletions AnnService/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ foreach(F ${PROJ_HDR_FILES})
install(FILES "${F}" DESTINATION ${FS})
endforeach(F)

add_library (SpaceVLib SHARED ${SRC_FILES} ${HDR_FILES})
add_library (SPTAGLib SHARED ${SRC_FILES} ${HDR_FILES})

install(TARGETS SpaceVLib
install(TARGETS SPTAGLib
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT library
Expand Down
8 changes: 4 additions & 4 deletions AnnService/inc/Aggregator/AggregatorContext.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _SPACEV_AGGREGATOR_AGGREGATORCONTEXT_H_
#define _SPACEV_AGGREGATOR_AGGREGATORCONTEXT_H_
#ifndef _SPTAG_AGGREGATOR_AGGREGATORCONTEXT_H_
#define _SPTAG_AGGREGATOR_AGGREGATORCONTEXT_H_

#include "inc/Socket/Common.h"
#include "AggregatorSettings.h"
Expand All @@ -8,7 +8,7 @@
#include <vector>
#include <atomic>

namespace SpaceV
namespace SPTAG
{
namespace Aggregator
{
Expand Down Expand Up @@ -61,4 +61,4 @@ class AggregatorContext
} // namespace AnnService


#endif // _SPACEV_AGGREGATOR_AGGREGATORCONTEXT_H_
#endif // _SPTAG_AGGREGATOR_AGGREGATORCONTEXT_H_
8 changes: 4 additions & 4 deletions AnnService/inc/Aggregator/AggregatorExecutionContext.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef _SPACEV_AGGREGATOR_AGGREGATOREXECUTIONCONTEXT_H_
#define _SPACEV_AGGREGATOR_AGGREGATOREXECUTIONCONTEXT_H_
#ifndef _SPTAG_AGGREGATOR_AGGREGATOREXECUTIONCONTEXT_H_
#define _SPTAG_AGGREGATOR_AGGREGATOREXECUTIONCONTEXT_H_

#include "inc/Socket/RemoteSearchQuery.h"
#include "inc/Socket/Packet.h"

#include <memory>
#include <atomic>

namespace SpaceV
namespace SPTAG
{
namespace Aggregator
{
Expand Down Expand Up @@ -46,5 +46,5 @@ class AggregatorExecutionContext
} // namespace AnnService


#endif // _SPACEV_AGGREGATOR_AGGREGATOREXECUTIONCONTEXT_H_
#endif // _SPTAG_AGGREGATOR_AGGREGATOREXECUTIONCONTEXT_H_

8 changes: 4 additions & 4 deletions AnnService/inc/Aggregator/AggregatorService.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _SPACEV_AGGREGATOR_AGGREGATORSERVICE_H_
#define _SPACEV_AGGREGATOR_AGGREGATORSERVICE_H_
#ifndef _SPTAG_AGGREGATOR_AGGREGATORSERVICE_H_
#define _SPTAG_AGGREGATOR_AGGREGATORSERVICE_H_

#include "AggregatorContext.h"
#include "AggregatorExecutionContext.h"
Expand All @@ -14,7 +14,7 @@
#include <thread>
#include <condition_variable>

namespace SpaceV
namespace SPTAG
{
namespace Aggregator
{
Expand Down Expand Up @@ -82,4 +82,4 @@ class AggregatorService
} // namespace AnnService


#endif // _SPACEV_AGGREGATOR_AGGREGATORSERVICE_H_
#endif // _SPTAG_AGGREGATOR_AGGREGATORSERVICE_H_
8 changes: 4 additions & 4 deletions AnnService/inc/Aggregator/AggregatorSettings.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ifndef _SPACEV_AGGREGATOR_AGGREGATORSETTINGS_H_
#define _SPACEV_AGGREGATOR_AGGREGATORSETTINGS_H_
#ifndef _SPTAG_AGGREGATOR_AGGREGATORSETTINGS_H_
#define _SPTAG_AGGREGATOR_AGGREGATORSETTINGS_H_

#include "../Core/Common.h"

#include <string>

namespace SpaceV
namespace SPTAG
{
namespace Aggregator
{
Expand All @@ -32,5 +32,5 @@ struct AggregatorSettings
} // namespace AnnService


#endif // _SPACEV_AGGREGATOR_AGGREGATORSETTINGS_H_
#endif // _SPTAG_AGGREGATOR_AGGREGATORSETTINGS_H_

10 changes: 5 additions & 5 deletions AnnService/inc/Client/ClientWrapper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _SPACEV_CLIENT_CLIENTWRAPPER_H_
#define _SPACEV_CLIENT_CLIENTWRAPPER_H_
#ifndef _SPTAG_CLIENT_CLIENTWRAPPER_H_
#define _SPTAG_CLIENT_CLIENTWRAPPER_H_

#include "inc/Socket/Client.h"
#include "inc/Socket/RemoteSearchQuery.h"
Expand All @@ -15,7 +15,7 @@
#include <condition_variable>
#include <functional>

namespace SpaceV
namespace SPTAG
{
namespace Client
{
Expand Down Expand Up @@ -72,6 +72,6 @@ class ClientWrapper


} // namespace Socket
} // namespace SpaceV
} // namespace SPTAG

#endif // _SPACEV_CLIENT_OPTIONS_H_
#endif // _SPTAG_CLIENT_OPTIONS_H_
10 changes: 5 additions & 5 deletions AnnService/inc/Client/Options.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef _SPACEV_CLIENT_OPTIONS_H_
#define _SPACEV_CLIENT_OPTIONS_H_
#ifndef _SPTAG_CLIENT_OPTIONS_H_
#define _SPTAG_CLIENT_OPTIONS_H_

#include "inc/Helper/ArgumentsParser.h"

#include <string>
#include <vector>
#include <memory>

namespace SpaceV
namespace SPTAG
{
namespace Client
{
Expand All @@ -34,6 +34,6 @@ class ClientOptions : public Helper::ArgumentsParser


} // namespace Socket
} // namespace SpaceV
} // namespace SPTAG

#endif // _SPACEV_CLIENT_OPTIONS_H_
#endif // _SPTAG_CLIENT_OPTIONS_H_
8 changes: 4 additions & 4 deletions AnnService/inc/Core/BKT/CommonUtils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _SPACEV_BKT_COMMONUTILS_H_
#define _SPACEV_BKT_COMMONUTILS_H_
#ifndef _SPTAG_BKT_COMMONUTILS_H_
#define _SPTAG_BKT_COMMONUTILS_H_

#include "../Common.h"

Expand Down Expand Up @@ -30,7 +30,7 @@
#define strtok_s(a, b, c) strtok_r(a, b, c)
#endif

namespace SpaceV
namespace SPTAG
{
namespace BKT
{
Expand Down Expand Up @@ -152,4 +152,4 @@ namespace SpaceV
}
}

#endif // _SPACEV_BKT_COMMONUTILS_H_
#endif // _SPTAG_BKT_COMMONUTILS_H_
8 changes: 4 additions & 4 deletions AnnService/inc/Core/BKT/DataUtils.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef _SPACEV_BKT_DATAUTILS_H_
#define _SPACEV_BKT_DATAUTILS_H_
#ifndef _SPTAG_BKT_DATAUTILS_H_
#define _SPTAG_BKT_DATAUTILS_H_

#include <sys/stat.h>
#include <atomic>
#include "CommonUtils.h"
#include "../../Helper/CommonHelper.h"

namespace SpaceV
namespace SPTAG
{
namespace BKT
{
Expand Down Expand Up @@ -186,4 +186,4 @@ namespace SpaceV
}
}

#endif // _SPACEV_BKT_DATAUTILS_H_
#endif // _SPTAG_BKT_DATAUTILS_H_
8 changes: 4 additions & 4 deletions AnnService/inc/Core/BKT/Dataset.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _SPACEV_BKT_DATASET_H_
#define _SPACEV_BKT_DATASET_H_
#ifndef _SPTAG_BKT_DATASET_H_
#define _SPTAG_BKT_DATASET_H_

#include <fstream>

Expand All @@ -8,7 +8,7 @@
#define aligned_malloc(a, b) _mm_malloc(a, b)
#define aligned_free(a) _mm_free(a)

namespace SpaceV
namespace SPTAG
{
namespace BKT
{
Expand Down Expand Up @@ -205,4 +205,4 @@ namespace SpaceV
}
}

#endif // _SPACEV_BKT_DATASET_H_
#endif // _SPTAG_BKT_DATASET_H_
18 changes: 9 additions & 9 deletions AnnService/inc/Core/BKT/DistanceUtils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _SPACEV_BKT_DISTANCEUTILS_H_
#define _SPACEV_BKT_DISTANCEUTILS_H_
#ifndef _SPTAG_BKT_DISTANCEUTILS_H_
#define _SPTAG_BKT_DISTANCEUTILS_H_

#include <immintrin.h>
#include "CommonUtils.h"
Expand All @@ -16,7 +16,7 @@
#define DIFF256 diff256.m256_f32
#endif

namespace SpaceV
namespace SPTAG
{
namespace BKT
{
Expand Down Expand Up @@ -456,9 +456,9 @@ namespace SpaceV
}

template<typename T>
static inline float ComputeDistance(const T *p1, const T *p2, int length, SpaceV::DistCalcMethod distCalcMethod)
static inline float ComputeDistance(const T *p1, const T *p2, int length, SPTAG::DistCalcMethod distCalcMethod)
{
if (distCalcMethod == SpaceV::DistCalcMethod::L2)
if (distCalcMethod == SPTAG::DistCalcMethod::L2)
return ComputeL2Distance(p1, p2, length);

return ComputeCosineDistance(p1, p2, length);
Expand All @@ -480,14 +480,14 @@ namespace SpaceV


template<typename T>
float (*DistanceCalcSelector(SpaceV::DistCalcMethod p_method)) (const T*, const T*, int)
float (*DistanceCalcSelector(SPTAG::DistCalcMethod p_method)) (const T*, const T*, int)
{
switch (p_method)
{
case SpaceV::DistCalcMethod::Cosine:
case SPTAG::DistCalcMethod::Cosine:
return &(DistanceUtils::ComputeCosineDistance);

case SpaceV::DistCalcMethod::L2:
case SPTAG::DistCalcMethod::L2:
return &(DistanceUtils::ComputeL2Distance);

default:
Expand All @@ -499,4 +499,4 @@ namespace SpaceV
}
}

#endif // _SPACEV_BKT_DISTANCEUTILS_H_
#endif // _SPTAG_BKT_DISTANCEUTILS_H_
8 changes: 4 additions & 4 deletions AnnService/inc/Core/BKT/Heap.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _SPACEV_BKT_HEAP_H_
#define _SPACEV_BKT_HEAP_H_
#ifndef _SPTAG_BKT_HEAP_H_
#define _SPTAG_BKT_HEAP_H_

namespace SpaceV
namespace SPTAG
{
namespace BKT
{
Expand Down Expand Up @@ -99,4 +99,4 @@ namespace SpaceV
}
}

#endif // _SPACEV_BKT_HEAP_H_
#endif // _SPTAG_BKT_HEAP_H_
10 changes: 5 additions & 5 deletions AnnService/inc/Core/BKT/Index.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _SPACEV_BKT_INDEX_H_
#define _SPACEV_BKT_INDEX_H_
#ifndef _SPTAG_BKT_INDEX_H_
#define _SPTAG_BKT_INDEX_H_

#include "../SearchQuery.h"
#include "../VectorIndex.h"
Expand All @@ -18,7 +18,7 @@
#include <mutex>
#include <stack>

namespace SpaceV
namespace SPTAG
{

namespace Helper
Expand Down Expand Up @@ -347,6 +347,6 @@ namespace BKT
}
};
} // namespace BKT
} // namespace SpaceV
} // namespace SPTAG

#endif // _SPACEV_BKT_INDEX_H_
#endif // _SPTAG_BKT_INDEX_H_
2 changes: 1 addition & 1 deletion AnnService/inc/Core/BKT/ParameterDefinitionList.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DefineBKTParameter(g_iThresholdOfNumberOfContinuousNoBetterPropagation, int, 3L,
DefineBKTParameter(g_iNumberOfInitialDynamicPivots, int, 50L, "NumberOfInitialDynamicPivots")
DefineBKTParameter(g_iNumberOfOtherDynamicPivots, int, 4L, "NumberOfOtherDynamicPivots")

DefineBKTParameter(m_iDistCalcMethod, SpaceV::DistCalcMethod, SpaceV::DistCalcMethod::Cosine, "DistCalcMethod")
DefineBKTParameter(m_iDistCalcMethod, SPTAG::DistCalcMethod, SPTAG::DistCalcMethod::Cosine, "DistCalcMethod")
DefineBKTParameter(m_iRefineIter, int, 0L, "RefineIterations")
DefineBKTParameter(m_iDebugLoad, int, -1, "NumTrains")
DefineBKTParameter(m_iCacheSize, int, -1, "CacheSize")
Expand Down
8 changes: 4 additions & 4 deletions AnnService/inc/Core/BKT/QueryResultSet.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef _SPACEV_BKT_QUERYRESULTSET_H_
#define _SPACEV_BKT_QUERYRESULTSET_H_
#ifndef _SPTAG_BKT_QUERYRESULTSET_H_
#define _SPTAG_BKT_QUERYRESULTSET_H_

#include "../SearchQuery.h"

namespace SpaceV
namespace SPTAG
{
namespace BKT
{
Expand Down Expand Up @@ -90,4 +90,4 @@ class QueryResultSet : public QueryResult
}
}

#endif // _SPACEV_BKT_QUERYRESULTSET_H_
#endif // _SPTAG_BKT_QUERYRESULTSET_H_
8 changes: 4 additions & 4 deletions AnnService/inc/Core/BKT/WorkSpace.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef _SPACEV_BKT_WORKSPACE_H_
#define _SPACEV_BKT_WORKSPACE_H_
#ifndef _SPTAG_BKT_WORKSPACE_H_
#define _SPTAG_BKT_WORKSPACE_H_

#include "CommonUtils.h"
#include "Heap.h"

namespace SpaceV
namespace SPTAG
{
namespace BKT
{
Expand Down Expand Up @@ -219,4 +219,4 @@ namespace SpaceV
}
}

#endif // _SPACEV_BKT_WORKSPACE_H_
#endif // _SPTAG_BKT_WORKSPACE_H_
8 changes: 4 additions & 4 deletions AnnService/inc/Core/BKT/WorkSpacePool.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef _SPACEV_BKT_WORKSPACEPOOL_H_
#define _SPACEV_BKT_WORKSPACEPOOL_H_
#ifndef _SPTAG_BKT_WORKSPACEPOOL_H_
#define _SPTAG_BKT_WORKSPACEPOOL_H_

#include "WorkSpace.h"

#include <list>
#include <mutex>
#include <memory>

namespace SpaceV
namespace SPTAG
{
namespace BKT
{
Expand Down Expand Up @@ -38,4 +38,4 @@ class WorkSpacePool
}
}

#endif // _SPACEV_BKT_WORKSPACEPOOL_H_
#endif // _SPTAG_BKT_WORKSPACEPOOL_H_
Loading

0 comments on commit 5c81f37

Please sign in to comment.