Macros | Functions | Variables
mmc_cl_host.c File Reference

OpenCL host code for OpenCL based MMC simulations. More...

#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "mmc_cl_host.h"
#include "mmc_const.h"
#include "mmc_tictoc.h"
Include dependency graph for mmc_cl_host.c:

Macros

#define IPARAM_TO_MACRO(macro, a, b)   sprintf(macro+strlen(macro)," -Dgcfg%s=%u ", #b,(a.b))
 
#define FPARAM_TO_MACRO(macro, a, b)   sprintf(macro+strlen(macro)," -Dgcfg%s=%.10ef ",#b,(a.b))
 

Functions

void mmc_run_cl (mcconfig *cfg, tetmesh *mesh, raytracer *tracer)
 

Variables

const char * sourceflag []
 
cl_event kernelevent
 

Detailed Description

OpenCL host code for OpenCL based MMC simulations.

Variable Documentation

◆ sourceflag

const char* sourceflag[]
Initial value:
= {"-DMCX_SRC_PENCIL", "-DMCX_SRC_ISOTROPIC", "-DMCX_SRC_CONE",
"-DMCX_SRC_GAUSSIAN", "-DMCX_SRC_PLANAR", "-DMCX_SRC_PATTERN", "-DMCX_SRC_FOURIER",
"-DMCX_SRC_ARCSINE", "-DMCX_SRC_DISK", "-DMCX_SRC_FOURIERX", "-DMCX_SRC_FOURIERX2D",
"-DMCX_SRC_ZGAUSSIAN", "-DMCX_SRC_LINE", "-DMCX_SRC_SLIT", "-DMCX_SRC_PENCILARRAY",
"-DMCX_SRC_PATTERN3D"
}

In this unit, we first launch a master thread and initialize the necessary data structures. This include the command line options (cfg), tetrahedral mesh (mesh) and the ray-tracer precomputed data (tracer).