summaryrefslogtreecommitdiff
path: root/External_Functions/Resources/Include/gsl_per_alloc.c
diff options
context:
space:
mode:
authorbansodanurag2019-02-26 13:22:28 +0530
committerGitHub2019-02-26 13:22:28 +0530
commit9bc7cbe32906c97e864df0ad76ba0801333b71a9 (patch)
tree326db71d86607189e0ca7c3132fbb58616e3ee59 /External_Functions/Resources/Include/gsl_per_alloc.c
downloadOpenmodelica-gsl-library-9bc7cbe32906c97e864df0ad76ba0801333b71a9.tar.gz
Openmodelica-gsl-library-9bc7cbe32906c97e864df0ad76ba0801333b71a9.tar.bz2
Openmodelica-gsl-library-9bc7cbe32906c97e864df0ad76ba0801333b71a9.zip
Add files via upload
Diffstat (limited to 'External_Functions/Resources/Include/gsl_per_alloc.c')
-rw-r--r--External_Functions/Resources/Include/gsl_per_alloc.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/External_Functions/Resources/Include/gsl_per_alloc.c b/External_Functions/Resources/Include/gsl_per_alloc.c
new file mode 100644
index 0000000..3faa008
--- /dev/null
+++ b/External_Functions/Resources/Include/gsl_per_alloc.c
@@ -0,0 +1,30 @@
+#include<stdio.h>
+#include<gsl/gsl_permutation.h>
+/*typedef struct{
+size_t size;
+int* data;
+}OM_gsl_permutation;
+*/
+
+
+void* gsl_per_alloc(size_t N)
+{
+ gsl_permutation* p = gsl_permutation_alloc(N);
+ for(int i = 0; i < N; i++)
+ {
+ (p->data)[i] = 0;
+ }
+ return (void*) p;
+ /*OM_gsl_permutation* OM_gsl_per = malloc(sizeof(OM_gsl_permutation));
+ if ( OM_gsl_per == NULL ) ModelicaError("Not enough memory");
+ return (void*) OM_gsl_per;*/
+}
+
+/*void OM_gsl_permutation_free(void* p)
+{
+ OM_gsl_permutation* OM_gsl_per = (OM_gsl_permutation*) p;
+ if (OM_gsl_per != NULL)
+ {
+ free(OM_gsl_per);
+ }
+}*/