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
5ce8991d
Commit
5ce8991d
authored
5 years ago
by
Tobias Winchen
Browse files
Options
Downloads
Patches
Plain Diff
Added profile mode to gated spectrometer
parent
7255049f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
psrdada_cpp/effelsberg/edd/src/GatedSpectrometer_cli.cu
+21
-2
21 additions, 2 deletions
psrdada_cpp/effelsberg/edd/src/GatedSpectrometer_cli.cu
with
21 additions
and
2 deletions
psrdada_cpp/effelsberg/edd/src/GatedSpectrometer_cli.cu
+
21
−
2
View file @
5ce8991d
...
@@ -53,6 +53,25 @@ void launchSpectrometer(const effelsberg::edd::DadaBufferLayout &dadaBufferLayou
...
@@ -53,6 +53,25 @@ void launchSpectrometer(const effelsberg::edd::DadaBufferLayout &dadaBufferLayou
DadaInputStream
<
decltype
(
spectrometer
)
>
istream
(
dadaBufferLayout
.
getInputkey
(),
log
,
DadaInputStream
<
decltype
(
spectrometer
)
>
istream
(
dadaBufferLayout
.
getInputkey
(),
log
,
spectrometer
);
spectrometer
);
istream
.
start
();
istream
.
start
();
}
else
if
(
output_type
==
"profile"
)
{
NullSink
sink
;
effelsberg
::
edd
::
GatedSpectrometer
<
decltype
(
sink
)
>
spectrometer
(
dadaBufferLayout
,
selectedSideChannel
,
selectedBit
,
fft_length
,
naccumulate
,
nbits
,
input_level
,
output_level
,
sink
);
std
::
vector
<
char
>
buffer
(
dadaBufferLayout
.
getBufferSize
());
cudaHostRegister
(
buffer
.
data
(),
buffer
.
size
(),
cudaHostRegisterPortable
);
RawBytes
ib
(
buffer
.
data
(),
buffer
.
size
(),
buffer
.
size
());
spectrometer
.
init
(
ib
);
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
std
::
cout
<<
"Profile Block: "
<<
i
+
1
<<
std
::
endl
;
spectrometer
(
ib
);
}
}
}
else
else
{
{
...
@@ -96,7 +115,7 @@ int main(int argc, char **argv) {
...
@@ -96,7 +115,7 @@ int main(int argc, char **argv) {
"string)"
);
"string)"
);
desc
.
add_options
()(
desc
.
add_options
()(
"output_type"
,
po
::
value
<
std
::
string
>
(
&
output_type
)
->
default_value
(
output_type
),
"output_type"
,
po
::
value
<
std
::
string
>
(
&
output_type
)
->
default_value
(
output_type
),
"output type [dada, file]. Default is file."
"output type [dada, file
, profile
]. Default is file.
Profile executes the spectrometer 10x on random data and passes the ouput to a null sink.
"
);
);
desc
.
add_options
()(
desc
.
add_options
()(
"output_bit_depth"
,
po
::
value
<
unsigned
int
>
(
&
output_bit_depth
)
->
default_value
(
8
),
"output_bit_depth"
,
po
::
value
<
unsigned
int
>
(
&
output_bit_depth
)
->
default_value
(
8
),
...
@@ -167,7 +186,7 @@ int main(int argc, char **argv) {
...
@@ -167,7 +186,7 @@ int main(int argc, char **argv) {
}
}
po
::
notify
(
vm
);
po
::
notify
(
vm
);
if
(
vm
.
count
(
"output_type"
)
&&
(
!
(
output_type
==
"dada"
||
output_type
==
"file"
)
))
if
(
vm
.
count
(
"output_type"
)
&&
(
!
(
output_type
==
"dada"
||
output_type
==
"file"
||
output_type
==
"profile"
)
))
{
{
throw
po
::
validation_error
(
po
::
validation_error
::
invalid_option_value
,
"output_type"
,
output_type
);
throw
po
::
validation_error
(
po
::
validation_error
::
invalid_option_value
,
"output_type"
,
output_type
);
}
}
...
...
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