Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Frida
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coenen, Joachim
Frida
Commits
7f63973c
Commit
7f63973c
authored
14 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
icurve/extern interface
parent
5ebbd363
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
pub/src/curve.cpp
+15
-5
15 additions, 5 deletions
pub/src/curve.cpp
pub/test/test_curve_ci
+0
-0
0 additions, 0 deletions
pub/test/test_curve_ci
pub/test/test_curve_ci.c
+8
-1
8 additions, 1 deletion
pub/test/test_curve_ci.c
with
23 additions
and
6 deletions
pub/src/curve.cpp
+
15
−
5
View file @
7f63973c
...
...
@@ -117,8 +117,8 @@ ask_again:
" - 1*int: the number of data points N
\n
"
" - N*double: the data points
\n
"
"- write to stdout a whitespace separated list of:
\n
"
" - N*double: the curve values
\n
"
;
// "for examples, see /usr/local/share/frida/demo-curve-c"
" - N*double: the curve values
\n
"
"- write to error messages to stderr
\n
"
;
goto
ask_again
;
}
else
if
(
resp
==
"hci"
)
{
cout
<<
...
...
@@ -127,8 +127,8 @@ ask_again:
" - 1*int: the number of parameters M
\n
"
" - M*double: the parameters
\n
"
"- write to stdout a whitespace separated list of:
\n
"
" -
1*int: the number of data pairs N
\n
"
"
- N*2*double: a sequence of data pairs: x0 y0 x1 y1 x2 y2 ...
\n
"
;
" -
N*2*double: a sequence of data pairs: x0 y0 x1 y1 x2 y2 ...
\n
"
"
- write to error messages to stderr
\n
"
;
goto
ask_again
;
}
else
if
(
resp
==
"c"
)
{
evaMode
=
COlc
::
_SCR
;
...
...
@@ -198,10 +198,20 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
throw
"SYSTEM ERROR cannot open "
+
par_fifonam
;
fcntl
(
par_fifo
,
F_SETFL
,
O_NONBLOCK
);
for
(
uint
ip
=
0
;
ip
<
nPar
();
++
ip
)
{
string
out
=
str
(
format
(
"%i "
)
%
nPar
()
);
write
(
par_fifo
,
out
.
c_str
(),
out
.
size
()
);
for
(
uint
ip
=
0
;
ip
<
nPar
();
++
ip
)
{
string
out
=
str
(
format
(
"%g "
)
%
VC
(
j
)
->
P
[
ip
]
);
write
(
par_fifo
,
out
.
c_str
(),
out
.
size
()
);
}
if
(
evaMode
==
_SCR
)
{
string
out
=
str
(
format
(
"%i "
)
%
nPar
()
);
write
(
par_fifo
,
out
.
c_str
(),
out
.
size
()
);
for
(
uint
i
=
0
;
i
<
vt
.
size
();
++
i
)
{
string
out
=
str
(
format
(
"%g "
)
%
vt
[
i
]
);
write
(
par_fifo
,
out
.
c_str
(),
out
.
size
()
);
}
}
close
(
par_fifo
);
CSpec
S
;
...
...
This diff is collapsed.
Click to expand it.
pub/test/test_curve_ci
+
0
−
0
View file @
7f63973c
No preview for this file type
This diff is collapsed.
Click to expand it.
pub/test/test_curve_ci.c
+
8
−
1
View file @
7f63973c
...
...
@@ -52,9 +52,16 @@ int main( int argc, char **argv )
// Read parameters from stdin:
// fprintf( stderr, "# test_curve_ci\n" );
scanf
(
"%i"
,
&
m
);
if
(
m
!=
M
+
1
)
{
fprintf
(
stderr
,
"inconsistent number of parameters: %i offered, %i needed
\n
"
,
m
,
M
+
1
);
return
-
1
;
}
scanf
(
"%lg"
,
&
t0
);
// fprintf( stderr, "# t0 %g\n", t0 );
for
(
m
=
0
;
m
<
M
;
++
m
)
{
for
(
m
=
0
;
m
<
M
;
++
m
)
{
double
val
;
scanf
(
"%lg"
,
&
val
);
P
.
k
[
m
]
=
val
>
0
?
val
:
0
;
...
...
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