11/* -*- Mode: C; c-basic-offset:4 ; -*- */
22/*
3- * Copyright (c) 2004-2017 The University of Tennessee and The University
3+ * Copyright (c) 2004-2018 The University of Tennessee and The University
44 * of Tennessee Research Foundation. All rights
55 * reserved.
66 * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
@@ -60,9 +60,8 @@ ssize_t opal_datatype_get_element_count( const opal_datatype_t* datatype, size_t
6060 continue ;
6161 }
6262 if ( OPAL_DATATYPE_LOOP == pElems [pos_desc ].elem .common .type ) {
63- ddt_loop_desc_t * loop = & (pElems [pos_desc ].loop );
6463 do {
65- PUSH_STACK ( pStack , stack_pos , pos_desc , OPAL_DATATYPE_LOOP , loop -> loops , 0 );
64+ PUSH_STACK ( pStack , stack_pos , pos_desc , OPAL_DATATYPE_LOOP , pElems [ pos_desc ]. loop . loops , 0 );
6665 pos_desc ++ ;
6766 } while ( OPAL_DATATYPE_LOOP == pElems [pos_desc ].elem .common .type ); /* let's start another loop */
6867 DDT_DUMP_STACK ( pStack , stack_pos , pElems , "advance loops" );
@@ -123,9 +122,8 @@ int32_t opal_datatype_set_element_count( const opal_datatype_t* datatype, size_t
123122 continue ;
124123 }
125124 if ( OPAL_DATATYPE_LOOP == pElems [pos_desc ].elem .common .type ) {
126- ddt_loop_desc_t * loop = & (pElems [pos_desc ].loop );
127125 do {
128- PUSH_STACK ( pStack , stack_pos , pos_desc , OPAL_DATATYPE_LOOP , loop -> loops , 0 );
126+ PUSH_STACK ( pStack , stack_pos , pos_desc , OPAL_DATATYPE_LOOP , pElems [ pos_desc ]. loop . loops , 0 );
129127 pos_desc ++ ;
130128 } while ( OPAL_DATATYPE_LOOP == pElems [pos_desc ].elem .common .type ); /* let's start another loop */
131129 DDT_DUMP_STACK ( pStack , stack_pos , pElems , "advance loops" );
@@ -182,9 +180,8 @@ int opal_datatype_compute_ptypes( opal_datatype_t* datatype )
182180 continue ;
183181 }
184182 if ( OPAL_DATATYPE_LOOP == pElems [pos_desc ].elem .common .type ) {
185- ddt_loop_desc_t * loop = & (pElems [pos_desc ].loop );
186183 do {
187- PUSH_STACK ( pStack , stack_pos , pos_desc , OPAL_DATATYPE_LOOP , loop -> loops , 0 );
184+ PUSH_STACK ( pStack , stack_pos , pos_desc , OPAL_DATATYPE_LOOP , pElems [ pos_desc ]. loop . loops , 0 );
188185 pos_desc ++ ;
189186 } while ( OPAL_DATATYPE_LOOP == pElems [pos_desc ].elem .common .type ); /* let's start another loop */
190187 DDT_DUMP_STACK ( pStack , stack_pos , pElems , "advance loops" );
@@ -194,6 +191,9 @@ int opal_datatype_compute_ptypes( opal_datatype_t* datatype )
194191 datatype -> ptypes [pElems [pos_desc ].elem .common .type ] += pElems [pos_desc ].elem .count ;
195192 nbElems += pElems [pos_desc ].elem .count ;
196193
194+ DUMP ( " compute_ptypes-add: type %d count %" PRIsize_t " (total type %" PRIsize_t " total %lld)\n" ,
195+ pElems [pos_desc ].elem .common .type , datatype -> ptypes [pElems [pos_desc ].elem .common .type ],
196+ pElems [pos_desc ].elem .count , nbElems );
197197 pos_desc ++ ; /* advance to the next data */
198198 }
199199 }
0 commit comments