Tensor_Create

PURPOSE ^

C/C++ source

SYNOPSIS ^

C/C++ source

DESCRIPTION ^

C/C++ source

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 #include <stdio.h>
0002 #include <stdlib.h>
0003 #include <math.h>
0004 #include "Fokker_Planck_DKE_loop.h"
0005 
0006 void Tensor_Create(int ndims,int* sizedim,struct Tensor *A)
0007 {int i;
0008 
0009 (*A).ndims=ndims;
0010 
0011 (*A).sizedim=malloc(ndims*sizeof(int));
0012 for(i=0;ifor(i=0;i/*printf("sizedim=%d,%d\n",i,(*A).sizedim[i]);
0020 printf("size=%i\n",(*A).size);*/
0021 }
0022 (*A).vals=malloc((*A).size*sizeof(DOUBLE));
0023 /*printf("Done creating tensor\n");
0024 printf("Csize=%i\n",(*A).size);
0025 fprintf(stdout,"YP5******************\n");*/
0026 }

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.