Skip to content

Commit

Permalink
Updating tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thurston committed Feb 26, 2024
1 parent 7263ebf commit 0447ddb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion test/BFTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function setupQUPSdata(test, xdc_type, seq_type, baseband)

% simple point target 30 mm depth
c0 = 1500;
scat = Scatterers('pos', 1e-3*[5 0 15]', 'c0', c0);
scat = Scatterers('pos', 1e-3*[2 0 15]', 'c0', c0);

% Transducer
switch xdc_type
Expand Down Expand Up @@ -198,6 +198,7 @@ function teardownQUPSdata(test)
end
methods(TestMethodSetup)
function resetGPU(test)
return; % pass
if gpuDeviceCount()
test.chd = gather(test.chd);
reselectgpu();
Expand Down
5 changes: 3 additions & 2 deletions test/SimTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ function setupQUPSdata(test, xdc_seq_name)
end
methods(TestMethodSetup)
function resetGPU(test)
return; % pass
if gpuDeviceCount()
reselectgpu();
if ~isempty(gcp('nocreate'))
Expand Down Expand Up @@ -280,8 +281,8 @@ function pscat(test, sim_name, terp)
otherwise, warning('Simulator not recognized'); return;
end

% peak should be ~near~ 40us at the center elements for
% FSA and PW, ~near~ 20us (at the focus) for FC
% peak should be ~near~ 20us at the center elements for
% FSA and PW, ~near~ 10us (at the focus) for FC

% truncate the data if we observed the transmit pulse
if sim_name == "kWave",
Expand Down
3 changes: 2 additions & 1 deletion test/interpTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ function wsinterpd2Test(test,dsize,terp,dsum,wvecd,type,dev)
test.assumeTrue(logical(exist('halfT', 'class')));
end
if dev == "GPU"
test.assumeTrue(gpuDeviceCount > 0);
has_device = gpuDeviceCount > 0 || exist('oclDeviceCount', 'file') && oclDeviceCount();
test.assumeTrue(has_device);
end

% get sizing
Expand Down

0 comments on commit 0447ddb

Please sign in to comment.