![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | addvec.cu | 2018-08-02 13:51 | 111 | |
![]() | job.script | 2018-08-02 14:35 | 197 | |
![]() | main.m | 2018-08-20 16:36 | 487 | |
This directory includes an example Matlab program to compute the addition of two vectors on GPU. A CUDA C function is called by a Matlab code.
First, compile the CUDA code,
module load cuda/9.1
nvcc -ptx vecadd.cu
An assembly-level ptx
file is created.
Then open Matlab,
module load matlab/2018a
matlab &
and run the CUDA C function in Matlab interface,
>> main
To run the Matlab program in background, submit a batch job,
qsub job.script