inputfileparser
This commit is contained in:
14
include/amscudafractallevelset/amscfls_functiondefs.cuh
Normal file
14
include/amscudafractallevelset/amscfls_functiondefs.cuh
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef __AMSCLFLS_FUNCTIONDEFS_CUH__
|
||||
#define __AMSCLFLS_FUNCTIONDEFS_CUH__
|
||||
|
||||
#ifdef AMSCLS_MANDELBROT
|
||||
struct main_functionpars
|
||||
{
|
||||
public:
|
||||
int fractaliter;
|
||||
float threshold;
|
||||
float freezethresh;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
43
include/amscudafractallevelset/amscfls_parseinput.cuh
Normal file
43
include/amscudafractallevelset/amscfls_parseinput.cuh
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef __AMSCFLS_PARSEINPUT_CUH__
|
||||
#define __AMSCFLS_PARSEINPUT_CUH__
|
||||
|
||||
namespace amscuda
|
||||
{
|
||||
namespace fractallevelset
|
||||
{
|
||||
|
||||
struct inputpars
|
||||
{
|
||||
public:
|
||||
cuvec3f xyz_min;
|
||||
cuvec3f xyz_max;
|
||||
int Nx;
|
||||
int Ny;
|
||||
int Nz;
|
||||
int nblockdiv;
|
||||
int nthreads;
|
||||
|
||||
bool isjulia;
|
||||
cuvec3f juliac;
|
||||
float exponent;
|
||||
|
||||
|
||||
|
||||
int operatingmode;
|
||||
int verbosity;
|
||||
|
||||
__host__ __device__ inputpars();
|
||||
};
|
||||
|
||||
int parse_input(const char *fname, inputpars *pars);
|
||||
|
||||
void inputmain(int argc, char *argv[]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};//end namespaces
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -38,6 +38,11 @@ class cuvec4f;
|
||||
// #define AMSCU_CONST
|
||||
// #endif
|
||||
|
||||
#define AMSCLS_MANDELBROT
|
||||
//#define AMSCLS_JULIA
|
||||
//#define AMSCLS_PPKFRACTAL
|
||||
|
||||
|
||||
namespace amscuda
|
||||
{
|
||||
namespace fractallevelset
|
||||
@ -45,18 +50,10 @@ namespace fractallevelset
|
||||
|
||||
__device__ __host__ int isignf(float f);
|
||||
|
||||
struct main_functionpars
|
||||
{
|
||||
public:
|
||||
int fractaliter;
|
||||
float threshold;
|
||||
float freezethresh;
|
||||
};
|
||||
#include <amscudafractallevelset/amscfls_functiondefs.cuh>
|
||||
|
||||
__host__ __device__ float main_function(cuvec3f pos, main_functionpars &pars);
|
||||
|
||||
|
||||
|
||||
class bagoftriangles
|
||||
{
|
||||
public:
|
||||
@ -160,18 +157,26 @@ struct marchingtet_pars
|
||||
__device__ __host__ marchingtet_pars();
|
||||
};
|
||||
|
||||
}; //end namespaces
|
||||
};
|
||||
|
||||
#include <amscudafractallevelset/amscfls_parseinput.cuh>
|
||||
|
||||
namespace amscuda
|
||||
{
|
||||
namespace fractallevelset
|
||||
{
|
||||
///////////
|
||||
// Tests //
|
||||
///////////
|
||||
void test_tetorientation();
|
||||
void test_mtcube_triangulation();
|
||||
void test_marchingtets();
|
||||
void hausdorff_test();
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
};//end namespaces
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user