Lines Matching refs:petscmatformat

126 PetscErrorCode TimedSpMV(Mat A, Vec b, PetscReal *time, const char *petscmatformat, PetscBool use_g…  in TimedSpMV()  argument
135 PetscCall(PetscStrcmp(petscmatformat, MATAIJCUSPARSE, &isaijcusparse)); in TimedSpMV()
136 PetscCall(PetscStrcmp(petscmatformat, MATAIJHIPSPARSE, &isaijhipsparse)); in TimedSpMV()
137 PetscCall(PetscStrcmp(petscmatformat, MATAIJKOKKOS, &isaijkokkos)); in TimedSpMV()
138 PetscCall(PetscStrcmp(petscmatformat, MATSELLCUDA, &issellcuda)); in TimedSpMV()
139 PetscCall(PetscStrcmp(petscmatformat, MATSELLHIP, &issellhip)); in TimedSpMV()
149 PetscCall(MatSetType(A2, petscmatformat)); in TimedSpMV()
167 PetscErrorCode WarmUpDevice(Mat A, Vec b, const char *petscmatformat) in WarmUpDevice() argument
175 PetscCall(PetscStrcmp(petscmatformat, MATAIJCUSPARSE, &isaijcusparse)); in WarmUpDevice()
176 PetscCall(PetscStrcmp(petscmatformat, MATAIJHIPSPARSE, &isaijhipsparse)); in WarmUpDevice()
177 PetscCall(PetscStrcmp(petscmatformat, MATAIJKOKKOS, &isaijkokkos)); in WarmUpDevice()
178 PetscCall(PetscStrcmp(petscmatformat, MATSELLCUDA, &issellcuda)); in WarmUpDevice()
179 PetscCall(PetscStrcmp(petscmatformat, MATSELLHIP, &issellhip)); in WarmUpDevice()
186 PetscCall(MatSetType(A2, petscmatformat)); in WarmUpDevice()
196 …ogSpMVTime(PetscReal *gputime, PetscReal *cputime, PetscReal *gpuflops, const char *petscmatformat) in PetscLogSpMVTime() argument
223 PetscErrorCode MapToPetscMatType(const char *matformat, PetscBool use_gpu, char **petscmatformat) in MapToPetscMatType() argument
232 PetscCall(PetscStrallocpy(MATAIJCUSPARSE, petscmatformat)); in MapToPetscMatType()
235 PetscCall(PetscStrallocpy(MATAIJHIPSPARSE, petscmatformat)); in MapToPetscMatType()
237 } else PetscCall(PetscStrallocpy(MATAIJ, petscmatformat)); in MapToPetscMatType()
243 PetscCall(PetscStrallocpy(MATSELLCUDA, petscmatformat)); in MapToPetscMatType()
246 PetscCall(PetscStrallocpy(MATSELLHIP, petscmatformat)); in MapToPetscMatType()
248 } else PetscCall(PetscStrallocpy(MATSELL, petscmatformat)); in MapToPetscMatType()
251 if (iscsrkokkos) PetscCall(PetscStrallocpy(MATAIJKOKKOS, petscmatformat)); in MapToPetscMatType()
328 char *petscmatformat = NULL; in main() local
329 PetscCall(MapToPetscMatType(matformats[j], use_gpu, &petscmatformat)); in main()
330 …PetscCheck(petscmatformat, PETSC_COMM_WORLD, PETSC_ERR_USER_INPUT, "Invalid mat format %s, support… in main()
338 if (use_gpu) PetscCall(WarmUpDevice(A, b, petscmatformat)); in main()
339 PetscCall(TimedSpMV(A, b, NULL, petscmatformat, use_gpu, repetitions)); in main()
340 if (use_gpu) PetscCall(PetscLogSpMVTime(&spmv_times[i], NULL, NULL, petscmatformat)); in main()
341 else PetscCall(PetscLogSpMVTime(NULL, &spmv_times[i], NULL, petscmatformat)); in main()
353 if (use_gpu) PetscCall(WarmUpDevice(A, b, petscmatformat)); in main()
354 PetscCall(TimedSpMV(A, b, &spmv_time, petscmatformat, use_gpu, repetitions)); in main()
357 PetscCall(PetscFree(petscmatformat)); in main()