diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 521f1c3..c1ce21a 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -21,7 +21,7 @@ if(MSVC) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) -include(cmake/get_cpm.cmake) +# include(cmake/get_cpm.cmake) # ----------------------------------------------------------------------------- # Dependencies @@ -30,20 +30,20 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED) find_package(ManiVault COMPONENTS Core PointData CONFIG) -find_package(blake3 CONFIG REQUIRED) +# find_package(blake3 CONFIG REQUIRED) if(NOT APPLE) include(cmake/ci_fixes.cmake) find_package(faiss CONFIG REQUIRED) endif() -CPMAddPackage( - NAME highway - URL https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz - URL_HASH SHA256=7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343 - PATCHES "cmake/highway.patch" # see https://github.com/conan-io/conan-center-index/pull/24197/files, fixes https://github.com/google/highway/issues/2225 - OPTIONS "HWY_ENABLE_EXAMPLES OFF" "HWY_ENABLE_INSTALL OFF" "HWY_ENABLE_TESTS OFF" "HWY_ENABLE_CONTRIB ON" "BUILD_SHARED_LIBS ON" -) +# CPMAddPackage( + # NAME highway + # URL https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz + # URL_HASH SHA256=7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343 + # PATCHES "cmake/highway.patch" # see https://github.com/conan-io/conan-center-index/pull/24197/files, fixes https://github.com/google/highway/issues/2225 + # OPTIONS "HWY_ENABLE_EXAMPLES OFF" "HWY_ENABLE_INSTALL OFF" "HWY_ENABLE_TESTS OFF" "HWY_ENABLE_CONTRIB ON" "BUILD_SHARED_LIBS ON" +# ) # ----------------------------------------------------------------------------- # Source files @@ -93,8 +93,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::WebEngineWidgets) target_link_libraries(${PROJECT_NAME} PRIVATE ManiVault::Core) target_link_libraries(${PROJECT_NAME} PRIVATE ManiVault::PointData) -target_link_libraries(${PROJECT_NAME} PRIVATE BLAKE3::blake3) -target_link_libraries(${PROJECT_NAME} PRIVATE hwy hwy_contrib) +# target_link_libraries(${PROJECT_NAME} PRIVATE BLAKE3::blake3) +# target_link_libraries(${PROJECT_NAME} PRIVATE hwy hwy_contrib) if(NOT APPLE) target_link_libraries(${PROJECT_NAME} PRIVATE faiss) @@ -124,7 +124,8 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD ) # Automatically available when using find_package(ManiVault) -mv_install_dependencies(${PROJECT_NAME} "hwy" "hwy_contrib") +#mv_install_dependencies(${PROJECT_NAME} "hwy" "hwy_contrib") +mv_install_dependencies(${PROJECT_NAME}) # ----------------------------------------------------------------------------- # Miscellaneous diff --git a/ExampleDependencies/src/ExampleDependenciesPlugin.cpp b/ExampleDependencies/src/ExampleDependenciesPlugin.cpp index 1a8078e..8c8483a 100644 --- a/ExampleDependencies/src/ExampleDependenciesPlugin.cpp +++ b/ExampleDependencies/src/ExampleDependenciesPlugin.cpp @@ -9,10 +9,10 @@ #include #include -#include -#include - -#include +//#include +//#include +// +//#include #if !defined(__APPLE__) #include @@ -53,9 +53,9 @@ void ExampleDependenciesPlugin::init() void ExampleDependenciesPlugin::compute() { - std::cout << "ExampleDependenciesPlugin: Startin..." << std::endl; + std::cout << "ExampleDependenciesPlugin: Starting..." << std::endl; - std::cout << "ExampleDependenciesPlugin: Using blake version: " << blake3_version() << std::endl; + //std::cout << "ExampleDependenciesPlugin: Using blake version: " << blake3_version() << std::endl; auto printData = [](const std::vector& vec, size_t dims, size_t points) { for (size_t dim = 0; dim < dims; dim++) @@ -81,11 +81,11 @@ void ExampleDependenciesPlugin::compute() std::cout << "ExampleDependenciesPlugin: Data before sorting" << std::endl; printData(data, numDims, numPoints); - for (size_t dim = 0; dim < numDims; dim++) - { - size_t offset = numPoints * dim; - hwy::VQSort(data.data() + offset, numPoints, hwy::SortAscending{}); - } + //for (size_t dim = 0; dim < numDims; dim++) + //{ + // size_t offset = numPoints * dim; + // hwy::VQSort(data.data() + offset, numPoints, hwy::SortAscending{}); + //} std::cout << "ExampleDependenciesPlugin: Data after sorting" << std::endl; printData(data, numDims, numPoints); @@ -96,19 +96,19 @@ void ExampleDependenciesPlugin::compute() events().notifyDatasetDataChanged(outputPoints); // Create hash - blake3_hasher hasher; - blake3_hasher_init(&hasher); + //blake3_hasher hasher; + //blake3_hasher_init(&hasher); - blake3_hasher_update(&hasher, data.data(), data.size()); + //blake3_hasher_update(&hasher, data.data(), data.size()); - uint8_t output[BLAKE3_OUT_LEN]; - blake3_hasher_finalize(&hasher, output, BLAKE3_OUT_LEN); + //uint8_t output[BLAKE3_OUT_LEN]; + //blake3_hasher_finalize(&hasher, output, BLAKE3_OUT_LEN); // Print the hash as hexadecimal - for (size_t i = 0; i < BLAKE3_OUT_LEN; i++) { - printf("%02x", output[i]); - } - printf("\n"); + //for (size_t i = 0; i < BLAKE3_OUT_LEN; i++) { + // printf("%02x", output[i]); + //} + //printf("\n"); #if !defined(__APPLE__) // find knn