From 54666b25be58489e47cc34eb3b77466e529b0cc7 Mon Sep 17 00:00:00 2001 From: Jan Kuhlmann <33833587+M2-TE@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:26:17 +0100 Subject: [PATCH 1/3] sync --- include/dag/morton.hpp | 3 ++- src/dag.cpp | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/dag/morton.hpp b/include/dag/morton.hpp index eec7469..efd9a48 100644 --- a/include/dag/morton.hpp +++ b/include/dag/morton.hpp @@ -228,7 +228,8 @@ auto MortonCode::normals(std::vector>& morton_c } } - // figoure out index + + // figure out index std::size_t normal_idx = point_it - morton_codes.cbegin(); // use these filtered nearest points to approximate the normal diff --git a/src/dag.cpp b/src/dag.cpp index 2e0250b..11635d1 100644 --- a/src/dag.cpp +++ b/src/dag.cpp @@ -14,8 +14,8 @@ auto insert_octree( std::vector& points, std::vector& normals, std::array& node_levels, - LeafLevel& leaf_level) -> uint32_t -{ + LeafLevel& leaf_level) +-> uint32_t { auto beg = std::chrono::steady_clock::now(); // trackers that will be updated during traversal @@ -352,7 +352,6 @@ DAG::DAG(): _node_levels_p(new std::array()), _leaf_level_p // write root child mask to always contain all 8 children (*_node_levels_p)[0]._raw_data[1] = 0xff; } -// void DAG::insert(std::vector& points, glm::vec3 position, glm::quat rotation) { void DAG::insert(std::array* points_p, std::size_t points_count, std::array position_data, std::array rotation_data) { auto beg = std::chrono::high_resolution_clock::now(); // convert anonymous inputs to named inputs @@ -411,7 +410,7 @@ void DAG::print_stats() { fmt::println("total hashing memory: {:.6f} MiB", total_hashing); fmt::println("total combined memory: {:.6f} MiB", total_vector + total_hashing); } -double DAG::get_readonly_size() { +auto DAG::get_readonly_size() -> double { double total_vector = 0.0; for (std::size_t i = 0; i < _node_levels_p->size(); i++) { double mem_vector = (double)((*_node_levels_p)[i]._raw_data.size() * sizeof(uint32_t)) / 1024.0 / 1024.0; From f42a1d52b1510c6852a0ac2130c69531b2a2c664 Mon Sep 17 00:00:00 2001 From: Jan Kuhlmann <33833587+M2-TE@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:29:09 +0100 Subject: [PATCH 2/3] reenable vulkan deps --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d029e4e..addd92f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ if (NOT DEFINED CHAD_LEAF_BITS) endif() # create executable/library -file(GLOB CPP_SOURCE_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") +file(GLOB_RECURSE CPP_SOURCE_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") if (CHAD_TOP_LEVEL) add_executable(${PROJECT_NAME} ${CPP_SOURCE_FILES}) target_compile_definitions(${PROJECT_NAME} PRIVATE CHAD_MAIN) @@ -66,6 +66,6 @@ include(glm) include(fmt) include(phmap) include(morton) -# include(vulkan) -# include(vma) -# include(shaders) \ No newline at end of file +include(vulkan) +include(vma) +include(shaders) \ No newline at end of file From 0e21a5ac12b0d486f43ef0fdbbeacc4ff6ff4cb2 Mon Sep 17 00:00:00 2001 From: Jan Kuhlmann <33833587+M2-TE@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:38:19 +0100 Subject: [PATCH 3/3] temporarily removed vulkan deps --- CMakeLists.txt | 9 +++++---- src/main.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index addd92f..b5347f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,8 +35,9 @@ if (NOT DEFINED CHAD_LEAF_BITS) endif() # create executable/library -file(GLOB_RECURSE CPP_SOURCE_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") +file(GLOB_RECURSE CPP_SOURCE_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/dag/*.cpp") if (CHAD_TOP_LEVEL) + set(CPP_SOURCE_FILES ${CPP_SOURCE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp") add_executable(${PROJECT_NAME} ${CPP_SOURCE_FILES}) target_compile_definitions(${PROJECT_NAME} PRIVATE CHAD_MAIN) set_target_properties(${PROJECT_NAME} PROPERTIES @@ -66,6 +67,6 @@ include(glm) include(fmt) include(phmap) include(morton) -include(vulkan) -include(vma) -include(shaders) \ No newline at end of file +# include(vulkan) +# include(vma) +# include(shaders) \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 9b19213..0cbb2a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,11 +8,11 @@ #include "dag/dag.hpp" // // DEBUG // #include -#include -#include -VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE -#define VMA_IMPLEMENTATION -#include +// #include +// #include +// VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE +// #define VMA_IMPLEMENTATION +// #include void static read_pcl_file() { std::ifstream file; @@ -72,7 +72,7 @@ void static do_sphere_thing() { // dag.merge_all_subtrees(); } int main() { - init_vk(); + // init_vk(); exit(0); if (false) read_pcl_file(); else do_sphere_thing();