Skip to content

Commit

Permalink
added wrapper for GFlowForward
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuspetschlies committed Sep 3, 2024
1 parent 907ce3e commit a38f0f9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 27 additions & 1 deletion quda_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -3006,14 +3006,40 @@ void _performGFlowAdjoint ( double * const h_out, double * const h_in, QudaGauge
memcpy ( tempSpinor, h_out, VOLUME*24*sizeof(double) );
}

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

if ( h_out != NULL && h_in != NULL )
{
reorder_spinor_fromQuda ( h_out, inv_param.cpu_prec, 0 );
}
} /* end of _performGFlowAdjoint */

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

/**********************************************************************
* wrapper for GFlowForward
**********************************************************************/
void _performGFlowForward ( double * const h_out, double * const h_in, QudaGaugeSmearParam *smear_param, int const update_gauge )
{
if ( h_out != NULL && h_in != 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 );

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

performGFlowForward ( (void *)h_out, (void *)h_in, &inv_param, smear_param, update_gauge );

if ( h_out != NULL && h_in != NULL )
{
reorder_spinor_fromQuda ( h_out, inv_param.cpu_prec, 0 );
}
} /* end of _performGFlowForward */



2 changes: 2 additions & 0 deletions quda_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,6 @@ void _performWuppertalnStep ( double * const h_out, double * const h_in, unsigne

void _performGFlowAdjoint ( double * const h_out, double * const h_in, QudaGaugeSmearParam *smear_param, int const mb, int const nb, int const store );

void _performGFlowForward ( double * const h_out, double * const h_in, QudaGaugeSmearParam *smear_param, int const update_gauge );

#endif /* QUDA_INTERFACE_H_ */

0 comments on commit a38f0f9

Please sign in to comment.