File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
3
- * Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
3
+ * Copyright (c) 2017-2019 Amazon.com, Inc. or its affiliates. All Rights
4
4
* reserved.
5
5
* $COPYRIGHT$
6
6
*
@@ -411,6 +411,21 @@ int opal_bp_graph_add_vertex(opal_bp_graph_t *g,
411
411
return OPAL_SUCCESS ;
412
412
}
413
413
414
+ int opal_bp_graph_get_vertex_data (opal_bp_graph_t * g ,
415
+ int v_index ,
416
+ void * * v_data_out )
417
+ {
418
+ opal_bp_graph_vertex_t * v ;
419
+
420
+ v = V_ID_TO_PTR (g , v_index );
421
+ if (NULL == v ) {
422
+ return OPAL_ERR_BAD_PARAM ;
423
+ }
424
+ * v_data_out = v -> v_data ;
425
+
426
+ return OPAL_SUCCESS ;
427
+ }
428
+
414
429
int opal_bp_graph_order (const opal_bp_graph_t * g )
415
430
{
416
431
return NUM_VERTICES (g );
Original file line number Diff line number Diff line change 1
1
/*
2
2
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
3
- * Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
3
+ * Copyright (c) 2017-2019 Amazon.com, Inc. or its affiliates. All Rights
4
4
* reserved.
5
5
* $COPYRIGHT$
6
6
*
@@ -126,6 +126,20 @@ int opal_bp_graph_add_vertex(opal_bp_graph_t *g,
126
126
void * v_data ,
127
127
int * index_out );
128
128
129
+ /**
130
+ * Get a pointer to the vertex data given the graph and vertex index
131
+ * associated with the vertex.
132
+ *
133
+ * @param[in] g graph the vertex belongs to
134
+ * @param[in] v_index integer index of the vertex
135
+ * @param[out] v_data_out data associated with the new vertex, may be NULL.
136
+ *
137
+ * @returns OPAL_SUCCESS or an OMPI error code
138
+ */
139
+ int opal_bp_graph_get_vertex_data (opal_bp_graph_t * g ,
140
+ int v_index ,
141
+ void * * v_data_out );
142
+
129
143
/**
130
144
* compute the order of a graph (number of vertices)
131
145
*
You can’t perform that action at this time.
0 commit comments