<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: problem of GPUmat with b05</title>
		<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:42:53 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/problem-of-gpumat-with-b05" rel="self" type="application/rss+xml" />

		<item>
			<title>yinhaoscu on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05/page/2#post-594</link>
			<pubDate>Mon, 09 Jul 2012 03:40:09 +0000</pubDate>
			<dc:creator>yinhaoscu</dc:creator>
			<guid isPermaLink="false">594@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;It works. Thanks a lot.&#60;/p&#62;
&#60;p&#62;Hao
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05/page/2#post-591</link>
			<pubDate>Fri, 06 Jul 2012 02:06:01 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">591@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Hao,&#60;/p&#62;
&#60;p&#62;As you say, the problem is with &#60;code&#62;reshape&#60;/code&#62;. The GPUmat implementation doesn't allow the use of &#60;code&#62;[]&#60;/code&#62; to allow the dimensions to be calculated automatically. This error should only occur when using an object of the kWaveTransducer class as a sensor with GPUmat.&#60;/p&#62;
&#60;p&#62;In this case, you can replace the line where you are receiving an error with:&#60;/p&#62;
&#60;p&#62;sensor_data(:, file_index - sensor_data_buffer_size + 1) = sum(reshape(sum(reshape(current_vals, sensor.number_active_elements*sensor.element_width, sensor.element_length), 2), sensor.element_width, sensor.number_active_elements).', 2);&#60;/p&#62;
&#60;p&#62;And similarly for the case without elevation focusing:&#60;/p&#62;
&#60;p&#62;sensor_data(:, file_index) = sum(reshape(sum(reshape(p(sensor_mask_ind), sensor.number_active_elements*sensor.element_width, sensor.element_length), 2), sensor.element_width, sensor.number_active_elements).', 2);&#60;/p&#62;
&#60;p&#62;Let me know if you still receive errors after this.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>yinhaoscu on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-588</link>
			<pubDate>Thu, 05 Jul 2012 02:51:04 +0000</pubDate>
			<dc:creator>yinhaoscu</dc:creator>
			<guid isPermaLink="false">588@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;the same problems
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-572</link>
			<pubDate>Thu, 28 Jun 2012 02:55:47 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">572@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;What about for the &#34;Defining an Ultrasound Transducer&#34; and &#34;Simulating Ultrasound Beam Patterns&#34; examples?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>yinhaoscu on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-571</link>
			<pubDate>Thu, 28 Jun 2012 02:15:25 +0000</pubDate>
			<dc:creator>yinhaoscu</dc:creator>
			<guid isPermaLink="false">571@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad. The same problem with example_us_transducer_as_sensor.m&#60;br /&#62;
  ??? Error using ==&#38;gt; reshape&#60;br /&#62;
Dimension cannot be zero.&#60;/p&#62;
&#60;p&#62;Error in ==&#38;gt; kspaceFirstOrder3D at 940&#60;br /&#62;
                        sensor_data(:, file_index - sensor_data_buffer_size + 1) = ...&#60;/p&#62;
&#60;p&#62;Error in ==&#38;gt; example_us_transducer_as_sensor at 137&#60;br /&#62;
[sensor_data] = kspaceFirstOrder3D(kgrid, medium, source, transducer, input_args{:});&#60;/p&#62;
&#60;p&#62;Hao
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-569</link>
			<pubDate>Wed, 27 Jun 2012 23:49:32 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">569@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Hao,&#60;/p&#62;
&#60;p&#62;Thanks for your follow-up. Do you also get an error when you use GPUmat with other k-Wave examples, or is just when you use a &#60;code&#62;kWaveTransducer&#60;/code&#62; object as a sensor (i.e., the final two US examples)?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>yinhaoscu on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-564</link>
			<pubDate>Mon, 25 Jun 2012 04:22:22 +0000</pubDate>
			<dc:creator>yinhaoscu</dc:creator>
			<guid isPermaLink="false">564@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Brad, thanks for your reply. I followed your guideline, it worked further step. The problem changed to:&#60;br /&#62;
Error using ==&#38;gt; reshape&#60;br /&#62;
Dimension cannot be zero.&#60;/p&#62;
&#60;p&#62;Error in ==&#38;gt; kspaceFirstOrder3D at 940&#60;br /&#62;
                        sensor_data(:, file_index - sensor_data_buffer_size + 1) = ...&#60;/p&#62;
&#60;p&#62;Error in ==&#38;gt; example_us_bmode_linear_transducer at 239&#60;br /&#62;
        sensor_data = kspaceFirstOrder3D(kgrid, medium, transducer, transducer, input_args{:});&#60;/p&#62;
&#60;p&#62;***** It seems that sensor_data is a GPUtype, however reshape need a CPU type, so the dimension is zero.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-562</link>
			<pubDate>Thu, 21 Jun 2012 05:52:11 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">562@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Hao,&#60;/p&#62;
&#60;p&#62;Do you mean you downloaded the bsxfun from the k-Wave forum? Also, you will need to fix a data cast bug listed in the B.05 &#60;a href=&#34;http://www.k-wave.org/forum/topic/b05-known-issues&#34;&#62;known issues&#60;/a&#62; on the 10th of April.&#60;/p&#62;
&#60;p&#62;The @ symbol in the @GPUtype folder name tells MATLAB to only use the functions within the folder when the inputs are of GPUtype. This is correct.&#60;/p&#62;
&#60;p&#62;Brad
&#60;/p&#62;</description>
		</item>
		<item>
			<title>yinhaoscu on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-561</link>
			<pubDate>Thu, 21 Jun 2012 03:44:13 +0000</pubDate>
			<dc:creator>yinhaoscu</dc:creator>
			<guid isPermaLink="false">561@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad.&#60;/p&#62;
&#60;p&#62;Thanks for your help. &#60;/p&#62;
&#60;p&#62;I did download bsxfun shipped with GPUmat and put it in @GPUtype directory. It seems that k-wave used the bsxfun provided by GPUmat, however it tried to use the times funtion from Matlab instead of the corresponding times located in the same directory of bsxfun (@GPUtype). Why there is a symbol @ before the name of directory @GPUtype? What can I do?&#60;/p&#62;
&#60;p&#62;Hao
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-556</link>
			<pubDate>Wed, 20 Jun 2012 08:40:13 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">556@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Hao,&#60;/p&#62;
&#60;p&#62;Are you using the bsxfun shipped with GPUmat, or the one from the k-Wave forum? You will need to use the version from &#60;a href=&#34;http://www.k-wave.org/forum/topic/getting-started-with-gpumat&#34;&#62;here&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>yinhaoscu on "problem of GPUmat with b05"</title>
			<link>http://www.k-wave.org/forum/topic/problem-of-gpumat-with-b05#post-555</link>
			<pubDate>Wed, 20 Jun 2012 07:37:52 +0000</pubDate>
			<dc:creator>yinhaoscu</dc:creator>
			<guid isPermaLink="false">555@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;??? Error using ==&#38;gt; times&#60;br /&#62;
Operations between Matlab arrays and GPU arrays are not supported. (ERROR code 5)&#60;/p&#62;
&#60;p&#62;Error in ==&#38;gt; kspaceFirstOrder3D at 741&#60;br /&#62;
    ux_sgx = bsxfun(@times, pml_x_sgx, ...&#60;/p&#62;
&#60;p&#62;I checked that times.m is in @GPUType directory, what can I do? Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
