Update of /project/cl-gsl/cvsroot/cl-gsl/c
In directory common-lisp.net:/tmp/cvs-serv31440
Modified Files:
cwrapperstub.c
Log Message:
Added wrappers for getting and setting complex vectors. UFFI seems to
require pointers to foreign structures.
Date: Tue Mar 15 04:19:10 2005
Author: edenny
Index: cl-gsl/c/cwrapperstub.c
diff -u cl-gsl/c/cwrapperstub.c:1.2 cl-gsl/c/cwrapperstub.c:1.3
--- cl-gsl/c/cwrapperstub.c:1.2 Fri Mar 4 02:58:57 2005
+++ cl-gsl/c/cwrapperstub.c Tue Mar 15 04:19:08 2005
@@ -502,3 +502,34 @@
ret = &v_view.vector;
return ret;
}
+
+/* ----------------------------------------------------------------- */
+
+void wrap_gsl_vector_complex_float_set(gsl_vector_complex_float *v,
+ const size_t i,
+ gsl_complex_float *z)
+{
+ v->data[2 * i * v->stride] = z->dat[0];
+ v->data[(2 * i * v->stride) + 1] = z->dat[1];
+}
+
+void wrap_gsl_vector_complex_set(gsl_vector_complex *v,
+ const size_t i,
+ gsl_complex *z)
+{
+ v->data[2 * i * v->stride] = z->dat[0];
+ v->data[(2 * i * v->stride) + 1] = z->dat[1];
+}
+
+void wrap_gsl_vector_complex_set_all(gsl_vector_complex *v,
+ gsl_complex *z)
+{
+ gsl_vector_complex_set_all(v , *z);
+}
+
+void wrap_gsl_vector_complex_float_set_all(gsl_vector_complex_float *v,
+ gsl_complex_float *z)
+{
+ gsl_vector_complex_float_set_all(v , *z);
+}
+