Skip to content

Commit

Permalink
gradient flow functions temporaily CPP-bracketed out
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuspetschlies committed May 21, 2024
1 parent c0bc1de commit 49bff7c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 10 deletions.
55 changes: 45 additions & 10 deletions quda_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -2153,33 +2153,68 @@ void _performWuppertalnStep ( double * const h_out, double * const h_in, unsigne

/**********************************************************************/
/**********************************************************************/


#if 0
/**********************************************************************
*
* wrapper for gradient flow on gauge and fermion field
**********************************************************************/
void _performGFlownStep ( double * const h_out, double * const h_in, QudaGaugeSmearParam *smear_param, int const init ) {

void _performGFlownStep ( double * const h_out, double * const h_in, QudaGaugeSmearParam *smear_p, int const update_gauge )
{
if ( h_out != h_in ) {
memcpy ( h_out, h_in, VOLUME*24*sizeof(double) );
}
/* reorder_spinor_toQuda ( h_out, inv_param.cpu_prec, 0, NULL ); */
reorder_spinor_toQuda ( h_out, inv_param.cpu_prec, 0);

memcpy ( tempSpinor, h_out, VOLUME*24*sizeof(double) );

performGFlownStep( (void *)h_out, (void*)tempSpinor, &inv_param, smear_param, init );


/* performGFlownStep( (void *)h_out, (void*)tempSpinor, &inv_param, n_steps, step_size, meas_interval, wflow_type, init ); */

performGFlownStep ( (void *)h_out, (void *)tempSpinor, &inv_param, smear_p, update_gauge );

/* reorder_spinor_fromQuda ( h_out, inv_param.cpu_prec, 0, NULL ); */
reorder_spinor_fromQuda ( h_out, inv_param.cpu_prec, 0 );

#if 0
/* reorder the flowed gauge field to cvc layout */
reorder_gauge_fromQuda ( gauge_flowed, gauge_quda );
#endif

} /* end of _performGFlownStep */

#endif // of if 0

/**********************************************************************/
/**********************************************************************/

#if 0
/**********************************************************************
* wrapper for adjoint gradient flow on gauge and fermion field
**********************************************************************/
void _performGFlowAdjoint ( double * const h_out, double * const h_in, QudaGaugeSmearParam *smear_p, int const mb, int const nb, int const store )
{
if ( h_in != NULL && h_out != NULL )
{
if ( h_out != h_in )
{
memcpy ( h_out, h_in, VOLUME*24*sizeof(double) );
}
/* reorder_spinor_toQuda ( h_out, inv_param.cpu_prec, 0, NULL ); */
reorder_spinor_toQuda ( h_out, inv_param.cpu_prec, 0);

memcpy ( tempSpinor, h_out, VOLUME*24*sizeof(double) );
}

performGFlowAdjoint ( (void *)h_out, (void *)tempSpinor, &inv_param, smear_p, mb, nb, store );

if ( h_out != NULL )
{
/* reorder_spinor_fromQuda ( h_out, inv_param.cpu_prec, 0, NULL ); */
reorder_spinor_fromQuda ( h_out, inv_param.cpu_prec, 0 );
}

} /* end of _performGFlowAdjoint */
#endif // of if 0

/**********************************************************************/
/**********************************************************************/

Expand Down
6 changes: 6 additions & 0 deletions quda_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,10 @@ int invert_eo_quda_twoflavour_mshift(spinor ** const out_up, spinor ** const out
void compute_gauge_derivative_quda(monomial * const mnl, hamiltonian_field_t * const hf);
void compute_WFlow_quda(const double eps ,const double tmax, const int traj, FILE* outfile);

#if 0
void _performGFlownStep ( double * const h_out, double * const h_in, QudaGaugeSmearParam *smear_param, int const update_gauge );

void _performGFlowAdjoint ( double * const h_out, double * const h_in, QudaGaugeSmearParam *smear_param, int const mb, int const nb, int const store );
#endif // of if 0

#endif /* QUDA_INTERFACE_H_ */

0 comments on commit 49bff7c

Please sign in to comment.