Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs267
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
recolic-hust
cs267
Commits
292211ab
There was an error fetching the commit references. Please try again later.
Unverified
Commit
292211ab
authored
6 years ago
by
Recolic Keghart
Browse files
Options
Downloads
Patches
Plain Diff
tiny adj
parent
6aa0b161
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hw2/serial.cu
+4
-2
4 additions, 2 deletions
hw2/serial.cu
with
4 additions
and
2 deletions
hw2/serial.cu
+
4
−
2
View file @
292211ab
...
...
@@ -194,10 +194,12 @@ int main(int argc, char **argv) {
const
auto
buffer_size
=
n
;
const
auto
threads
=
std
::
min
(
n
,
CUDA_MAX_THREAD_PER_BLOCK
);
const
auto
blocks
=
buffer_size
/
CUDA_MAX_THREAD_PER_BLOCK
+
1
;
printf
(
"debug: blocks=%d, threads=%d
\n
"
,
blocks
,
threads
);
//
printf("debug: blocks=%d, threads=%d\n", blocks, threads);
r267
::
apply_force_helper
<<<
blocks
,
threads
>>>
(
particles
,
buffer_size
,
_dict_buf_ptr
.
get
(),
grid_size
,
&
r267_stats
->
dmin
,
&
r267_stats
->
davg
,
&
r267_stats
->
navg
);
printf
(
"in-kernel debug: navg=%d
\n
"
,
r267_stats
->
navg
);
rlib
::
cuda_assert
(
cudaDeviceSynchronize
());
//printf("in-kernel debug: navg=%d\n", r267_stats->navg);
r267
::
move_helper
<<<
blocks
,
threads
>>>
(
particles
,
size
,
buffer_size
);
rlib
::
cuda_assert
(
cudaDeviceSynchronize
());
//for (int i = 0; i < n; i++)
// ::move(particles[i]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment