#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <signal.h>
#include <limits.h>
#include <CL/cl.h>
#include "mmh_intf.h"
#include "aph_intf.h"
#include "uth_intf.h"
#include "uth_system.h"
#include "uth_log.h"
#include "lin_alg_intf.h"
#include "pdh_control_intf.h"
#include "pdh_intf.h"
#include "tmh_intf.h"
#include "tmh_ocl.h"
#include "tmh_ocl_num_int.h"
Defines | |
#define | ONE_EL_ONE_THREAD |
#define | ONE_EL_ONE_THREAD_KERNEL 0 |
#define | ONE_EL_TWO_THREADS_KERNEL 1 |
#define | ONE_EL_ONE_WORKGROUP_KERNEL 2 |
#define | NR_EXEC_PARAMS 16 |
#define | MIN_NR_ELEMS_PER_WORK_GROUP WORK_GROUP_SIZE |
Functions | |
int | tmr_ocl_create_assembly_structures (const int Problem_id, const int nr_int_ent, const int nr_dof_ent, const int max_dofs_int_ent, const int nrdofs_glob, const int block_size, double *geo_dofs_vector, double *dofs_vector_current, double *dofs_vector_prev_iter, double *dofs_vector_prev_step, int nr_dof_blocks_all_int_ent, int *pos_first_dof_int_ent, int *local_to_global, int *global_to_posglob, const int nr_asse_blocks_all_int_ent, int *asse_pos_first_dof_int_ent, int *assembly_table, const int ngauss, SCALAR *gauss_dat_all_color_host, const int nshape, SCALAR *shape_fun_dat_all_color_host, const int ngeo, int *ngeo_color_p, SCALAR *el_geo_dat_all_color_host, const int nr_elems, const int all_el_pde_coeff_size, const int one_el_pde_coeff_size, const int one_int_p_pde_coeff_size, SCALAR *el_pde_dat_host) |
int | tmr_ocl_free_assembly_structures () |
int | tmr_ocl_create_assemble_stiff_mat_elem (int Problem_id, int Comp_type, int *Pdeg_coarse_p, int Nr_elems, int First_asse_elem_index, int First_geo_index, int First_pde_index) |
int | tmr_ocl_create_solver_structures_crs (int Nrdof_glob, int nnz, int *crs_col_ind, int *crs_row_ptr, double *crs_val, double *rhs) |
int | tmr_ocl_get_solver_structures_crs (int *nnz, cl_mem *crs_col_ind, cl_mem *crs_row_ptr, cl_mem *crs_val, cl_mem *rhs) |
int | tmr_ocl_free_solver_structures_crs () |
int | tmr_ocl_merge_solver_structures () |
int | tmr_ocl_create_num_int_kernel (int Platform_index, int Device_index, int Kernel_index, char *Kernel_name, const char *Kernel_file, int Monitor) |
Variables | |
tmt_ocl_problem_struct | tmv_ocl_problem_struct |
#define MIN_NR_ELEMS_PER_WORK_GROUP WORK_GROUP_SIZE |
#define NR_EXEC_PARAMS 16 |
#define ONE_EL_ONE_THREAD |
#define ONE_EL_ONE_THREAD_KERNEL 0 |
#define ONE_EL_ONE_WORKGROUP_KERNEL 2 |
#define ONE_EL_TWO_THREADS_KERNEL 1 |
int tmr_ocl_create_assemble_stiff_mat_elem | ( | int | Problem_id, | |
int | Comp_type, | |||
int * | Pdeg_coarse_p, | |||
int | Nr_elems, | |||
int | First_asse_elem_index, | |||
int | First_geo_index, | |||
int | First_pde_index | |||
) |
int tmr_ocl_create_assembly_structures | ( | const int | Problem_id, | |
const int | nr_int_ent, | |||
const int | nr_dof_ent, | |||
const int | max_dofs_int_ent, | |||
const int | nrdofs_glob, | |||
const int | block_size, | |||
double * | geo_dofs_vector, | |||
double * | dofs_vector_current, | |||
double * | dofs_vector_prev_iter, | |||
double * | dofs_vector_prev_step, | |||
int | nr_dof_blocks_all_int_ent, | |||
int * | pos_first_dof_int_ent, | |||
int * | local_to_global, | |||
int * | global_to_posglob, | |||
const int | nr_asse_blocks_all_int_ent, | |||
int * | asse_pos_first_dof_int_ent, | |||
int * | assembly_table, | |||
const int | ngauss, | |||
SCALAR * | gauss_dat_all_color_host, | |||
const int | nshape, | |||
SCALAR * | shape_fun_dat_all_color_host, | |||
const int | ngeo, | |||
int * | ngeo_color_p, | |||
SCALAR * | el_geo_dat_all_color_host, | |||
const int | nr_elems, | |||
const int | all_el_pde_coeff_size, | |||
const int | one_el_pde_coeff_size, | |||
const int | one_int_p_pde_coeff_size, | |||
SCALAR * | el_pde_dat_host | |||
) |
int tmr_ocl_create_num_int_kernel | ( | int | Platform_index, | |
int | Device_index, | |||
int | Kernel_index, | |||
char * | Kernel_name, | |||
const char * | Kernel_file, | |||
int | Monitor | |||
) |
int tmr_ocl_create_solver_structures_crs | ( | int | Nrdof_glob, | |
int | nnz, | |||
int * | crs_col_ind, | |||
int * | crs_row_ptr, | |||
double * | crs_val, | |||
double * | rhs | |||
) |
int tmr_ocl_free_assembly_structures | ( | ) |
int tmr_ocl_free_solver_structures_crs | ( | ) |
int tmr_ocl_get_solver_structures_crs | ( | int * | nnz, | |
cl_mem * | crs_col_ind, | |||
cl_mem * | crs_row_ptr, | |||
cl_mem * | crs_val, | |||
cl_mem * | rhs | |||
) |
int tmr_ocl_merge_solver_structures | ( | ) |