質問編集履歴

2

書式の更新

2020/11/08 01:54

投稿

Kinsho
Kinsho

スコア18

test CHANGED
File without changes
test CHANGED
@@ -20,8 +20,6 @@
20
20
 
21
21
 
22
22
 
23
-
24
-
25
23
  ### 該当のソースコード
26
24
 
27
25
 

1

書式の更新

2020/11/08 01:54

投稿

Kinsho
Kinsho

スコア18

test CHANGED
File without changes
test CHANGED
@@ -22,6 +22,106 @@
22
22
 
23
23
 
24
24
 
25
+ ### 該当のソースコード
26
+
27
+
28
+
29
+ ```c++
30
+
31
+ #include <iostream>
32
+
33
+ #include <string>
34
+
35
+ #include <stdint.h>
36
+
37
+ #include <vector>
38
+
39
+ #include <stdio.h>
40
+
41
+ #include <stdlib.h>
42
+
43
+ #include <omp.h>
44
+
45
+ #include <numeric>
46
+
47
+ #include <cmath>
48
+
49
+ #include <iostream>
50
+
51
+ #include <math.h>
52
+
53
+ #include <iomanip>
54
+
55
+ #include <fstream>
56
+
57
+ #include <sstream>
58
+
59
+ #include <algorithm>
60
+
61
+ #include <chrono>
62
+
63
+ #include <utility>
64
+
65
+ #include <time.h>
66
+
67
+ #include <tuple>
68
+
69
+ #include <cstdint>
70
+
71
+ #include <cstdio>
72
+
73
+ #include <random>
74
+
75
+
76
+
77
+ int N, STEP;
78
+
79
+ using namespace std;
80
+
81
+
82
+
83
+ int main(int argc, char* argv[]) {
84
+
85
+ cout << "N=?\n";
86
+
87
+ cin >> N;
88
+
89
+ cout << "STEP=?\n";
90
+
91
+ cin >> STEP;
92
+
93
+
94
+
95
+ double p[N];
96
+
97
+ #pragma acc kernels
98
+
99
+ #pragma acc loop independent
100
+
101
+ for (long long i = 0; i < N; ++i) {
102
+
103
+
104
+
105
+ for (long long T = 1; T <= STEP; ++T) {
106
+
107
+ p[i]+=1;
108
+
109
+
110
+
111
+ }
112
+
113
+ }
114
+
115
+
116
+
117
+ cout<<"p[5]="<<p[5]<<endl;
118
+
119
+ }
120
+
121
+ ```
122
+
123
+
124
+
25
125
  ### 発生している問題・エラーメッセージ
26
126
 
27
127
 
@@ -120,106 +220,6 @@
120
220
 
121
221
 
122
222
 
123
- ### 該当のソースコード
124
-
125
-
126
-
127
- ```c++
128
-
129
- #include <iostream>
130
-
131
- #include <string>
132
-
133
- #include <stdint.h>
134
-
135
- #include <vector>
136
-
137
- #include <stdio.h>
138
-
139
- #include <stdlib.h>
140
-
141
- #include <omp.h>
142
-
143
- #include <numeric>
144
-
145
- #include <cmath>
146
-
147
- #include <iostream>
148
-
149
- #include <math.h>
150
-
151
- #include <iomanip>
152
-
153
- #include <fstream>
154
-
155
- #include <sstream>
156
-
157
- #include <algorithm>
158
-
159
- #include <chrono>
160
-
161
- #include <utility>
162
-
163
- #include <time.h>
164
-
165
- #include <tuple>
166
-
167
- #include <cstdint>
168
-
169
- #include <cstdio>
170
-
171
- #include <random>
172
-
173
-
174
-
175
- int N, STEP;
176
-
177
- using namespace std;
178
-
179
-
180
-
181
- int main(int argc, char* argv[]) {
182
-
183
- cout << "N=?\n";
184
-
185
- cin >> N;
186
-
187
- cout << "STEP=?\n";
188
-
189
- cin >> STEP;
190
-
191
-
192
-
193
- double p[N];
194
-
195
- #pragma acc kernels
196
-
197
- #pragma acc loop independent
198
-
199
- for (long long i = 0; i < N; ++i) {
200
-
201
-
202
-
203
- for (long long T = 1; T <= STEP; ++T) {
204
-
205
- p[i]+=1;
206
-
207
-
208
-
209
- }
210
-
211
- }
212
-
213
-
214
-
215
- cout<<"p[5]="<<p[5]<<endl;
216
-
217
- }
218
-
219
- ```
220
-
221
-
222
-
223
223
 
224
224
 
225
225