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
3bbc6779
Commit
3bbc6779
authored
7 years ago
by
Ewan Barr
Browse files
Options
Downloads
Patches
Plain Diff
fixed the thread count for the unpacker
parent
c06ed862
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
psrdada_cpp/effelsberg/edd/eddfft.cuh
+3
-1
3 additions, 1 deletion
psrdada_cpp/effelsberg/edd/eddfft.cuh
psrdada_cpp/effelsberg/edd/src/eddfft.cu
+7
-7
7 additions, 7 deletions
psrdada_cpp/effelsberg/edd/src/eddfft.cu
with
10 additions
and
8 deletions
psrdada_cpp/effelsberg/edd/eddfft.cuh
+
3
−
1
View file @
3bbc6779
...
...
@@ -6,6 +6,8 @@
#include
"thrust/host_vector.h"
#include
"cufft.h"
#define NTHREADS_UNPACK 512
namespace
psrdada_cpp
{
namespace
effelsberg
{
namespace
edd
{
...
...
@@ -15,7 +17,7 @@ namespace kernels {
void
unpack_edd_12bit_to_float32
(
uint64_t
*
__restrict__
in
,
float
*
__restrict__
out
,
int
n
);
__global__
void
detect_and_accumulate
(
cufftComplex
*
__restrict__
in
,
float
*
__restrict__
out
,
int
nchans
,
int
nsamps
,
int
naccumulate
)
void
detect_and_accumulate
(
cufftComplex
*
__restrict__
in
,
float
*
__restrict__
out
,
int
nchans
,
int
nsamps
,
int
naccumulate
)
;
}
//kernels
...
...
This diff is collapsed.
Click to expand it.
psrdada_cpp/effelsberg/edd/src/eddfft.cu
+
7
−
7
View file @
3bbc6779
...
...
@@ -39,8 +39,8 @@ void unpack_edd_12bit_to_float32(uint64_t* __restrict__ in, float* __restrict__
* Note: This kernels will not work with more than 512 threads.
*/
__shared__
volatile
float
tmp_out
[
NTHREADS
*
16
];
__shared__
volatile
uint64_t
tmp_in
[
NTHREADS
*
3
];
__shared__
volatile
float
tmp_out
[
NTHREADS
_UNPACK
*
16
];
__shared__
volatile
uint64_t
tmp_in
[
NTHREADS
_UNPACK
*
3
];
int
block_idx
=
blockIdx
.
x
;
uint64_t
val
;
...
...
@@ -51,10 +51,10 @@ void unpack_edd_12bit_to_float32(uint64_t* __restrict__ in, float* __restrict__
{
//Read to shared memeory
int
block_read_start
=
block_idx
*
NTHREADS
*
3
;
int
block_read_start
=
block_idx
*
NTHREADS
_UNPACK
*
3
;
tmp_in
[
threadIdx
.
x
]
=
in
[
block_read_start
+
threadIdx
.
x
];
tmp_in
[
NTHREADS
+
threadIdx
.
x
]
=
in
[
block_read_start
+
NTHREADS
+
threadIdx
.
x
];
tmp_in
[
NTHREADS
*
2
+
threadIdx
.
x
]
=
in
[
block_read_start
+
NTHREADS
*
2
+
threadIdx
.
x
];
tmp_in
[
NTHREADS
_UNPACK
+
threadIdx
.
x
]
=
in
[
block_read_start
+
NTHREADS
_UNPACK
+
threadIdx
.
x
];
tmp_in
[
NTHREADS
_UNPACK
*
2
+
threadIdx
.
x
]
=
in
[
block_read_start
+
NTHREADS
_UNPACK
*
2
+
threadIdx
.
x
];
__syncthreads
();
...
...
@@ -83,9 +83,9 @@ void unpack_edd_12bit_to_float32(uint64_t* __restrict__ in, float* __restrict__
__syncthreads
();
int
block_write_start
=
block_idx
*
NTHREADS
*
16
;
int
block_write_start
=
block_idx
*
NTHREADS
_UNPACK
*
16
;
for
(
int
ii
=
threadIdx
.
x
;
ii
<
16
*
NTHREADS
;
ii
+=
blockDim
.
x
)
for
(
int
ii
=
threadIdx
.
x
;
ii
<
16
*
NTHREADS
_UNPACK
;
ii
+=
blockDim
.
x
)
{
out
[
block_write_start
+
ii
]
=
tmp_out
[
ii
];
}
...
...
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