Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
project(
ViennaRay
LANGUAGES CXX
VERSION 4.3.1)
VERSION 4.4.0)

# --------------------------------------------------------------------------------------------------------
# Library switches
Expand All @@ -14,6 +14,7 @@ option(EMBREE_RAY_MASK "Enable Embree Ray Masking" OFF)
option(VIENNARAY_USE_GPU "Enable GPU support" OFF)
option(VIENNARAY_USE_WDIST "Enable weighted distribution of ray weights" OFF)
option(VIENNARAY_GPU_DOUBLE_PRECISION "Use double precision on GPU" ON)
option(VIENNARAY_BENCHMARK "Enable GPU trace-count tracking for benchmarking" OFF)

option(VIENNARAY_BUILD_EXAMPLES "Build examples" OFF)
option(VIENNARAY_BUILD_TESTS "Build tests" OFF)
Expand Down Expand Up @@ -72,6 +73,11 @@ if(VIENNARAY_GPU_DOUBLE_PRECISION)
target_compile_definitions(${PROJECT_NAME} INTERFACE VIENNARAY_GPU_DOUBLE_PRECISION)
endif()

if(VIENNARAY_BENCHMARK)
message(STATUS "[ViennaRay] Enabling GPU trace-count tracking")
target_compile_definitions(${PROJECT_NAME} INTERFACE VIENNARAY_BENCHMARK)
endif()

if(VIENNARAY_PRINT_PROGRESS)
message(STATUS "[ViennaRay] Enabling progress printing")
target_compile_definitions(${PROJECT_NAME} INTERFACE VIENNARAY_PRINT_PROGRESS)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ We recommend using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to consum
* Installation with CPM

```cmake
CPMAddPackage("gh:viennatools/viennaray@4.3.1") # Use the latest release version
CPMAddPackage("gh:viennatools/viennaray@4.4.0") # Use the latest release version
```

* With a local installation
Expand Down
10 changes: 5 additions & 5 deletions examples/disk2D/disk2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,11 @@ int main() {
rayTracer.setSourceDirection(TraceDirection::POS_Y);
rayTracer.setNumberOfRaysPerPoint(2000);

// Build and cache the geometry, boundary, and Embree scene.
rayTracer.commitGeometry();

// Run the ray tracer
Timer timer;
timer.start();
rayTracer.apply();
timer.finish();

std::cout << "Tracing time: " << timer.currentDuration / 1e9 << " s\n";

// Extract the normalized hit counts for each geometry point
auto flux = *rayTracer.getLocalData().getScalarData("flux");
Expand All @@ -64,5 +62,7 @@ int main() {

rayInternal::writeVTK<NumericType, D>("trenchResult.vtk", points, flux);

rayTracer.getRayTraceInfo().print();

return 0;
}
13 changes: 7 additions & 6 deletions examples/disk3D/disk3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int main() {
// float or double, but keep in mind, that embree internally only works with
// float and thus any double precision geometry passed, will be converted
// internally to float.
using NumericType = float;
using NumericType = double;

// Set the number of threads to use in OpenMP parallelization
omp_set_num_threads(12);
Expand Down Expand Up @@ -47,17 +47,16 @@ int main() {
rayTracer.setGeometry(points, normals, gridDelta);
rayTracer.setBoundaryConditions(boundaryConds);
rayTracer.setParticleType(particle);
rayTracer.setRngSeed(123456789);

// Ray settings
rayTracer.setNumberOfRaysPerPoint(2000);

// Build and cache the geometry, boundary, and Embree scene.
rayTracer.commitGeometry();

// Run the ray tracer
Timer timer;
timer.start();
rayTracer.apply();
timer.finish();

std::cout << "Tracing time: " << timer.currentDuration / 1e9 << " s\n";

// Extract the normalized hit counts for each geometry point
auto &flux = *rayTracer.getLocalData().getScalarData("flux");
Expand All @@ -66,5 +65,7 @@ int main() {

rayInternal::writeVTK<NumericType, D>("trenchResult.vtk", points, flux);

rayTracer.getRayTraceInfo().print();

return 0;
}
Loading
Loading