Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
psrdada_cpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPIfR-BDG
psrdada_cpp
Commits
3026c0b4
Commit
3026c0b4
authored
6 years ago
by
Tobias Winchen
Browse files
Options
Downloads
Patches
Plain Diff
Fix detector accumulator test and 8-bit mode
parent
e3edc797
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
psrdada_cpp/effelsberg/edd/DetectorAccumulator.cuh
+1
-1
1 addition, 1 deletion
psrdada_cpp/effelsberg/edd/DetectorAccumulator.cuh
psrdada_cpp/effelsberg/edd/test/src/DetectorAccumulatorTester.cu
+2
-0
2 additions, 0 deletions
..._cpp/effelsberg/edd/test/src/DetectorAccumulatorTester.cu
with
3 additions
and
1 deletion
psrdada_cpp/effelsberg/edd/DetectorAccumulator.cuh
+
1
−
1
View file @
3026c0b4
...
@@ -30,7 +30,7 @@ void detect_and_accumulate(float2 const* __restrict__ in, int8_t* __restrict__ o
...
@@ -30,7 +30,7 @@ void detect_and_accumulate(float2 const* __restrict__ in, int8_t* __restrict__ o
double
y
=
tmp
.
y
*
tmp
.
y
;
double
y
=
tmp
.
y
*
tmp
.
y
;
sum
+=
x
+
y
;
sum
+=
x
+
y
;
}
}
size_t
toff
=
out_offset
*
nchans
+
currentOutputSpectra
*
nchans
;
size_t
toff
=
out_offset
*
nchans
+
currentOutputSpectra
*
nchans
*
stride
;
out
[
toff
+
i
]
=
(
int8_t
)
((
sum
-
offset
)
/
scale
);
out
[
toff
+
i
]
=
(
int8_t
)
((
sum
-
offset
)
/
scale
);
}
}
...
...
This diff is collapsed.
Click to expand it.
psrdada_cpp/effelsberg/edd/test/src/DetectorAccumulatorTester.cu
+
2
−
0
View file @
3026c0b4
...
@@ -90,10 +90,12 @@ TEST_F(DetectorAccumulatorTester, noise_test)
...
@@ -90,10 +90,12 @@ TEST_F(DetectorAccumulatorTester, noise_test)
}
}
DetectorAccumulator
<
int8_t
>::
InputType
gpu_input
=
host_input
;
DetectorAccumulator
<
int8_t
>::
InputType
gpu_input
=
host_input
;
DetectorAccumulator
<
int8_t
>::
OutputType
gpu_output
;
DetectorAccumulator
<
int8_t
>::
OutputType
gpu_output
;
gpu_output
.
resize
(
gpu_input
.
size
()
/
tscrunch
);
OutputType
host_output
;
OutputType
host_output
;
DetectorAccumulator
<
int8_t
>
detector
(
nchans
,
tscrunch
,
scale
,
0.0
,
_stream
);
DetectorAccumulator
<
int8_t
>
detector
(
nchans
,
tscrunch
,
scale
,
0.0
,
_stream
);
detector
.
detect
(
gpu_input
,
gpu_output
);
detector
.
detect
(
gpu_input
,
gpu_output
);
detect_c_reference
(
host_input
,
host_output
,
nchans
,
tscrunch
,
scale
,
0.0
);
detect_c_reference
(
host_input
,
host_output
,
nchans
,
tscrunch
,
scale
,
0.0
);
CUDA_ERROR_CHECK
(
cudaStreamSynchronize
(
_stream
));
compare_against_host
(
gpu_output
,
host_output
);
compare_against_host
(
gpu_output
,
host_output
);
}
}
...
...
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