Skip to content

Commit 1afa2d5

Browse files
committed
added convenience function to obtain map and model from simulator object
1 parent 6442834 commit 1afa2d5

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

src/rmagine_optix/include/rmagine/simulation/O1DnSimulatorOptix.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,16 @@ class O1DnSimulatorOptix {
155155
template<typename BundleT>
156156
void preBuildProgram();
157157

158+
inline Memory<O1DnModel_<VRAM_CUDA>, VRAM_CUDA> model() const
159+
{
160+
return m_model_d;
161+
}
162+
163+
inline OptixMapPtr map() const
164+
{
165+
return m_map;
166+
}
167+
158168
// Problems:
159169
// - a lot of copies
160170
//

src/rmagine_optix/include/rmagine/simulation/OnDnSimulatorOptix.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,16 @@ class OnDnSimulatorOptix {
165165
template<typename BundleT>
166166
void preBuildProgram();
167167

168+
inline Memory<OnDnModel_<VRAM_CUDA>, VRAM_CUDA> model() const
169+
{
170+
return m_model_d;
171+
}
172+
173+
inline OptixMapPtr map() const
174+
{
175+
return m_map;
176+
}
177+
168178
// Problems:
169179
// - a lot of copies
170180
//

src/rmagine_optix/include/rmagine/simulation/PinholeSimulatorOptix.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,16 @@ class PinholeSimulatorOptix {
155155
template<typename BundleT>
156156
void preBuildProgram();
157157

158+
inline Memory<PinholeModel, VRAM_CUDA> model() const
159+
{
160+
return m_model;
161+
}
162+
163+
inline OptixMapPtr map() const
164+
{
165+
return m_map;
166+
}
167+
158168
// Problems:
159169
// - a lot of copies
160170
//

src/rmagine_optix/include/rmagine/simulation/SphereSimulatorOptix.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ class SphereSimulatorOptix {
158158
template<typename BundleT>
159159
void preBuildProgram();
160160

161+
inline Memory<SphericalModel, VRAM_CUDA> model() const
162+
{
163+
return m_model;
164+
}
165+
166+
inline OptixMapPtr map() const
167+
{
168+
return m_map;
169+
}
170+
161171
// Problems:
162172
// - a lot of copies
163173
//

0 commit comments

Comments
 (0)