void
oclEquationOfState(long offsetIP, long offsetID, long imin, long imax, 
		   const real_t Hsmallc, const real_t Hgamma,
		   const int slices, const int Hnxyt,
		   cl_mem qDEV, cl_mem eintDEV, cl_mem cDEV)
{
  WHERE("equation_of_state");
  OCLSETARG11(ker[LoopEOS], qDEV, eintDEV, cDEV, offsetIP, offsetID, imin, imax, Hsmallc, Hgamma, slices, Hnxyt);
  oclLaunchKernel2D(ker[LoopEOS], cqueue, Hnxyt, slices, THREADSSZ, __FILE__, __LINE__);
}                               // equation_of_state
Exemple #2
0
void
oclUpdateConservativeVars(const long idim,
			  const long rowcol,
			  const real_t dtdx,
			  const long Himin,
			  const long Himax,
			  const long Hjmin,
			  const long Hjmax, 
			  const long Hnvar, 
			  const long Hnxt, 
			  const long Hnyt, 
			  const long Hnxyt,
			  const int slices,
			  const int Hnxystep,
			  cl_mem uold,
			  cl_mem u,
			  cl_mem flux)
{
  WHERE("updateConservativeVars");

  if (idim == 1) {
    OCLSETARG12(ker[Loop1KcuUpdate], rowcol, dtdx, uold, u, flux, Himin, Himax, Hnxt, Hnyt, Hnxyt, slices, Hnxystep);
    oclLaunchKernel2D(ker[Loop1KcuUpdate], cqueue, Hnxyt, slices, THREADSSZ, __FILE__, __LINE__);
    if (Hnvar > IP + 1) {
      OCLSETARG13(ker[Loop2KcuUpdate], rowcol, dtdx, uold, u, flux, Himin, Himax, Hnvar, Hnxt, Hnyt, Hnxyt, slices, Hnxystep);
      oclLaunchKernel(ker[Loop2KcuUpdate], cqueue, Hnxyt * slices, THREADSSZ, __FILE__, __LINE__);
    }
  } else {
    OCLSETARG12(ker[Loop3KcuUpdate], rowcol, dtdx, uold, u, flux, Hjmin, Hjmax, Hnxt, Hnyt, Hnxyt, slices, Hnxystep);
    oclLaunchKernel2D(ker[Loop3KcuUpdate], cqueue, Hnxyt, slices, THREADSSZ, __FILE__, __LINE__);
    if (Hnvar > IP + 1) {
      OCLSETARG13(ker[Loop4KcuUpdate], rowcol, dtdx, uold, u, flux, Hjmin, Hjmax, Hnvar, Hnxt, Hnyt, Hnxyt, slices, Hnxystep);
      oclLaunchKernel(ker[Loop4KcuUpdate], cqueue, Hnxyt * slices, THREADSSZ, __FILE__, __LINE__);
    }
  }
}
Exemple #3
0
void
oclGatherConservativeVars(const long idim,
			  const long rowcol,
			  const long Himin,
			  const long Himax,
			  const long Hjmin,
			  const long Hjmax, 
			  const long Hnvar, 
			  const long Hnxt, 
			  const long Hnyt, 
			  const long Hnxyt,
			  const int slices, const int Hnxystep,
			  cl_mem uold,
			  cl_mem u)
{


  WHERE("gatherConservativeVars");
  if (idim == 1) {
    // Gather conservative variables
    OCLSETARG10(ker[Loop1KcuGather], uold, u, rowcol, Hnxt, Himin, Himax, Hnyt, Hnxyt, slices, Hnxystep);
    oclLaunchKernel2D(ker[Loop1KcuGather], cqueue, (Himax - Himin), slices, THREADSSZ, __FILE__, __LINE__);
    if (Hnvar > IP + 1) {
      OCLSETARG11(ker[Loop3KcuGather], uold, u, rowcol, Hnxt, Himin, Himax, Hnyt, Hnxyt, Hnvar, slices, Hnxystep);
      oclLaunchKernel(ker[Loop3KcuGather], cqueue, (Himax - Himin), THREADSSZ, __FILE__, __LINE__);
    }
  } else {
    // Gather conservative variables
    OCLSETARG10(ker[Loop2KcuGather], uold, u, rowcol, Hnxt, Hjmin, Hjmax, Hnyt, Hnxyt, slices, Hnxystep);
    oclLaunchKernel2D(ker[Loop2KcuGather], cqueue, (Hjmax - Hjmin), slices, THREADSSZ, __FILE__, __LINE__);
    if (Hnvar > IP + 1) {
      OCLSETARG11(ker[Loop4KcuGather], uold, u, rowcol, Hnxt, Hjmin, Hjmax, Hnyt, Hnxyt, Hnvar, slices, Hnxystep);
      oclLaunchKernel(ker[Loop4KcuGather], cqueue, (Hjmax - Hjmin), THREADSSZ, __FILE__, __LINE__);
    }
  }
}