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 11/*
22 * 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
44 * reserved.
55 * $COPYRIGHT$
66 *
@@ -411,6 +411,21 @@ int opal_bp_graph_add_vertex(opal_bp_graph_t *g,
411411 return OPAL_SUCCESS ;
412412}
413413
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+
414429int opal_bp_graph_order (const opal_bp_graph_t * g )
415430{
416431 return NUM_VERTICES (g );
Original file line number Diff line number Diff line change 11/*
22 * 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
44 * reserved.
55 * $COPYRIGHT$
66 *
@@ -126,6 +126,20 @@ int opal_bp_graph_add_vertex(opal_bp_graph_t *g,
126126 void * v_data ,
127127 int * index_out );
128128
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+
129143/**
130144 * compute the order of a graph (number of vertices)
131145 *
You can’t perform that action at this time.
0 commit comments