Skip to content

Commit

Permalink
Now it compiles!
Browse files Browse the repository at this point in the history
  • Loading branch information
imorlxs committed Sep 16, 2024
1 parent 3f71ebf commit f6d897c
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 6 deletions.
13 changes: 11 additions & 2 deletions cmake/BioDynaMo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,24 @@ function(build_shared_library TARGET)
set(DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_dict")
set(BDM_DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_bdm_dict.cc")
set(module "${TARGET}")
string(REPLACE "${CMAKE_SOURCE_DIR}/src/" "" ROOT_HEADERS "${ARG_HEADERS}")

if (runtime_cxxmodules)
set(MODULEMAP "--moduleMapFile=${CMAKE_SOURCE_DIR}/src/module.modulemap")
endif()

if (NOT ${TARGET} STREQUAL "biodynamo")
#set(DEPENDENCY_OPTION "-m ${CMAKE_CURRENT_BINARY_DIR}/lib/biodynamo.pcm")
#set(NO_MODULE "NO_CXXMODULE")
#set(MODULEMAP)
endif()

# Since the location of the CMake files differ in the build and installation
# directory, we check if BDM_CMAKE_DIR is already set (in build directory
# case). Otherwise, set it to the installation directory
if(NOT DEFINED BDM_CMAKE_DIR)
set(BDM_CMAKE_DIR $ENV{BDMSYS}/share/cmake)
endif()
ROOT_GENERATE_DICTIONARY(${DICT_FILE} ${ROOT_HEADERS} MODULE ${module} LINKDEF ${BDM_CMAKE_DIR}/${ARG_SELECTION} REFLEX OPTIONS -I src --noIncludePaths --inlineInputHeader --moduleMapFile=${CMAKE_SOURCE_DIR}/src/module.modulemap)
ROOT_GENERATE_DICTIONARY(${DICT_FILE} ${ARG_HEADERS} MODULE ${module} LINKDEF ${BDM_CMAKE_DIR}/${ARG_SELECTION} REFLEX ${NO_MODULE} OPTIONS ${DEPENDENCY_OPTION} -I src --inlineInputHeader --noIncludePaths ${MODULEMAP})
if (BDM_OUT_OF_SOURCE)
set(BDM_DICT_BIN_PATH "$ENV{BDMSYS}/bin")
else()
Expand Down
2 changes: 1 addition & 1 deletion cmake/RootMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
# Install the C++ module if we generated one.
if (cpp_module_file)
install(FILES ${cpp_module_file}
DESTINATION ${shared_lib_install_dir} COMPONENT libraries)
DESTINATION ${CMAKE_BINARY_DIR}/lib COMPONENT libraries)
endif()

if(ARG_STAGE1)
Expand Down
1 change: 1 addition & 0 deletions cmake/selection-libbiodynamo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
<class name="bdm::neuroscience::SplitNeuriteElementEvent" />
<class name="bdm::neuroscience::NeuriteElement::MechanicalForcesFunctor" />
<class name="bdm::Spinlock" />
<class name="bdm::SharedData<std::vector<bdm::AgentUid>>" />
<class name="bdm::SharedData<uint64_t>" />
<class name="bdm::SharedData<bdm::MathArray<double,3>>" />
<class name="bdm::SharedData<bdm::MathArray<double,4>>" />
Expand Down
44 changes: 41 additions & 3 deletions cmake/selection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,51 @@
<class pattern="std::vector<bdm::*>" />
</selection>
<exclusion>
<class pattern="vector<bdm::OptimizationParamType*>" />
<class pattern="*bdm::OptimizationParamType*"/>
<class pattern="*bdm::OptimizationParam*"/>
<class pattern="bdm::OpenCLState*"/>
<class name="bdm::ParallelResizeVector<pair<unsigned int,const bdm::UniformGridEnvironment::Box*> >" />
<class name="bdm::OptimizationParam" />
<class name="bdm::OptimizationParamType"/>
<class name="bdm::FixedSizeVector<pair<unsigned int,const bdm::UniformGridEnvironment::Box*> >" />
<class name="bdm::FixedSizeVector<const bdm::UniformGridEnvironment::Box*, 27>" />
<class pattern="bdm::UniformGridEnvironment::*" />
<class pattern="bdm::AgentFlatIdxMap*" />
<class pattern="bdm::AgentVector*" />
<class pattern="bdm::NanoFlannAdapter*" />
<class pattern="bdm::MortonOrder*" />
<class pattern="bdm::AgentContainer*" />
<class pattern="bdm::Exporter*" />
<class pattern="bdm::BasicExporter*" />
<class pattern="bdm::MatlabExporter*" />
<class pattern="bdm::NeuroMLExporter*" />
<class pattern="bdm::ParaviewExporter*" />
<class pattern="bdm::GpuHelper*" />
<class pattern="bdm::MechanicalForcesOpCudaKernel*" />
<class pattern="bdm::experimental::Algorithm*" />
<class name="bdm::SumReduction<unsigned long>" />
<class pattern="bdm::experimental::AlgorithmRegistry*" />
<class pattern="bdm::experimental::Database*" />
<class pattern="bdm::experimental::MultiSimulation*" />
<class pattern="bdm::experimental::MultiSimulationManager*" />
<class pattern="bdm::experimental::Worker*" />
<class name="bdm::VisualizationAdaptor" />
<class pattern="bdm::ContinuumOp*" />
<class pattern="bdm::LoadBalancingOp*" />
<class pattern="bdm::MechanicalForcesOpCuda*" />
<class pattern="bdm::MechanicalForcesOpOpenCL*" />
<class pattern="bdm::VisualizationOp*" />
<class name="bdm::CSVReader" />
<class name="bdm::JitForEachDataMemberFunctor" />
<class name="bdm::JitHeaders" />
<class name="bdm::VTuneTask" />
<class name="vector<bdm::experimental::Status>" />
<class pattern="*vector<bdm::AgentPointer<bdm::neuroscience::NeuriteElement>>*" />
<class pattern="*bdm::AgentPointer<bdm::neuroscience::NeuriteElement>*" />
<class name="bdm::SetParam"/>
<class name="bdm::ParticleSwarmParam"/>
<class name="bdm::LogRangeParam"/>
<class name="bdm::RangeParam"/>
<class name="vector<bdm::UniformGridEnvironment::GridNeighborMutexBuilder::MutexWrapper>" />
<class name="bdm::experimental::MPIObject" />
<class name="bdm::OperationImpl" />
<class pattern="cl::*" />
Expand Down Expand Up @@ -86,7 +123,7 @@
<class name="bdm::InlineVector<bdm::Behavior*, 2>" noStreamer="true" />
<class name="bdm::InlineVector<bdm::Behavior*, 3>" noStreamer="true" />
<class name="bdm::VectorTypeWrapper<bdm::Behavior*>" />
<class name="bdm::experimental::TimeSeries" />
<class pattern="*bdm::experimental::TimeSeries*" />
<class name="bdm::experimental::DataTransformer" />
<class name="bdm::experimental::LinearTransformer" />
<class name="bdm::experimental::TimeSeries::Data" />
Expand Down Expand Up @@ -184,6 +221,7 @@
<class name="bdm::neuroscience::SideNeuriteExtensionEvent" />
<class name="bdm::neuroscience::SplitNeuriteElementEvent" />
<class name="bdm::neuroscience::NeuriteElement::MechanicalForcesFunctor" />
<class name="bdm::SharedData<std::vector<bdm::AgentUid>>" />
<class name="bdm::SharedData<uint64_t>" />
<class name="bdm::SharedData<bdm::MathArray<double,3>>" />
<class name="bdm::SharedData<bdm::MathArray<double,4>>" />
Expand Down
5 changes: 5 additions & 0 deletions demo/soma_clustering/src/validation_criterion.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
#include <vector>
#include "biodynamo.h"
#include "my_cell.h"
#include "core/real_t.h"
#include "core/agent/agent.h"
#include "core/simulation.h"
#include "core/container/math_array.h"
#include "core/resource_manager.h"

namespace bdm {
namespace soma_clustering {
Expand Down
1 change: 1 addition & 0 deletions src/core/environment/uniform_grid_environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ class UniformGridEnvironment : public Environment {
uint64_t start, uint64_t end,
Functor<void, Iterator<AgentHandle>*>& f) const override;

private:
UniformGridEnvironment* grid_;
MortonOrder mo_;
ParallelResizeVector<Box*> sorted_boxes_;
Expand Down
1 change: 1 addition & 0 deletions src/core/gpu/mechanical_forces_op_cuda_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <math.h>
#include <stdint.h>
#include "core/real_t.h"
#include "stdio.h"

#ifdef USE_CUDA
Expand Down
1 change: 1 addition & 0 deletions src/core/operation/load_balancing_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define CORE_OPERATION_LOAD_BALANCING_OP_H_

#include "core/operation/operation.h"
#include "core/operation/operation_registry.h"
#include "core/resource_manager.h"
#include "core/simulation.h"

Expand Down
1 change: 1 addition & 0 deletions src/core/util/partition.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#ifndef CORE_UTIL_PARTITION_H_
#define CORE_UTIL_PARTITION_H_

#include <bits/stdint-uintn.h>
#include <cmath>

namespace bdm {
Expand Down
2 changes: 2 additions & 0 deletions test/unit/core/count_neighbor_functor.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
#define COUNT_NEIGHBOR_FUNCTOR_H_

#include "core/agent/agent.h"
#include "core/agent/cell.h"
#include "core/functor.h"
#include "core/resource_manager.h"
#include "core/simulation.h"
#include "gtest/gtest.h"

Expand Down

0 comments on commit f6d897c

Please sign in to comment.