1111 */
1212#ifdef GAUXC_HAS_CUDA
1313#include " collocation_common.hpp"
14+ #include " hdf5_test_serialization.hpp"
15+ #include " hdf5_test_serialization_impl.hpp"
1416#include " device/common/collocation_device.hpp"
1517#include " device_specific/cuda_util.hpp"
1618#include < gauxc/basisset_map.hpp>
@@ -215,16 +217,12 @@ void cuda_check_collocation( const std::vector<XCDeviceTask>& tasks,
215217
216218
217219
218- void test_cuda_collocation_masked_combined ( const BasisSet<double >& basis, std::ifstream& in_file , bool grad ) {
220+ void test_cuda_collocation_masked_combined ( const BasisSet<double >& basis, const std::string& filename , bool grad ) {
219221
220222
221223
222224 std::vector<ref_collocation_data> ref_data;
223-
224- {
225- cereal::BinaryInputArchive ar ( in_file );
226- ar ( ref_data );
227- }
225+ read_collocation_data (ref_data, filename);
228226
229227
230228 device_queue stream ( std::make_shared<util::cuda_stream>() );
@@ -264,15 +262,16 @@ void test_cuda_collocation_masked_combined( const BasisSet<double>& basis, std::
264262}
265263
266264void test_cuda_collocation ( const BasisSet<double >& basis,
267- std::ifstream& in_file ) {
265+ const std::string& filename ) {
268266
269- test_cuda_collocation_masked_combined ( basis, in_file , false );
267+ test_cuda_collocation_masked_combined ( basis, filename , false );
270268
271269}
270+
272271void test_cuda_collocation_deriv1 ( const BasisSet<double >& basis,
273- std::ifstream& in_file ) {
272+ const std::string& filename ) {
274273
275- test_cuda_collocation_masked_combined ( basis, in_file , true );
274+ test_cuda_collocation_masked_combined ( basis, filename , true );
276275
277276}
278277
@@ -291,14 +290,11 @@ void test_cuda_collocation_deriv1( const BasisSet<double>& basis,
291290
292291
293292void test_cuda_collocation_shell_to_task ( const BasisSet<double >& basis, const BasisSetMap& basis_map,
294- std::ifstream& in_file , bool grad, bool hess, bool lapl, bool lapl_grad) {
293+ const std::string& filename , bool grad, bool hess, bool lapl, bool lapl_grad) {
295294
296295 // Load reference data
297296 std::vector<ref_collocation_data> ref_data;
298- {
299- cereal::BinaryInputArchive ar ( in_file );
300- ar ( ref_data );
301- }
297+ read_collocation_data (ref_data, filename);
302298
303299 // Populate base task information
304300 device_queue stream ( std::make_shared<util::cuda_stream>() );
@@ -435,35 +431,35 @@ void test_cuda_collocation_shell_to_task( const BasisSet<double>& basis, const
435431
436432
437433void test_cuda_collocation_shell_to_task ( const BasisSet<double >& basis,
438- const BasisSetMap& basis_map, std::ifstream& in_file ) {
434+ const BasisSetMap& basis_map, const std::string& filename ) {
439435
440- test_cuda_collocation_shell_to_task (basis,basis_map,in_file ,false , false , false , false );
436+ test_cuda_collocation_shell_to_task (basis,basis_map,filename ,false , false , false , false );
441437
442438}
443439void test_cuda_collocation_shell_to_task_gradient ( const BasisSet<double >& basis,
444- const BasisSetMap& basis_map, std::ifstream& in_file ) {
440+ const BasisSetMap& basis_map, const std::string& filename ) {
445441
446- test_cuda_collocation_shell_to_task (basis,basis_map,in_file ,true , false , false , false );
442+ test_cuda_collocation_shell_to_task (basis,basis_map,filename ,true , false , false , false );
447443
448444}
449445void test_cuda_collocation_shell_to_task_hessian ( const BasisSet<double >& basis,
450- const BasisSetMap& basis_map, std::ifstream& in_file ) {
446+ const BasisSetMap& basis_map, const std::string& filename ) {
451447
452- test_cuda_collocation_shell_to_task (basis,basis_map,in_file ,true , true , false , false );
448+ test_cuda_collocation_shell_to_task (basis,basis_map,filename ,true , true , false , false );
453449
454450}
455451
456452void test_cuda_collocation_shell_to_task_laplacian ( const BasisSet<double >& basis,
457- const BasisSetMap& basis_map, std::ifstream& in_file ) {
453+ const BasisSetMap& basis_map, const std::string& filename ) {
458454
459- test_cuda_collocation_shell_to_task (basis,basis_map,in_file ,true , false , true , false );
455+ test_cuda_collocation_shell_to_task (basis,basis_map,filename ,true , false , true , false );
460456
461457}
462458
463459void test_cuda_collocation_shell_to_task_lapgrad ( const BasisSet<double >& basis,
464- const BasisSetMap& basis_map, std::ifstream& in_file ) {
460+ const BasisSetMap& basis_map, const std::string& filename ) {
465461
466- test_cuda_collocation_shell_to_task (basis,basis_map,in_file ,true , true , true , true );
462+ test_cuda_collocation_shell_to_task (basis,basis_map,filename ,true , true , true , true );
467463
468464}
469465
0 commit comments