@@ -161,7 +161,7 @@ static void asm2_solve(const struct box *box) {
161161}
162162
163163template <typename T>
164- static void asm1_setup (struct box *box, const jl_opts *opts, double tol, const struct comm *comm) {
164+ static void asm1_setup (struct box *box, double tol, const struct comm *comm) {
165165 buffer *bfr = &(box->bfr );
166166 struct comm *local = &(box->local );
167167
@@ -214,15 +214,16 @@ static void asm1_setup(struct box *box, const jl_opts *opts, double tol, const s
214214
215215 // Setup ASM1 solver.
216216 box->asm1 = NULL ;
217- switch (opts-> asm1 ) {
217+ switch (box-> opts . asm1 ) {
218218 case BOX_XXT:
219- box->asm1 = (void *)crs_xxt_setup (box->sn , tmp_vtx, nnz, ia, ja, va, opts->dom , opts->null_space , local);
219+ box->asm1 = (void *)crs_xxt_setup (box->sn , tmp_vtx, nnz, ia, ja, va,
220+ box->opts .dom , box->opts .null_space , local);
220221 break ;
221222 case BOX_CHOLMOD:
222- asm1_cholmod_setup (A, null_space, box, opts );
223+ asm1_cholmod_setup (A, null_space, box);
223224 break ;
224225 case BOX_GPU:
225- asm1_gpu_setup (A, null_space, box, opts );
226+ asm1_gpu_setup (A, null_space, box);
226227 break ;
227228 }
228229
@@ -240,7 +241,7 @@ static void asm1_setup(struct box *box, const jl_opts *opts, double tol, const s
240241}
241242
242243template <typename T>
243- static void cpu_setup (struct box *box, const jl_opts *opts ) {
244+ static void cpu_setup (struct box *box) {
244245 uint work_array_size = MAX (box->sn , *(nekData.box_n ));
245246 box->sx = malloc (sizeof (T) * 2 * work_array_size);
246247 box->srhs = (void *)((T *)box->sx + work_array_size);
@@ -293,7 +294,7 @@ static void gpu_setup(struct box *box) {
293294 T *inv_mul = tcalloc (T, box->sn );
294295 for (uint i = 0 ; i < box->un ; i++)
295296 inv_mul[i] = 1.0 ;
296- gs (inv_mul, opts-> dom , gs_add, 0 , box->gsh , &(box->bfr ));
297+ gs (inv_mul, box-> opts . dom , gs_add, 0 , box->gsh , &(box->bfr ));
297298 for (uint i = 0 ; i < box->sn ; i++)
298299 inv_mul[i] = 1.0 / inv_mul[i];
299300 o_invmul.copyFrom (inv_mul);
@@ -326,14 +327,14 @@ struct box *crs_box_setup(uint n, const ulong *id, uint nnz, const uint *Ai, con
326327 const double tol = 1e-12 ;
327328 switch (opts->dom ) {
328329 case gs_double:
329- asm1_setup<double >(box, opts, tol, comm);
330- cpu_setup<double >(box, opts );
331- gpu_setup<double >(box, opts );
330+ asm1_setup<double >(box, tol, comm);
331+ cpu_setup<double >(box);
332+ gpu_setup<double >(box);
332333 break ;
333334 case gs_float:
334- asm1_setup<float >(box, opts, tol, comm);
335- cpu_setup<float >(box, opts );
336- gpu_setup<float >(box, opts );
335+ asm1_setup<float >(box, tol, comm);
336+ cpu_setup<float >(box);
337+ gpu_setup<float >(box);
337338 break ;
338339 default :
339340 break ;
0 commit comments