Rivoreo Source Code Repositories
src.rivoreo.one
/
compiler-explorer
/
d68cc806b1d46579d01e9d1db3900a8e994dd2e7
/
.
/
examples
/
cuda
/
default.cu
blob: 78080acb2401646b17b0c20b15e1bf5602e1db7f [
file
] [
log
] [
blame
] [
raw
]
// Type your code here, or load an example.
__global__
void
square
(
int
*
array
,
int
n
)
{
int
tid
=
blockIdx
.
x
;
if
(
tid
<
n
)
array
[
tid
]
=
array
[
tid
]
*
array
[
tid
];
}