chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
917db08
)
added fortran wrapper for nlopt_copy
author
stevenj
<stevenj@alum.mit.edu>
Wed, 2 Jun 2010 03:50:21 +0000
(23:50 -0400)
committer
stevenj
<stevenj@alum.mit.edu>
Wed, 2 Jun 2010 03:50:21 +0000
(23:50 -0400)
darcs-hash:
20100602035021
-c8de0-
d1fabb203b45275b539e487a4868933cf9551be9
.gz
api/f77funcs_.h
patch
|
blob
|
history
diff --git
a/api/f77funcs_.h
b/api/f77funcs_.h
index 61e29df1f21086f08b38b3bd0a1874104deec8ad..bac7e8204792cb2895e02f049dc576c63e1ff221 100644
(file)
--- a/
api/f77funcs_.h
+++ b/
api/f77funcs_.h
@@
-40,6
+40,15
@@
void F77_(nlo_create,NLO_CREATE)(nlopt_opt *opt, int *alg, int *n)
}
}
+void F77_(nlo_copy,NLO_COPY)(nlopt_opt *nopt, nlopt_opt *opt)
+{
+ *nopt = nlopt_copy(*opt);
+ if (*nopt && nlopt_dup_f_data(*nopt, sizeof(f77_func_data)) < 0) {
+ nlopt_destroy(*nopt);
+ *nopt = NULL;
+ }
+}
+
void F77_(nlo_destroy,NLO_DESTROY)(nlopt_opt *opt)
{
nlopt_destroy(*opt);