Skip to content

Commit 344b136

Browse files
committed
Remove FreeDeviceMemory calls and related Cython bindings
Eliminated FreeDeviceMemory method and its usage from both the Cython interface and simulator_radar.pyx. This simplifies memory management, likely due to changes in the underlying C++ submodule or a refactor in resource handling.
1 parent 467deec commit 344b136

File tree

3 files changed

+1
-38
lines changed

3 files changed

+1
-38
lines changed

src/radarsimcpp

src/radarsimpy/includes/radarsimc.pxd

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -178,23 +178,6 @@ cdef extern from "points_manager.hpp":
178178
# Radar transmitter components including antenna patterns and waveform modulation
179179
#------------------------------------------------------------------------------
180180
cdef extern from "transmitter.hpp":
181-
cdef cppclass TxChannel[T]:
182-
TxChannel() except +
183-
184-
# Full transmitter channel constructor
185-
TxChannel(const Vec3[T] & location, # Antenna location
186-
const Vec3[cpp_complex[T]] & polar, # Polarization vector
187-
const vector[T] & phi, # Azimuth angle array
188-
const vector[T] & phi_ptn, # Azimuth pattern
189-
const vector[T] & theta, # Elevation angle array
190-
const vector[T] & theta_ptn, # Elevation pattern
191-
const T & antenna_gain, # Antenna gain (dB)
192-
const vector[T] & mod_t, # Modulation time array
193-
const vector[cpp_complex[T]] & mod_var, # Modulation variables
194-
const vector[cpp_complex[T]] & pulse_mod, # Pulse modulation
195-
const T & delay, # Channel delay (s)
196-
const T & grid) except + # Time grid resolution
197-
198181
cdef cppclass Transmitter[H, L]:
199182
Transmitter() except +
200183

@@ -231,18 +214,6 @@ cdef extern from "transmitter.hpp":
231214
# Radar receiver components including antenna patterns and RF/baseband processing
232215
#------------------------------------------------------------------------------
233216
cdef extern from "receiver.hpp":
234-
cdef cppclass RxChannel[T]:
235-
RxChannel() except +
236-
237-
# Receiver channel constructor
238-
RxChannel(const Vec3[T] & location, # Antenna location
239-
const Vec3[cpp_complex[T]] & polar, # Polarization vector
240-
const vector[T] & phi, # Azimuth angle array
241-
const vector[T] & phi_ptn, # Azimuth pattern
242-
const vector[T] & theta, # Elevation angle array
243-
const vector[T] & theta_ptn, # Elevation pattern
244-
const T & antenna_gain) except + # Antenna gain (dB)
245-
246217
cdef cppclass Receiver[T]:
247218
Receiver() except +
248219

@@ -282,7 +253,6 @@ cdef extern from "radar.hpp":
282253
void InitBaseband(H *bb_real, # Real baseband buffer
283254
H *bb_imag) except + # Imaginary baseband buffer
284255
void SyncBaseband() except + # Synchronize device memory
285-
void FreeDeviceMemory() except + # Release GPU memory
286256

287257
#------------------------------------------------------------------------------
288258
# Simulation Engines

src/radarsimpy/simulator_radar.pyx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ cpdef sim_radar(radar, targets, frame_time=None, density=1, level=None, interf=N
391391
debug)
392392

393393
if err:
394-
radar_c.get()[0].FreeDeviceMemory()
395394
raise_err(err)
396395

397396
radar_c.get()[0].SyncBaseband()
@@ -461,12 +460,6 @@ cpdef sim_radar(radar, targets, frame_time=None, density=1, level=None, interf=N
461460
else:
462461
interference = np.asarray(bb_real) + 1j * np.asarray(bb_imag)
463462

464-
# Clean up interference radar memory
465-
interf_radar_c.get()[0].FreeDeviceMemory()
466-
467-
# Clean up main radar memory
468-
radar_c.get()[0].FreeDeviceMemory()
469-
470463
# Return the simulation results as a structured dictionary
471464
return {
472465
"baseband": baseband,

0 commit comments

Comments
 (0)