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