<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Byte-Welt Forum - JCuda</title>
		<link>http://forum.byte-welt.net/</link>
		<description />
		<language>de</language>
		<lastBuildDate>Wed, 08 Sep 2010 00:54:17 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forum.byte-welt.de/images/peanut/misc/rss.jpg</url>
			<title>Byte-Welt Forum - JCuda</title>
			<link>http://forum.byte-welt.net/</link>
		</image>
		<item>
			<title>I want to develop by JCuda</title>
			<link>http://forum.byte-welt.net/showthread.php?t=3013&amp;goto=newpost</link>
			<pubDate>Mon, 06 Sep 2010 05:59:34 GMT</pubDate>
			<description><![CDATA[Hi 
I want to develop by JCuda~ 
But I don't know what shall I do before Coding ~ 
The JCuda Enviroment doesn't work well and always have this Error...]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>Hi<br />
I want to develop by JCuda~<br />
But I don't know what shall I do before Coding ~<br />
The JCuda Enviroment doesn't work well and always have this Error<br />
=====================<br />
Error while loading native library with base name &quot;JCudaDriver&quot;<br />
Operating system name: Windows XP<br />
Architecture         : x86<br />
Architecture bit size: 32<br />
Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: Could not load native library<br />
	at jcuda.LibUtils.loadLibrary(LibUtils.java:74)<br />
	at jcuda.driver.JCudaDriver.&lt;clinit&gt;(JCudaDriver.java  :96)<br />
	at JCudaDriverInit.main(JCudaDriverInit.java:13)<br />
======================<br />
I have read the tips how to solve this problem,but still fail~<br />
I don't know which is the right steps to build the JCuda Enviroment~<br />
Would please tell which need to install and the right order~<br />
<br />
Thanks!</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://forum.byte-welt.net/forumdisplay.php?f=90">JCuda</category>
			<dc:creator>Unregistered</dc:creator>
			<guid isPermaLink="true">http://forum.byte-welt.net/showthread.php?t=3013</guid>
		</item>
		<item>
			<title>Can not solve UnsatisfiedLinkError</title>
			<link>http://forum.byte-welt.net/showthread.php?t=2996&amp;goto=newpost</link>
			<pubDate>Fri, 27 Aug 2010 08:45:02 GMT</pubDate>
			<description><![CDATA[Hey,  
 
I 've got a problem with the UnsatisfiedLinkError when running on Windows 7 (64bit). I read the sticky post and tried all the proposed...]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>Hey, <br />
<br />
I 've got a problem with the UnsatisfiedLinkError when running on Windows 7 (64bit). I read the sticky post and tried all the proposed solutions, but none of them worked. I keep getting the following error, when running the JCudaRuntimeSample: <br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Error while loading native library with base name &quot;JCudaRuntime&quot;<br />
Operating system name: Windows 7<br />
Architecture&nbsp; &nbsp; &nbsp; &nbsp;  : amd64<br />
Architecture bit size: 64<br />
Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: Could not load native library<br />
&nbsp; &nbsp; &nbsp; &nbsp; at jcuda.LibUtils.loadLibrary(LibUtils.java:79)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at jcuda.runtime.JCuda.assertInit(JCuda.java:225)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at jcuda.runtime.JCuda.cudaMalloc(JCuda.java:1513)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at JCudaRuntimeSample.main(JCudaRuntimeSample.java:41)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.reflect.Method.invoke(Method.java:597)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->My setup is the following: <ul><li> Set the -Djava.library.path VM parameter to point to the native lib directory</li>
<li> Installed Cuda Toolkit 3.1 (build 9)</li>
<li> Used the latest jcuda 64 bit binaries for windows from the jcuda website</li>
</ul><br />
When I still got the error, I checked the dependencies of the jcuda runtime dll. This indicated a dependency on cudart64_31_9.dll. I then checked my cuda toolkit installation, which did indeed have this dll. I also checked whether this dll was in my path system variable, and this was also the case. <br />
<br />
I don't know what more I can do to fix this error. Any ideas? <br />
<br />
Thanks in advance!</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://forum.byte-welt.net/forumdisplay.php?f=90">JCuda</category>
			<dc:creator>SenjuDahr</dc:creator>
			<guid isPermaLink="true">http://forum.byte-welt.net/showthread.php?t=2996</guid>
		</item>
		<item>
			<title>memory alloc overhead</title>
			<link>http://forum.byte-welt.net/showthread.php?t=2989&amp;goto=newpost</link>
			<pubDate>Sat, 21 Aug 2010 18:20:37 GMT</pubDate>
			<description>hi! 
  
i tried to use jcublas for one of my applications. unfortunately this application got much slower with jcublas. because of that i compared...</description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>hi!<br />
 <br />
i tried to use jcublas for one of my applications. unfortunately this application got much slower with jcublas. because of that i compared the following in a test program:<br />
 <br />
1) allocating, loading and freeing a double array of size 1000000 in gpu memory (cublasAlloc, cublasSetVector, cublasFree)<br />
2) allocating, loading and freeing 1000000 double arrays of size 1 in gpu memory one after another<br />
 <br />
1) is finished in no time, but 2)... don't wait for it.<br />
now i wonder, is this an unavoidable hardware issue, a cuda issua, a cublas issue or a jcublas issue?</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://forum.byte-welt.net/forumdisplay.php?f=90">JCuda</category>
			<dc:creator>cyau</dc:creator>
			<guid isPermaLink="true">http://forum.byte-welt.net/showthread.php?t=2989</guid>
		</item>
		<item>
			<title>cudppCompact unspecified launch fail</title>
			<link>http://forum.byte-welt.net/showthread.php?t=2984&amp;goto=newpost</link>
			<pubDate>Fri, 20 Aug 2010 07:11:25 GMT</pubDate>
			<description><![CDATA[HI, 
 
The following is the exception error: 
 
 
Code: 
--------- 
        Cuda error in file '/home/kashif/c++/RIPS/C/cudpp/src/app/scan_app.cu' in...]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>HI,<br />
<br />
The following is the exception error:<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&nbsp; &nbsp; &nbsp; &nbsp; Cuda error in file '/home/kashif/c++/RIPS/C/cudpp/src/app/scan_app.cu' in line 273 : unspecified launch failure.</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->It seems happen on cudppPlan:<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&nbsp; &nbsp; &nbsp; &nbsp; CUDPPConfiguration config5 = new CUDPPConfiguration();<br />
&nbsp; &nbsp; &nbsp; &nbsp; config5.op = CUDPP_ADD;<br />
&nbsp; &nbsp; &nbsp; &nbsp; config5.datatype = CUDPP_INT;<br />
&nbsp; &nbsp; &nbsp; &nbsp; config5.algorithm = CUDPP_COMPACT;<br />
&nbsp; &nbsp; &nbsp; &nbsp; config5.options = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; CUDPPHandle handle5 = new CUDPPHandle();<br />
&nbsp; &nbsp; &nbsp; &nbsp; cudppPlan(handle5, config5, size, 1, 0);</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->Why I get this exception ?? Is it the value of &quot;size&quot; is too large??? The value of size is larger than 10M.<br />
<br />
Regards,<br />
Lemon</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://forum.byte-welt.net/forumdisplay.php?f=90">JCuda</category>
			<dc:creator>lemoncmf</dc:creator>
			<guid isPermaLink="true">http://forum.byte-welt.net/showthread.php?t=2984</guid>
		</item>
		<item>
			<title>Multiplying and inverting matrices</title>
			<link>http://forum.byte-welt.net/showthread.php?t=2976&amp;goto=newpost</link>
			<pubDate>Sat, 14 Aug 2010 20:08:51 GMT</pubDate>
			<description>EDITED: The first posts had been moved here by splitting this thread (http://forum.byte-welt.de/showthread.php?t=2971) 
 
 
Thank you very much. I...</description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div><i>EDITED: The first posts had been moved here by splitting <a href="http://forum.byte-welt.de/showthread.php?t=2971" target="_blank">this thread</a></i><br />
<br />
<br />
Thank you very much. I will find a visual study to finish me first cuda implementation.<br />
<br />
I don´t want to disturb you but I am going to tell you what I need to finish a work (maybe you have something similar):<br />
- a java method to multiply two matrix with cuda paralelism (N multicore processing where n is a parameter of the method): public double[][]multiply(double a[][], b[][], int N)<br />
- a java method to calculate the inverse of one matrix (N multicore processing where n is a parameter of the method): public double[][]inverse(double a[][], int N)<br />
<br />
Now I will work in the compilation with visual studio but I would appreciate if you helped me in my real problem.<br />
<br />
Thanks</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://forum.byte-welt.net/forumdisplay.php?f=90">JCuda</category>
			<dc:creator>franja89</dc:creator>
			<guid isPermaLink="true">http://forum.byte-welt.net/showthread.php?t=2976</guid>
		</item>
		<item>
			<title>JCuda FAQ - Please read before posting</title>
			<link>http://forum.byte-welt.net/showthread.php?t=2972&amp;goto=newpost</link>
			<pubDate>Sat, 14 Aug 2010 18:41:43 GMT</pubDate>
			<description><![CDATA[A preliminary collection of Frequently Asked Questions: 
 
 
*_How to solve an "UnsatisfiedLinkError"_* 
 
First of all: Make sure that you installed...]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>A preliminary collection of Frequently Asked Questions:<br />
<br />
<br />
<font size="4"><b><u>How to solve an &quot;UnsatisfiedLinkError&quot;</u></b></font><br />
<br />
First of all: Make sure that you installed the appropriate Developer driver <b>and</b> the CUDA toolkit for your operating system. You may download the driver and the toolkit at <a href="http://developer.nvidia.com/object/cuda_download.html" target="_blank">the NVIDIA download site.</a><br />
<br />
There are basically three types of an UnsatisfiedLinkError. Please look at the Exception Stack Trace to see the precise error message:<br />
<br />
<font size="3"><u>Type 1:</u> UnsatisfiedLinkError: <b>Could not load native library</b></font><br />
<br />
This is by far the most common error message. Usually, this simply means that a native JCuda library can not be found. Note that this refers to the <i>native</i> library, namely the <b>.DLL</b> files on windows, the <b>.so</b> files on Linux, or the <b>.JNILIB</b> files on MacOS.<br />
<br />
To solve this problem, make sure that these native library files are &quot;visible&quot; for Java when you try to start the program. In the simplest case, this means that you have to copy all these libraries into the root directory of your project. For example, if you have directories like<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">C:\Workspace\<br />
<b>C:\Workspace\Project\</b><br />
C:\Workspace\Project\src<br />
C:\Workspace\Project\bin<br />
...</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->Then you have to copy all the native library files into<br />
<b>C:\Workspace\Project\</b><br />
<br />
<br />
<u>Alternative solution #1</u><br />
<br />
You can explicitly specify the path where Java should look for native libraries. To do this, you can add the following argument to Java when you start the program:<br />
<b>-Djava.library.path=<i>your\path\to\the\DLLs\</i></b><br />
<br />
For example, if you have copied the native libraries into <i>C:\JCudaLibararies</i>, then you can start your program with<br />
<b>java -Djava.library.path=C:\JCudaLibraries\   YourProgram</b><br />
<br />
In Eclipse, you can add this argument under<br />
(Menu) &quot;Run Configurations&quot; -&gt; (Tab) &quot;Arguments&quot; -&gt; (Textbox) &quot;VM Arguments&quot;<br />
<br />
<br />
<u>Alternative solution #2</u><br />
<br />
A file is also &quot;visible&quot; when its path is contained in the system-specific environment variable. On Windows, you can add the path where the library files are located to the PATH environment variable. On Linux, you can add the path to the LD_LIBRARY_PATH environment variable.<br />
<br />
<br />
<br />
<br />
<font size="3"><u>Type 2:</u> UnsatisfiedLinkError: <i>&lt;name of a JCuda library&gt;</i> : <b>Can't find dependent libraries</b></font><br />
<br />
When the error message says &quot;Can't find dependent libraries&quot;, this usually means that you do not have installed the CUDA driver or the CUDA Toolkit. You can download the CUDA developer drivers and the CUDA toolkit from the <a href="http://www.nvidia.com/getcuda" target="_blank">NVIDIA CUDA Download Site</a>. Please see the installation notes on this site for further information.<br />
<br />
<br />
<br />
<br />
<font size="3"><u>Type 3:</u> UnsatisfiedLinkError: <i>&lt;name of a JCuda library&gt;</i> : <b>%1 is not a valid Win32 application</b><br />
UnsatisfiedLinkError: <i>&lt;name of a JCuda library&gt;</i> : <b>Can't load IA 32-bit .dll on a AMD 64-bit platform </b><br />
</font><br />
This error message may occur on Windows when you are trying to use <br />
- a 64 bit library on a 32 bit system or<br />
- a 32 bit library on a 64 bit system <br />
or when you are trying to start the program with the wrong Java version.<br />
<br />
You should first check that you have downloaded the appropriate version for your system. If you already have the right version, make sure that you also have the right version of Java: On a 64 bit Windows, you can use the 32 bit Java Runtime Environment (JRE) for most applications, but you can <b>not</b> use the 32 bit JRE when you want to load a 64 bit native library. When you want to load a 64 bit native library, you also have to use the 64 bit version of the Java Runtime Environment.<br />
<br />
<br />
<br />
<br />
<font size="3"><b><u>If all this does not help</u></b></font><br />
<br />
To set up a minimum JCuda project as a basic test, you may follow these steps:<br />
<br />
1. Copy all native JCuda DLL-files or .SO-files and JAR files into one directory, and add the following file as &quot;JCudaRuntimeTest.java&quot; in the same directory:<br />
<!-- BEGIN TEMPLATE: bbcode_highlight -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Java Code:</div>
	<pre class="alt2" style="margin:0px; padding:6px; border:1px inset; width:90%; height:228px; overflow:auto"><div dir="ltr" style="text-align:left;"><div class="java" style="font-family: monospace;"><ol><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.*</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.runtime.*</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> JCudaRuntimeTest</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a target="_blank" &nbsp;href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> args<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Pointer pointer <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Pointer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCuda.<span style="color: #006633;">cudaMalloc</span><span style="color: #009900;">&#40;</span>pointer, <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank" &nbsp;href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Pointer: &quot;</span><span style="color: #339933;">+</span>pointer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCuda.<span style="color: #006633;">cudaFree</span><span style="color: #009900;">&#40;</span>pointer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #009900;">&#125;</span></div></li></ol></div></div></pre>
</div>
<!-- END TEMPLATE: bbcode_highlight --> <br />
2. Then compile the program manually from the Command Line:<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left"><i>C:\Test\&gt;</i><b>javac -cp &quot;.;jcuda-0.3.1.jar&quot; JCudaRuntimeTest.java</b></code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->(for Linux, the path will be something like &quot;<i>usr/local/Test&gt;</i>&quot;). This should create the &quot;JCudaRuntimeTest.class&quot; file in the same directory. <br />
<br />
3. Start the program with the following command:<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left"><i>C:\Test\&gt;</i><b>java -cp &quot;.;jcuda-0.3.1.jar&quot; JCudaRuntimeTest</b></code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->This should print some information about the pointer which was created in the program. (Note that in both cases no &quot;-Djava.library.path&quot; should be necessary, because all the DLLs are in the same directory)<br />
<br />
If this still does not work, I have no idea what else you could try ;) But if you intend to ask about this in the Forum, please include the following information:<br />
- Which operating system / architecture you are using (Windows, Linux, MacOS, 32bit or 64bit)<br />
- Which driver and toolkit you have installed<br />
- Which version of JCuda you are using<br />
- Possibly, your directory structure, command line path, or other information that may be relevant<br />
<br />
<br />
<br />
<br />
<br />
So far, there is only one FAQ. But 9 out of 10 threads are right about this single question. Later this FAQ may possibly be extended.</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://forum.byte-welt.net/forumdisplay.php?f=90">JCuda</category>
			<dc:creator>Marco13</dc:creator>
			<guid isPermaLink="true">http://forum.byte-welt.net/showthread.php?t=2972</guid>
		</item>
		<item>
			<title>UnsatisfiedLinkError on Windows 7, 64bit</title>
			<link>http://forum.byte-welt.net/showthread.php?t=2971&amp;goto=newpost</link>
			<pubDate>Sat, 14 Aug 2010 15:57:19 GMT</pubDate>
			<description>Hello i´m starting with jcuda and eclipse and i have implemented your example: 
 
 
package prueba; 
 
import jcuda.LogLevel; 
import jcuda.Pointer;...</description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>Hello i´m starting with jcuda and eclipse and i have implemented your example:<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_highlight -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Java Code:</div>
	<pre class="alt2" style="margin:0px; padding:6px; border:1px inset; width:90%; height:996px; overflow:auto"><div dir="ltr" style="text-align:left;"><div class="java" style="font-family: monospace;"><ol><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">prueba</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.LogLevel</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.Pointer</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.Sizeof</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.driver.CUcontext</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.driver.CUdevice</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.driver.CUdeviceptr</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.driver.CUfunction</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.driver.CUmodule</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">jcuda.driver.JCudaDriver</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TestCUBINCall <span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Run attributes, not really important but define vector element size. </span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// This is from another larger test program I was working on.</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span> maxParticleCount <span style="color: #339933;">=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span> dimensions <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Calculate vector needs</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span> vectorElementCount <span style="color: #339933;">=</span> maxParticleCount<span style="color: #339933;">*</span>dimensions<span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span> vectorMemSize <span style="color: #339933;">=</span> vectorElementCount<span style="color: #339933;">*</span>Sizeof.<span style="color: #006633;">FLOAT</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// All input and result arrays are the same size</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">float</span> particleCoordinates<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span>vectorElementCount<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">float</span> particlePositionModifiers<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span>vectorElementCount<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">float</span> results<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span>vectorElementCount<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span> threads_per_block <span style="color: #339933;">=</span> <span style="color: #cc66cc;">256</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/**</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #666666; font-style: italic;">&nbsp; &nbsp; &nbsp;* Simple test method to calculate the sum of 2 vectors</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #666666; font-style: italic;">&nbsp; &nbsp; &nbsp;* </span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #666666; font-style: italic;">&nbsp; &nbsp; &nbsp;* [1,1,1,1,1,1,1,1,1...] + [2,2,2,2,2,2,2,2,2...] = [3,3,3,3,3,3,3,3,3...]</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #666666; font-style: italic;">&nbsp; &nbsp; &nbsp;* </span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #666666; font-style: italic;">&nbsp; &nbsp; &nbsp;*/</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> testCUBIN<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Initialize the driver and create a context for the first device.</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuInit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CUcontext pctx <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CUcontext<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CUdevice dev <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CUdevice<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuDeviceGet</span><span style="color: #009900;">&#40;</span>dev, <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuCtxCreate</span><span style="color: #009900;">&#40;</span>pctx, <span style="color: #cc66cc;">0</span>, dev<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Load the CUBIN file.</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CUmodule module <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CUmodule<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuModuleLoad</span><span style="color: #009900;">&#40;</span>module, <span style="color: #0000ff;">&quot;vector_add.sm_10.cubin&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Obtain a function pointer to the &quot;sampleKernel&quot; function.</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CUfunction function <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CUfunction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuModuleGetFunction</span><span style="color: #009900;">&#40;</span>function, module, <span style="color: #0000ff;">&quot;add_vectors_kernel&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Prepare host test data</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> vectorElementCount<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; particleCoordinates<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; particlePositionModifiers<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; results<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Define pointers to input vectors</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CUdeviceptr positionDevicePointer <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CUdeviceptr<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CUdeviceptr modificationDevicePointer <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CUdeviceptr<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CUdeviceptr outputDevicePointer <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CUdeviceptr<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Allocate memory space on the GPU</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemAlloc</span><span style="color: #009900;">&#40;</span>positionDevicePointer, vectorMemSize<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemAlloc</span><span style="color: #009900;">&#40;</span>modificationDevicePointer, vectorMemSize<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemAlloc</span><span style="color: #009900;">&#40;</span>outputDevicePointer, vectorMemSize<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Copy data from host to device</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemcpyHtoD</span><span style="color: #009900;">&#40;</span>positionDevicePointer, Pointer.<span style="color: #006633;">to</span><span style="color: #009900;">&#40;</span>particleCoordinates<span style="color: #009900;">&#41;</span>, vectorMemSize<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemcpyHtoD</span><span style="color: #009900;">&#40;</span>modificationDevicePointer, Pointer.<span style="color: #006633;">to</span><span style="color: #009900;">&#40;</span>particlePositionModifiers<span style="color: #009900;">&#41;</span>,vectorMemSize<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Set up the execution parameters.</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> num_blocks <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span>vectorElementCount <span style="color: #339933;">+</span> threads_per_block <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#41;</span> threads_per_block<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> max_blocks_per_dimension <span style="color: #339933;">=</span> <span style="color: #cc66cc;">65535</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> num_blocks_y <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span>num_blocks <span style="color: #339933;">+</span> max_blocks_per_dimension <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#41;</span> max_blocks_per_dimension<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> num_blocks_x <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span>num_blocks <span style="color: #339933;">+</span> num_blocks_y <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#41;</span> num_blocks_y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuFuncSetBlockShape</span><span style="color: #009900;">&#40;</span>function, num_blocks_x, num_blocks_y, <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Set up the parameters for the function call</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Pointer dInPositions <span style="color: #339933;">=</span> Pointer.<span style="color: #006633;">to</span><span style="color: #009900;">&#40;</span>positionDevicePointer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Pointer dInModifiers <span style="color: #339933;">=</span> Pointer.<span style="color: #006633;">to</span><span style="color: #009900;">&#40;</span>modificationDevicePointer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Pointer dOut <span style="color: #339933;">=</span> Pointer.<span style="color: #006633;">to</span><span style="color: #009900;">&#40;</span>outputDevicePointer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Pointer vectorSize <span style="color: #339933;">=</span> Pointer.<span style="color: #006633;">to</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span>vectorElementCount<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Accumulate offset used for function call</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> offset <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Position</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; offset <span style="color: #339933;">=</span> JCudaDriver.<span style="color: #006633;">align</span><span style="color: #009900;">&#40;</span>offset, Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuParamSetv</span><span style="color: #009900;">&#40;</span>function, offset, dInPositions, Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; offset <span style="color: #339933;">+=</span> Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Modifier</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; offset <span style="color: #339933;">=</span> JCudaDriver.<span style="color: #006633;">align</span><span style="color: #009900;">&#40;</span>offset, Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuParamSetv</span><span style="color: #009900;">&#40;</span>function, offset, dInModifiers, Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; offset <span style="color: #339933;">+=</span> Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Results</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; offset <span style="color: #339933;">=</span> JCudaDriver.<span style="color: #006633;">align</span><span style="color: #009900;">&#40;</span>offset, Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuParamSetv</span><span style="color: #009900;">&#40;</span>function, offset, dOut, Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; offset <span style="color: #339933;">+=</span> Sizeof.<span style="color: #006633;">POINTER</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Vector Size</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; offset <span style="color: #339933;">=</span> JCudaDriver.<span style="color: #006633;">align</span><span style="color: #009900;">&#40;</span>offset, Sizeof.<span style="color: #006633;">INT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuParamSetv</span><span style="color: #009900;">&#40;</span>function, offset, vectorSize, Sizeof.<span style="color: #006633;">INT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; offset <span style="color: #339933;">+=</span> Sizeof.<span style="color: #006633;">INT</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuParamSetSize</span><span style="color: #009900;">&#40;</span>function, offset<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Call the function.</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuLaunch</span><span style="color: #009900;">&#40;</span>function<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuCtxSynchronize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Copy the device output to the host.</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemcpyDtoH</span><span style="color: #009900;">&#40;</span>Pointer.<span style="color: #006633;">to</span><span style="color: #009900;">&#40;</span>results<span style="color: #009900;">&#41;</span>, outputDevicePointer, vectorMemSize<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Verify the result via simple output</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// All values should be 3, ie 3,3,3,3,3,3,3,3,3,3........</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> vectorElementCount<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank" &nbsp;href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span>results<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;,&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp;</div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Clean up.</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemFree</span><span style="color: #009900;">&#40;</span>positionDevicePointer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemFree</span><span style="color: #009900;">&#40;</span>modificationDevicePointer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; JCudaDriver.<span style="color: #006633;">cuMemFree</span><span style="color: #009900;">&#40;</span>outputDevicePointer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; </div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/**</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #666666; font-style: italic;">&nbsp; &nbsp; &nbsp;* Kick off the test</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #666666; font-style: italic;">&nbsp; &nbsp; &nbsp;* @param args</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #666666; font-style: italic;">&nbsp; &nbsp; &nbsp;*/</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a target="_blank" &nbsp;href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; TestCUBINCall test <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TestCUBINCall<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; &nbsp; &nbsp; test.<span style="color: #006633;">testCUBIN</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"><span style="color: #009900;">&#125;</span></div></li></ol></div></div></pre>
</div>
<!-- END TEMPLATE: bbcode_highlight --><br />
But i have had problems like that<br />
<br />
Error while loading native library with base name &quot;JCudaDriver&quot;<br />
Operating system name: Windows 7<br />
Architecture         : amd64<br />
Architecture bit size: 64<br />
Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: Could not load native library<br />
    at jcuda.LibUtils.loadLibrary(LibUtils.java:79)<br />
    at jcuda.driver.JCudaDriver.&lt;clinit&gt;(JCudaDriver.java  :107)<br />
    at prueba.TestCUBINCall.testCUBIN(TestCUBINCall.java:  42)<br />
    at prueba.TestCUBINCall.main(TestCUBINCall.java:147)<br />
<br />
i have added the external jar &quot;jcuda-0.3.1.jar&quot;<br />
<br />
Thaks</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://forum.byte-welt.net/forumdisplay.php?f=90">JCuda</category>
			<dc:creator>Fran</dc:creator>
			<guid isPermaLink="true">http://forum.byte-welt.net/showthread.php?t=2971</guid>
		</item>
	</channel>
</rss>
