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
f96794c7
Commit
f96794c7
authored
18 years ago
by
wierenga
Browse files
Options
Downloads
Patches
Plain Diff
BugID: 778
Add function to check if all states match some given state.
parent
aa3faeb1
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
MAC/APL/RTCCommon/include/APL/RTCCommon/RegisterState.h
+3
-1
3 additions, 1 deletion
MAC/APL/RTCCommon/include/APL/RTCCommon/RegisterState.h
MAC/APL/RTCCommon/src/RegisterState.cc
+7
-1
7 additions, 1 deletion
MAC/APL/RTCCommon/src/RegisterState.cc
with
10 additions
and
2 deletions
MAC/APL/RTCCommon/include/APL/RTCCommon/RegisterState.h
+
3
−
1
View file @
f96794c7
...
@@ -112,7 +112,9 @@ namespace LOFAR {
...
@@ -112,7 +112,9 @@ namespace LOFAR {
void
clear
(
int
i
=
-
1
);
void
clear
(
int
i
=
-
1
);
void
reset
(
int
i
=
-
1
);
void
reset
(
int
i
=
-
1
);
State
get
(
int
i
);
State
get
(
int
i
)
const
;
int
getMatchCount
(
blitz
::
Range
r
,
State
matchstate
)
const
;
void
print
(
std
::
ostream
&
out
)
const
;
void
print
(
std
::
ostream
&
out
)
const
;
public
:
public
:
...
...
This diff is collapsed.
Click to expand it.
MAC/APL/RTCCommon/src/RegisterState.cc
+
7
−
1
View file @
f96794c7
...
@@ -27,13 +27,19 @@
...
@@ -27,13 +27,19 @@
using
namespace
std
;
using
namespace
std
;
using
namespace
LOFAR
;
using
namespace
LOFAR
;
using
namespace
RTC
;
using
namespace
RTC
;
using
namespace
blitz
;
RegisterState
::
State
RegisterState
::
get
(
int
i
)
RegisterState
::
State
RegisterState
::
get
(
int
i
)
const
{
{
ASSERT
(
i
>=
0
&&
i
<
m_state
.
extent
(
blitz
::
firstDim
));
ASSERT
(
i
>=
0
&&
i
<
m_state
.
extent
(
blitz
::
firstDim
));
return
m_state
(
i
);
return
m_state
(
i
);
}
}
int
RegisterState
::
getMatchCount
(
Range
r
,
State
matchstate
)
const
{
return
sum
(
where
(
m_state
(
r
)
==
matchstate
,
1
,
0
));
}
void
RegisterState
::
print
(
std
::
ostream
&
out
)
const
void
RegisterState
::
print
(
std
::
ostream
&
out
)
const
{
{
for
(
int
i
=
0
;
i
<
m_state
.
extent
(
blitz
::
firstDim
);
i
++
)
{
for
(
int
i
=
0
;
i
<
m_state
.
extent
(
blitz
::
firstDim
);
i
++
)
{
...
...
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