Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

tileVectorAdd

Description

This sample demonstrates a simple vector addition using CUDA Tile C++. The vector addition is performed by splitting the dataset into blocks which process 1024 elements at a time. The cuda::tiles::partition_view type is used to partition the data into chunks of size 1024. Each block loads its respective chunk from 'a' and 'b', performs an elementwise addition, then stores it to the corresponding chunk of 'c'. Masked loads and stores are used to ensure that the last chunk which is partially out of bounds is correctly handled.

Expected Output

Success! Vector addition matches expected results.

Prerequisites