|
|
| File Information |
| Description |
This is a MEX-function that demonstrates how to compute the hypotenuse and angle of a triangle, using:
- MATLAB M-code
- A C-language MEX-function, running on the CPU
- A C-language MEX-function, running on an NVIDIA CUDA-capable GPU
The build procedure is more complicated than a regular MATLAB MEX-file. I have been building this in Microsoft Visual C++.
1. Follow the instructions in the MATLAB documentation that describe how to build a MEX-file outside of MATLAB:
[http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f24338.html]
2. Set a custom build rule for the "cudaHypot.cu" file in the source code. See the example projects provided with NVIDIA's CUDA SDK for sample build commands.
I apologize for not providing more detailed build instructions right now. I will try to update these, time permitting. |
| MATLAB release |
MATLAB 7.6 (R2008a)
|
| Other requirements |
NVIDIA CUDA-capable graphics card (GPU). For supported cards, see:
http://www.nvidia.com/object/cuda_learn_products.html |
| Zip File Content |
|
| Other Files |
cudaHypot.mexw32, example.m, license.txt, src/common.h, src/cudaHypot.cu, src/module.def
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com