Skip to content

Commit 11f1e8a

Browse files
bosilcajsquyres
authored andcommitted
Update the loop stats.
The loop should be updated on each internal iteration. Signed-off-by: George Bosilca <[email protected]> (cherry picked from commit 7848035)
1 parent 091ee94 commit 11f1e8a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

opal/datatype/opal_datatype_get_count.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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" );

0 commit comments

Comments
 (0)