-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
175 changed files
with
2,764 additions
and
1,359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: pre-cleanup/cylinder_surface2", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/pre-cleanup-src/analysis/cylinder_surface2.py", | ||
"console": "integratedTerminal", | ||
"args": ["770c_pag"], | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: Test geometry", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/test/test_geometry.py", | ||
"console": "integratedTerminal", | ||
"args": [], | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: 0400_h5tobin", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/processing_steps/0400_h5tobin.py", | ||
"console": "integratedTerminal", | ||
"args": ["770c_pag"], | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: 0500_rescale_cupy_bin", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/processing_steps/0500_rescale_cupy_bin.py", | ||
"console": "integratedTerminal", | ||
"args": ["770c_pag"], | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: 0700_implant_FoR", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/processing_steps/0700_implant_FoR.py", | ||
"console": "integratedTerminal", | ||
"args": ["770c_pag"], | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: 0800_implant_data", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/processing_steps/0800_implant_data.py", | ||
"console": "integratedTerminal", | ||
"args": ["770c_pag"], | ||
"justMyCode": false | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CXX=icpc | ||
CXXFLAGS += -std=c++17 | ||
CXXFLAGS += $(shell pkg-config --cflags fmt) | ||
CXXFLAGS += $(shell pkg-config --cflags hdf5) | ||
LIBS += $(shell pkg-config --libs fmt) | ||
LIBS += $(shell pkg-config --libs hdf5) | ||
|
||
%.o: %.cc | ||
$(CXX) $(CXXFLAGS) -c $< | ||
|
||
h5-blockmap: h5-blockmap.o | ||
echo $(LIBS) | ||
$(CXX) $(CXXFLAGS) $< $(LIBS) -o $@ | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
threadripper00/paths.py |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
0100 - Haven't checked. Requires ERDA to be set up properly. | ||
0200 - Verified! | ||
0300 - Verified! | ||
0400 - Verified! | ||
0500 - Verified! | ||
0600 - Verified! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,65 @@ | ||
CXX=icpc | ||
CXXFLAGS += -std=c++17 | ||
CXXFLAGS += $(shell pkg-config --cflags fmt) | ||
CXXFLAGS += $(shell pkg-config --cflags hdf5) | ||
LIBS += $(shell pkg-config --libs fmt) | ||
LIBS += $(shell pkg-config --libs hdf5) | ||
# Define constants and collections | ||
PYTHON = python3.10 | ||
PYBIND_FLAGS = $(shell $(PYTHON) -m pybind11 --include) | ||
CXXFLAGS += $(subst -I,-isystem ,$(PYBIND_FLAGS)) # We don't care about warnings from the python headers | ||
PYBIND_SUFFIX = $(shell $(PYTHON)-config --extension-suffix) | ||
|
||
%.o: %.cc | ||
$(CXX) $(CXXFLAGS) -c $< | ||
# Detect OS for OS specific changes | ||
ifeq ($(shell uname -s), Darwin) # Mac OSX | ||
CXX = g++-12 # Use homebrew gcc, as system gcc is an alias for clang | ||
CXXFLAGS += -undefined dynamic_lookup # https://pybind11.readthedocs.io/en/stable/compiling.html#building-manually | ||
CLEANUP += $(TARGETS) $(foreach TARGET, $(TARGETS), $(TARGET).dSYM) # These are also generated on Mac | ||
endif | ||
|
||
h5-blockmap: h5-blockmap.o | ||
echo $(LIBS) | ||
$(CXX) $(CXXFLAGS) $< $(LIBS) -o $@ | ||
CPP_FOLDER=lib/cpp | ||
#CXXFLAGS += -I../contrib/cpptqdm/ -Iinclude | ||
CXXFLAGS += -I$(CPP_FOLDER)/include -march=native -Wall -Wextra -Wfloat-equal -Wundef -Wshadow -Wuninitialized -Winit-self -shared -fPIC -g -std=c++17 -O3 | ||
PLATFORMS=cpu_seq cpu | ||
cpu_seq_CXX=$(CXX) | ||
cpu_seq_FLAGS=-Wno-unknown-pragmas -Wno-comment -Wconversion #-Weffc++ | ||
cpu_CXX=$(cpu_seq_CXX) | ||
cpu_FLAGS=$(cpu_seq_FLAGS) -fopenmp | ||
|
||
LIBS=io geometry morphology | ||
TARGETS = $(foreach PLATFORM, $(PLATFORMS), $(foreach LIB, $(LIBS), $(CPP_FOLDER)/$(PLATFORM)/$(LIB)$(PYBIND_SUFFIX))) | ||
CLEANUP = $(TARGETS) $(foreach PLATFORM, $(PLATFORMS), $(CPP_FOLDER)/$(PLATFORM)/__pycache__) | ||
|
||
# Detect if OpenACC can be used | ||
ifneq (, $(shell which nvc++)) | ||
PLATFORMS += gpu | ||
gpu_CXX = nvc++ | ||
gpu_FLAGS = -acc=gpu -tp=native #-Minfo=accel | ||
gpu_FLAGS += -Xcudafe --display_error_number # Getting the warning codes for later suppression | ||
gpu_FLAGS += --diag_suppress 1626 # Remove the annoying pybind warning that routine is both inline and noinline | ||
gpu_FLAGS += --diag_suppress 9 # Remove the warning about nested comments | ||
gpu_FLAGS += -Wnvlink,-w # Disable nvlink warnings | ||
else | ||
$(info OpenACC compiler nvc++ not found. Compiling without.) | ||
endif | ||
|
||
all: $(TARGETS) pip_install | ||
|
||
define GEN_RULE | ||
$(CPP_FOLDER)/$(PLATFORM)/$(LIB)$(PYBIND_SUFFIX): pybind/$(LIB)-pybind.cc $(CPP_FOLDER)/$(PLATFORM)/$(LIB).cc $(CPP_FOLDER)/include/*.hh | ||
$($(PLATFORM)_CXX) $($(PLATFORM)_FLAGS) $(CXXFLAGS) -I$(CPP_FOLDER)/$(PLATFORM) $$< -o $(CPP_FOLDER)/$(PLATFORM)/$(LIB)$(PYBIND_SUFFIX) | ||
endef | ||
|
||
$(foreach PLATFORM, $(PLATFORMS), \ | ||
$(foreach LIB, $(LIBS), \ | ||
$(eval $(GEN_RULE)) \ | ||
) \ | ||
) | ||
|
||
# TODO lightweight openacc profiling can be done with the environment variable NV_ACC_TIME=1 !!! | ||
|
||
pip_install: | ||
$(PYTHON) -m pip install -r requirements.txt | ||
|
||
test: all | ||
$(PYTHON) -m pytest -n auto test | ||
|
||
test_%: test/test_%.py all | ||
$(PYTHON) -m pytest -n auto $< | ||
|
||
clean: | ||
rm -rf $(CLEANUP) __pycache__ test/__pycache__ .pytest_cache lib/cpp/**/*.so |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
data_root = "/data" | ||
fast_root = "/data_fast" | ||
|
||
hdf5_root = f"{data_root}/MAXIBONE/Goats/tomograms" | ||
hdf5_root_fast = f"{fast_root}/MAXIBONE/Goats/tomograms" | ||
binary_root = f"{hdf5_root}/binary" | ||
binary_root_fast = f"{hdf5_root_fast}/binary" | ||
|
||
esrf_data_local = f"{hdf5_root}/ESRF/" | ||
esrf_data_sftp = "/XNS/XrayImaging/MiG/manjula.esci.nbi.dk.2_localhost/" | ||
esrf_implants_root = f"{esrf_data_local}/esrf_dental_implants_april_2013/" | ||
esrf_granules_root = f"{esrf_data_local}/esrf_dental_granules_july_2012/" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include<iostream> | ||
#include<stdint.h> | ||
|
||
int main() { | ||
/* | ||
This class is used to print out the code of the type. | ||
This is handy when debugging the templated type at runtime. | ||
*/ | ||
|
||
std::cout << "int8 " << typeid(int8_t).name() << std::endl; | ||
std::cout << "int16 " << typeid(int16_t).name() << std::endl; | ||
std::cout << "int32 " << typeid(int32_t).name() << std::endl; | ||
std::cout << "int64 " << typeid(int64_t).name() << std::endl; | ||
std::cout << "int128 " << typeid(__int128_t).name() << std::endl; | ||
|
||
std::cout << "uint8 " << typeid(uint8_t).name() << std::endl; | ||
std::cout << "uint16 " << typeid(uint16_t).name() << std::endl; | ||
std::cout << "uint32 " << typeid(uint32_t).name() << std::endl; | ||
std::cout << "uint64 " << typeid(uint64_t).name() << std::endl; | ||
std::cout << "uint128 " << typeid(__uint128_t).name() << std::endl; | ||
|
||
std::cout << "float " << typeid(float).name() << std::endl; | ||
std::cout << "double " << typeid(double).name() << std::endl; | ||
} |
Oops, something went wrong.