Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
b082a6b9
Commit
b082a6b9
authored
16 years ago
by
John Romein
Browse files
Options
Downloads
Patches
Plain Diff
bug 225:
Other way of determining PSet dimensions.
parent
9d453cfc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
RTCP/CNProc/src/CN_Processing_main.cc
+1
-7
1 addition, 7 deletions
RTCP/CNProc/src/CN_Processing_main.cc
RTCP/FCNP/src/fcnp_cn.cc
+25
-9
25 additions, 9 deletions
RTCP/FCNP/src/fcnp_cn.cc
RTCP/FCNP/src/fcnp_cn.h
+1
-2
1 addition, 2 deletions
RTCP/FCNP/src/fcnp_cn.h
with
27 additions
and
18 deletions
RTCP/CNProc/src/CN_Processing_main.cc
+
1
−
7
View file @
b082a6b9
...
...
@@ -102,13 +102,7 @@ int main(int argc, char **argv)
#if defined HAVE_ZOID && defined HAVE_BGL
ionStream
=
new
ZoidClientStream
;
#elif 1 && defined HAVE_FCNP && defined HAVE_BGP
std
::
vector
<
unsigned
>
psetDimensions
(
3
);
psetDimensions
[
0
]
=
4
;
psetDimensions
[
1
]
=
2
;
psetDimensions
[
2
]
=
2
;
FCNP_CN
::
init
(
psetDimensions
);
FCNP_CN
::
init
();
ionStream
=
new
FCNP_ClientStream
;
#elif 0
ionStream
=
new
NullStream
;
...
...
This diff is collapsed.
Click to expand it.
RTCP/FCNP/src/fcnp_cn.cc
+
25
−
9
View file @
b082a6b9
...
...
@@ -402,21 +402,37 @@ static void initHeaders()
}
static
void
getConfiguration
(
const
std
::
vector
<
unsigned
>
&
psetDimensions
)
static
void
getConfiguration
()
{
unsigned
xPos
=
personality
.
Network_Config
.
Xcoord
;
unsigned
yPos
=
personality
.
Network_Config
.
Ycoord
;
unsigned
zPos
=
personality
.
Network_Config
.
Zcoord
;
assert
(
psetDimensions
.
size
()
==
3
);
unsigned
xPsetSize
,
yPsetSize
,
zPsetSize
;
unsigned
psetSize
=
personality
.
Network_Config
.
PSetSize
;
unsigned
xPsetSize
=
psetDimensions
[
0
];
unsigned
yPsetSize
=
psetDimensions
[
1
];
unsigned
zPsetSize
=
psetDimensions
[
2
];
switch
(
psetSize
)
{
case
16
:
xPsetSize
=
4
,
yPsetSize
=
2
,
zPsetSize
=
2
;
break
;
case
32
:
xPsetSize
=
4
,
yPsetSize
=
4
,
zPsetSize
=
2
;
break
;
case
64
:
xPsetSize
=
4
,
yPsetSize
=
4
,
zPsetSize
=
4
;
break
;
case
128
:
xPsetSize
=
4
,
yPsetSize
=
4
,
zPsetSize
=
8
;
break
;
assert
(
xPsetSize
*
yPsetSize
*
zPsetSize
==
psetSize
);
case
256
:
xPsetSize
=
8
,
yPsetSize
=
4
,
zPsetSize
=
8
;
break
;
case
512
:
xPsetSize
=
8
,
yPsetSize
=
8
,
zPsetSize
=
8
;
break
;
default
:
std
::
cerr
<<
"FCNP: cannot determine PSet dimensions"
<<
std
::
endl
;
exit
(
1
);
}
unsigned
xPsetPos
=
xPos
%
xPsetSize
;
unsigned
yPsetPos
=
yPos
%
yPsetSize
;
...
...
@@ -487,11 +503,11 @@ static void drainFIFO()
}
void
init
(
const
std
::
vector
<
unsigned
>
&
psetDimensions
)
void
init
()
{
getPersonality
();
openShm
();
getConfiguration
(
psetDimensions
);
getConfiguration
();
initHeaders
();
allocateMutexes
();
drainFIFO
();
...
...
This diff is collapsed.
Click to expand it.
RTCP/FCNP/src/fcnp_cn.h
+
1
−
2
View file @
b082a6b9
...
...
@@ -7,8 +7,7 @@
namespace
FCNP_CN
{
// /proc/personality.sh gives wrong BG_PSETSIZE; provide dimensions manually
void
init
(
const
std
::
vector
<
unsigned
>
&
psetDimensions
);
void
init
();
// ptr and size must be a multiple of 16!
void
CNtoION_ZeroCopy
(
const
void
*
ptr
,
size_t
size
);
...
...
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