expose flow and hhd for benchmark
This commit is contained in:
+2
-2
@@ -1628,7 +1628,7 @@ class PoissonSolver(object):
|
||||
Batched OpenCL Poisson solver for two 2D fields.
|
||||
Optimized: scatter H2D (~4x smaller transfer), fused multiply
|
||||
(reads g_fft once), async D2H (one sync instead of two).
|
||||
When profile=True, records and optionally prints per-stage timings.
|
||||
When profile=False, records and optionally prints per-stage timings.
|
||||
"""
|
||||
if not OPENCL_AVAILABLE:
|
||||
if verbose:
|
||||
@@ -1818,7 +1818,7 @@ class PoissonSolver(object):
|
||||
# """
|
||||
# OpenCL Poisson solver using pyvkfft FFT convolution.
|
||||
# Replaces scipy.signal.fftconvolve(..., mode='same') for structured grids.
|
||||
# When profile=True, records and optionally prints per-stage timings.
|
||||
# When profile=False, records and optionally prints per-stage timings.
|
||||
# """
|
||||
# if not OPENCL_AVAILABLE:
|
||||
# if verbose:
|
||||
|
||||
@@ -210,13 +210,13 @@ class Sensor:
|
||||
if self.img is None:
|
||||
raise Exception("Warning: Get image first")
|
||||
|
||||
self.__compute_flow()
|
||||
self.compute_flow()
|
||||
if decompose:
|
||||
self.__compute_hhd()
|
||||
self.compute_hhd()
|
||||
|
||||
return True
|
||||
|
||||
def __compute_flow(self):
|
||||
def compute_flow(self):
|
||||
if self.img is None:
|
||||
raise Exception("Warning: Get image first")
|
||||
|
||||
@@ -226,7 +226,7 @@ class Sensor:
|
||||
flow = flow.download()
|
||||
self.flow = flow
|
||||
|
||||
def __compute_hhd(self):
|
||||
def compute_hhd(self):
|
||||
|
||||
flow = self.flow
|
||||
if flow is None:
|
||||
|
||||
Reference in New Issue
Block a user