Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DP3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ResearchAndDevelopment
DP3
Commits
1b0f14f0
Unverified
Commit
1b0f14f0
authored
Feb 11, 2020
by
André Offringa
Committed by
GitHub
Feb 11, 2020
Browse files
Options
Downloads
Patches
Plain Diff
Account for nterms in calculating size of visbuffer for IDG (#215)
parent
9cacb42e
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
IDGPredict/FacetPredict.h
+4
-3
4 additions, 3 deletions
IDGPredict/FacetPredict.h
with
4 additions
and
3 deletions
IDGPredict/FacetPredict.h
+
4
−
3
View file @
1b0f14f0
...
@@ -90,6 +90,7 @@ public:
...
@@ -90,6 +90,7 @@ public:
{
{
_buffersets
.
clear
();
_buffersets
.
clear
();
idg
::
api
::
Type
proxyType
=
idg
::
api
::
Type
::
CPU_OPTIMIZED
;
idg
::
api
::
Type
proxyType
=
idg
::
api
::
Type
::
CPU_OPTIMIZED
;
size_t
nTerms
=
_readers
.
size
();
size_t
maxChannels
=
0
;
size_t
maxChannels
=
0
;
for
(
std
::
vector
<
double
>&
band
:
_bands
)
for
(
std
::
vector
<
double
>&
band
:
_bands
)
...
@@ -99,14 +100,14 @@ public:
...
@@ -99,14 +100,14 @@ public:
uint64_t
memPerTimestep
=
idg
::
api
::
BufferSet
::
get_memory_per_timestep
(
_nr_stations
,
maxChannels
);
uint64_t
memPerTimestep
=
idg
::
api
::
BufferSet
::
get_memory_per_timestep
(
_nr_stations
,
maxChannels
);
memPerTimestep
*=
2
;
// IDG uses two internal buffer
memPerTimestep
*=
2
;
// IDG uses two internal buffer
// Allow the directions together to use 1/4th of the available memory for the vis buffers.
// Allow the directions together to use 1/4th of the available memory for the vis buffers.
size_t
allocatableTimesteps
=
memory
/
4
/
_images
.
size
()
/
memPerTimestep
;
size_t
allocatableTimesteps
=
memory
/
4
/
_images
.
size
()
/
nTerms
/
memPerTimestep
;
// TODO once a-terms are supported, this should include the size required for the a-terms.
// TODO once a-terms are supported, this should include the size required for the a-terms.
std
::
cout
<<
"Allocatable timesteps per direction: "
<<
allocatableTimesteps
<<
'\n'
;
std
::
cout
<<
"Allocatable timesteps per direction: "
<<
allocatableTimesteps
<<
'\n'
;
int
buffersize
=
std
::
max
(
allocatableTimesteps
,
size_t
(
1
));
int
buffersize
=
std
::
max
(
allocatableTimesteps
,
size_t
(
1
));
idg
::
api
::
options_type
options
;
idg
::
api
::
options_type
options
;
IdgConfiguration
::
Read
(
proxyType
,
buffersize
,
options
);
IdgConfiguration
::
Read
(
proxyType
,
buffersize
,
options
);
std
::
vector
<
ao
::
uvector
<
double
>>
data
(
_readers
.
size
()
);
std
::
vector
<
ao
::
uvector
<
double
>>
data
(
nTerms
);
_metaData
.
clear
();
_metaData
.
clear
();
FitsReader
&
reader
=
_readers
.
front
();
FitsReader
&
reader
=
_readers
.
front
();
for
(
FacetImage
&
img
:
_images
)
for
(
FacetImage
&
img
:
_images
)
...
@@ -118,7 +119,7 @@ public:
...
@@ -118,7 +119,7 @@ public:
std
::
cout
<<
"Initializing gridder "
<<
_buffersets
.
size
()
<<
" ("
<<
img
.
Width
()
<<
" x "
<<
img
.
Height
()
<<
", +"
<<
img
.
OffsetX
()
<<
","
<<
img
.
OffsetY
()
<<
", dl="
<<
dl
*
180.0
/
M_PI
<<
" deg, dm="
<<
dm
*
180.0
/
M_PI
<<
" deg)
\n
"
;
std
::
cout
<<
"Initializing gridder "
<<
_buffersets
.
size
()
<<
" ("
<<
img
.
Width
()
<<
" x "
<<
img
.
Height
()
<<
", +"
<<
img
.
OffsetX
()
<<
","
<<
img
.
OffsetY
()
<<
", dl="
<<
dl
*
180.0
/
M_PI
<<
" deg, dm="
<<
dm
*
180.0
/
M_PI
<<
" deg)
\n
"
;
// TODO make full polarization
// TODO make full polarization
for
(
size_t
term
=
0
;
term
!=
data
.
size
()
;
++
term
)
for
(
size_t
term
=
0
;
term
!=
nTerms
;
++
term
)
{
{
data
[
term
].
assign
(
img
.
Width
()
*
img
.
Height
()
*
4
,
0.0
);
data
[
term
].
assign
(
img
.
Width
()
*
img
.
Height
()
*
4
,
0.0
);
std
::
copy
(
img
.
Data
(
term
),
img
.
Data
(
term
)
+
img
.
Width
()
*
img
.
Height
(),
data
[
term
].
data
());
std
::
copy
(
img
.
Data
(
term
),
img
.
Data
(
term
)
+
img
.
Width
()
*
img
.
Height
(),
data
[
term
].
data
());
...
...
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