summaryrefslogtreecommitdiff
path: root/thirdparty/includes/GSL/gsl/gsl_vector_complex.h
diff options
context:
space:
mode:
authorAnkitr192017-07-04 15:33:41 +0530
committerAnkitr192017-07-04 15:33:41 +0530
commit5b9f48de8fe9af5d4b4a3bea0eb3baacd2bc7950 (patch)
tree7f2f4c1784898f975c05095b505f047d77361d87 /thirdparty/includes/GSL/gsl/gsl_vector_complex.h
parentafae3013c86d26dc1b233228431be208705acff0 (diff)
parenta3dfa2a4069740517ca6e83f99dd4e0dbb71c377 (diff)
downloadscilab2c-5b9f48de8fe9af5d4b4a3bea0eb3baacd2bc7950.tar.gz
scilab2c-5b9f48de8fe9af5d4b4a3bea0eb3baacd2bc7950.tar.bz2
scilab2c-5b9f48de8fe9af5d4b4a3bea0eb3baacd2bc7950.zip
New functions added and rpi issues resolved
Diffstat (limited to 'thirdparty/includes/GSL/gsl/gsl_vector_complex.h')
-rw-r--r--thirdparty/includes/GSL/gsl/gsl_vector_complex.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/thirdparty/includes/GSL/gsl/gsl_vector_complex.h b/thirdparty/includes/GSL/gsl/gsl_vector_complex.h
new file mode 100644
index 00000000..e56d6a61
--- /dev/null
+++ b/thirdparty/includes/GSL/gsl/gsl_vector_complex.h
@@ -0,0 +1,17 @@
+#ifndef __GSL_VECTOR_COMPLEX_H__
+#define __GSL_VECTOR_COMPLEX_H__
+
+#define GSL_VECTOR_REAL(z, i) ((z)->data[2*(i)*(z)->stride])
+#define GSL_VECTOR_IMAG(z, i) ((z)->data[2*(i)*(z)->stride + 1])
+
+#if GSL_RANGE_CHECK
+#define GSL_VECTOR_COMPLEX(zv, i) (((i) >= (zv)->size ? (gsl_error ("index out of range", __FILE__, __LINE__, GSL_EINVAL), 0):0 , *GSL_COMPLEX_AT((zv),(i))))
+#else
+#define GSL_VECTOR_COMPLEX(zv, i) (*GSL_COMPLEX_AT((zv),(i)))
+#endif
+
+#define GSL_COMPLEX_AT(zv,i) ((gsl_complex*)&((zv)->data[2*(i)*(zv)->stride]))
+#define GSL_COMPLEX_FLOAT_AT(zv,i) ((gsl_complex_float*)&((zv)->data[2*(i)*(zv)->stride]))
+#define GSL_COMPLEX_LONG_DOUBLE_AT(zv,i) ((gsl_complex_long_double*)&((zv)->data[2*(i)*(zv)->stride]))
+
+#endif /* __GSL_VECTOR_COMPLEX_H__ */