@@ -579,8 +579,9 @@ int32_t opal_convertor_prepare_for_recv( opal_convertor_t* convertor,
579579 assert (! (convertor -> flags & CONVERTOR_SEND ));
580580 OPAL_CONVERTOR_PREPARE ( convertor , datatype , count , pUserBuf );
581581
582- if ( convertor -> flags & CONVERTOR_WITH_CHECKSUM ) {
583- if ( !(convertor -> flags & CONVERTOR_HOMOGENEOUS ) ) {
582+ #if defined(CHECKSUM )
583+ if ( OPAL_UNLIKELY (convertor -> flags & CONVERTOR_WITH_CHECKSUM ) ) {
584+ if ( OPAL_UNLIKELY (!(convertor -> flags & CONVERTOR_HOMOGENEOUS )) ) {
584585 convertor -> fAdvance = opal_unpack_general_checksum ;
585586 } else {
586587 if ( convertor -> pDesc -> flags & OPAL_DATATYPE_FLAG_CONTIGUOUS ) {
@@ -589,8 +590,9 @@ int32_t opal_convertor_prepare_for_recv( opal_convertor_t* convertor,
589590 convertor -> fAdvance = opal_generic_simple_unpack_checksum ;
590591 }
591592 }
592- } else {
593- if ( !(convertor -> flags & CONVERTOR_HOMOGENEOUS ) ) {
593+ } else
594+ #endif /* defined(CHECKSUM) */
595+ if ( OPAL_UNLIKELY (!(convertor -> flags & CONVERTOR_HOMOGENEOUS )) ) {
594596 convertor -> fAdvance = opal_unpack_general ;
595597 } else {
596598 if ( convertor -> pDesc -> flags & OPAL_DATATYPE_FLAG_CONTIGUOUS ) {
@@ -599,7 +601,6 @@ int32_t opal_convertor_prepare_for_recv( opal_convertor_t* convertor,
599601 convertor -> fAdvance = opal_generic_simple_unpack ;
600602 }
601603 }
602- }
603604 return OPAL_SUCCESS ;
604605}
605606
@@ -618,6 +619,7 @@ int32_t opal_convertor_prepare_for_send( opal_convertor_t* convertor,
618619
619620 OPAL_CONVERTOR_PREPARE ( convertor , datatype , count , pUserBuf );
620621
622+ #if defined(CHECKSUM )
621623 if ( convertor -> flags & CONVERTOR_WITH_CHECKSUM ) {
622624 if ( CONVERTOR_SEND_CONVERSION == (convertor -> flags & (CONVERTOR_SEND_CONVERSION |CONVERTOR_HOMOGENEOUS )) ) {
623625 convertor -> fAdvance = opal_pack_general_checksum ;
@@ -632,7 +634,8 @@ int32_t opal_convertor_prepare_for_send( opal_convertor_t* convertor,
632634 convertor -> fAdvance = opal_generic_simple_pack_checksum ;
633635 }
634636 }
635- } else {
637+ } else
638+ #endif /* defined(CHECKSUM) */
636639 if ( CONVERTOR_SEND_CONVERSION == (convertor -> flags & (CONVERTOR_SEND_CONVERSION |CONVERTOR_HOMOGENEOUS )) ) {
637640 convertor -> fAdvance = opal_pack_general ;
638641 } else {
@@ -646,7 +649,6 @@ int32_t opal_convertor_prepare_for_send( opal_convertor_t* convertor,
646649 convertor -> fAdvance = opal_generic_simple_pack ;
647650 }
648651 }
649- }
650652 return OPAL_SUCCESS ;
651653}
652654
0 commit comments