@@ -101,11 +101,10 @@ MpiParallelMngBuildInfo(MPI_Comm comm)
101
101
::MPI_Comm_rank (comm,&comm_rank);
102
102
::MPI_Comm_size (comm,&comm_nb_rank);
103
103
104
- m_dispatchers_ref = makeRef <MP::Dispatchers>(new MP::Dispatchers () );
104
+ m_dispatchers_ref = createRef <MP::Dispatchers>();
105
105
MP::Mpi::MpiMessagePassingMng::BuildInfo bi (comm_rank,comm_nb_rank,m_dispatchers_ref.get (),mpi_comm);
106
106
107
- auto * mp = new MP::Mpi::MpiMessagePassingMng (bi);
108
- m_message_passing_mng_ref = makeRef<MP::MessagePassingMng>(mp);
107
+ m_message_passing_mng_ref = createRef<MP::Mpi::MpiMessagePassingMng>(bi);
109
108
}
110
109
111
110
/* ---------------------------------------------------------------------------*/
@@ -309,7 +308,7 @@ class MpiParallelMngUtilsFactory
309
308
else if (m_synchronizer_version == 5 ){
310
309
if (do_print)
311
310
tm ->info () << " Using MpiSynchronizer V5" ;
312
- topology_info = makeRef<IVariableSynchronizerMpiCommunicator>( new VariableSynchronizerMpiCommunicator ( mpi_pm) );
311
+ topology_info = createRef<VariableSynchronizerMpiCommunicator>( mpi_pm);
313
312
#if defined(ARCANE_HAS_MPI_NEIGHBOR)
314
313
generic_factory = arcaneCreateMpiNeighborVariableSynchronizerFactory (mpi_pm,topology_info);
315
314
#else
@@ -323,9 +322,11 @@ class MpiParallelMngUtilsFactory
323
322
}
324
323
if (!generic_factory.get ())
325
324
ARCANE_FATAL (" No factory created" );
326
- return makeRef<IVariableSynchronizer>( new MpiVariableSynchronizer ( pm,group,generic_factory,topology_info) );
325
+ return createRef<MpiVariableSynchronizer>( pm,group,generic_factory,topology_info);
327
326
}
327
+
328
328
private:
329
+
329
330
Integer m_synchronizer_version = 1 ;
330
331
Int32 m_synchronize_block_size = 32000 ;
331
332
Int32 m_synchronize_nb_sequence = 1 ;
@@ -353,7 +354,7 @@ MpiParallelMng(const MpiParallelMngBuildInfo& bi)
353
354
, m_is_communicator_owned(bi.is_mpi_comm_owned)
354
355
, m_mpi_lock(bi.mpi_lock)
355
356
, m_non_blocking_collective(nullptr )
356
- , m_utils_factory(makeRef<IParallelMngUtilsFactory>( new MpiParallelMngUtilsFactory() ))
357
+ , m_utils_factory(createRef<MpiParallelMngUtilsFactory>( ))
357
358
{
358
359
if (!m_world_parallel_mng){
359
360
m_trace->debug ()<<" [MpiParallelMng] No m_world_parallel_mng found, reverting to ourselves!" ;
@@ -872,8 +873,7 @@ class MpiParallelMng::RequestList
872
873
Ref<IRequestList> MpiParallelMng::
873
874
createRequestListRef ()
874
875
{
875
- IRequestList* x = new RequestList (this );
876
- return makeRef (x);
876
+ return createRef<RequestList>(this );
877
877
}
878
878
879
879
/* ---------------------------------------------------------------------------*/
0 commit comments