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
cf43307d
There was an error fetching the commit references. Please try again later.
Unverified
Commit
cf43307d
authored
6 years ago
by
Recolic Keghart
Browse files
Options
Downloads
Patches
Plain Diff
sync
parent
890565b3
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
+3
-0
3 additions, 0 deletions
hw2/serial.cu
with
3 additions
and
0 deletions
hw2/serial.cu
+
3
−
0
View file @
cf43307d
...
...
@@ -218,7 +218,9 @@ int main(int argc, char **argv) {
//
// move particles
//
rlib
::
cuda_assert
(
cudaDeviceSynchronize
());
r267
::
kernel_fill_dicts
<<<
1
,
1
>>>
(
_dict_buf_ptr
.
get
(),
grid_size
,
particles
,
n
);
rlib
::
cuda_assert
(
cudaDeviceSynchronize
());
const
auto
buffer_size
=
n
;
const
auto
threads
=
std
::
min
(
buffer_size
,
CUDA_MAX_THREAD_PER_BLOCK
);
const
auto
blocks
=
buffer_size
/
CUDA_MAX_THREAD_PER_BLOCK
+
1
;
...
...
@@ -228,6 +230,7 @@ int main(int argc, char **argv) {
rlib
::
cuda_assert
(
cudaDeviceSynchronize
());
//printf("in-kernel debug: dmin=%f\n", r267_stats->dmin);
r267
::
move_helper
<<<
blocks
,
threads
>>>
(
particles
,
size
,
buffer_size
);
rlib
::
cuda_assert
(
cudaDeviceSynchronize
());
//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