FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/tests/doconcurrentloop_01.py at main · sak-codes/lpython · GitHub
sak-codes
/
lpython
Public
forked from
lcompilers/lpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lpython
/
tests
/
doconcurrentloop_01.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (22 loc) · 511 Bytes
Breadcrumbs
lpython
/
tests
/
doconcurrentloop_01.py
Copy path
File metadata and controls
25 lines (22 loc) · 511 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from
ltypes
import
f32
,
i32
def
triad
(
a
:
f32
[:],
b
:
f32
[:],
scalar
:
f32
,
c
:
f32
[:]):
N
:
i32
i
:
i32
N
=
size
(
a
)
for
i
in
range
(
N
):
# type: parallel
c
[
i
]
=
a
[
i
]
+
scalar
*
b
[
i
]
def
main0
():
a
:
f32
[
10000
]
b
:
f32
[
10000
]
c
:
f32
[
10000
]
scalar
:
f32
i
:
i32
nsize
:
i32
scalar
=
f32
(
10.0
)
nsize
=
size
(
a
)
for
i
in
range
(
nsize
):
# type: parallel
a
[
i
]
=
f32
(
5.0
)
b
[
i
]
=
f32
(
5.0
)
triad
(
a
,
b
,
scalar
,
c
)
print
(
"End Stream Triad"
)
main0
()
Back
|
FazBrowse Home
|
New Git URL