GPU Workshop Sample Code
 All Data Structures Namespaces Files Functions Variables Macros Pages
Functions
vecAdd.cu File Reference

Simple example of a kernel to add two vectors elementwise. More...

#include "../include/mycuda.h"

Go to the source code of this file.

Functions

__global__ void vecAdd (float *z, float a, float *x, float b, float *y, int n)
 Kernel to add two vectors elementwise. More...
 
int main ()
 

Detailed Description

Simple example of a kernel to add two vectors elementwise.

Definition in file vecAdd.cu.

Function Documentation

int main ( void  )

Definition at line 22 of file vecAdd.cu.

__global__ void vecAdd ( float *  z,
float  a,
float *  x,
float  b,
float *  y,
int  n 
)

Kernel to add two vectors elementwise.

Definition at line 12 of file vecAdd.cu.