Commit 9962dadc authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Improve inline __attribute__ annotation

parent adc8937c
Pipeline #386 failed with stage
in 419 minutes and 13 seconds
......@@ -182,7 +182,7 @@ edges(const undirected_adaptor<Graph>& g)
// edge(u, v, g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline)) __attribute__((flatten))
inline __attribute__((flatten))
auto
edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor v,
......@@ -353,7 +353,7 @@ degree(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
// add_vertex(g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline))
inline __attribute__((flatten))
auto
add_vertex(undirected_adaptor<Graph>& g)
{
......@@ -364,7 +364,7 @@ add_vertex(undirected_adaptor<Graph>& g)
// add_vertex(vp,g)
//==============================================================================
template <class Graph, class VertexProperties>
inline __attribute__((always_inline))
inline __attribute__((flatten))
auto
add_vertex(const VertexProperties& p, undirected_adaptor<Graph>& g)
{
......@@ -375,7 +375,7 @@ add_vertex(const VertexProperties& p, undirected_adaptor<Graph>& g)
// clear_vertex(u,g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline))
inline __attribute__((flatten))
void clear_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
undirected_adaptor<Graph>& g)
{
......@@ -386,7 +386,7 @@ void clear_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_desc
// clear_vertex(u,g,pred)
//==============================================================================
template <class Graph, class Pred>
inline __attribute__((always_inline))
inline __attribute__((flatten))
void clear_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
undirected_adaptor<Graph>& g, Pred&& pred)
{
......@@ -397,7 +397,7 @@ void clear_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_desc
// remove_vertex(u,g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline))
inline __attribute__((flatten))
void remove_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
undirected_adaptor<Graph>& g)
{
......@@ -408,7 +408,7 @@ void remove_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_des
// remove_vertex_fast(u,g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline))
inline __attribute__((flatten))
void remove_vertex_fast(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
undirected_adaptor<Graph>& g)
{
......@@ -419,7 +419,7 @@ void remove_vertex_fast(typename graph_traits<undirected_adaptor<Graph> >::verte
// add_edge(u,v,g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline))
inline __attribute__((flatten))
std::pair<typename graph_traits<undirected_adaptor<Graph> >::edge_descriptor,
bool>
add_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
......@@ -433,7 +433,7 @@ add_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
// add_edge(u,v,ep,g)
//==============================================================================
template <class Graph, class EdgeProperties>
inline __attribute__((always_inline))
inline __attribute__((flatten))
auto
add_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor v,
......@@ -446,7 +446,7 @@ add_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
// remove_edge(u,v,g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline))
inline __attribute__((flatten))
void remove_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor v,
undirected_adaptor<Graph>& g)
......@@ -460,7 +460,7 @@ void remove_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descr
// remove_edge(e,g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline))
inline __attribute__((flatten))
void remove_edge(typename graph_traits<undirected_adaptor<Graph> >::edge_descriptor e,
undirected_adaptor<Graph>& g)
{
......@@ -473,7 +473,7 @@ void remove_edge(typename graph_traits<undirected_adaptor<Graph> >::edge_descrip
// remove_edge(e_iter,g)
//==============================================================================
template <class Graph>
inline __attribute__((always_inline))
inline __attribute__((flatten))
void remove_edge(const typename graph_traits<undirected_adaptor<Graph> >::out_edge_iterator& iter,
undirected_adaptor<Graph>& g)
{
......
......@@ -467,6 +467,7 @@ public:
_epos.shrink_to_fit();
}
__attribute__((always_inline))
void reverse_edge(edge_descriptor& e) const
{
auto& elist = _edges[e.s];
......@@ -694,7 +695,7 @@ vertices(const adj_list<Vertex>& g)
template <class Vertex>
inline __attribute__((flatten))
inline __attribute__((always_inline)) __attribute__((flatten))
std::pair<typename adj_list<Vertex>::edge_iterator,
typename adj_list<Vertex>::edge_iterator>
edges(const adj_list<Vertex>& g)
......@@ -1226,7 +1227,7 @@ void remove_vertex_fast(Vertex v, adj_list<Vertex>& g)
template <class Vertex>
inline
inline __attribute__((always_inline))
Vertex source(const typename adj_list<Vertex>::edge_descriptor& e,
const adj_list<Vertex>&)
{
......@@ -1234,7 +1235,7 @@ Vertex source(const typename adj_list<Vertex>::edge_descriptor& e,
}
template <class Vertex>
inline
inline __attribute__((always_inline))
Vertex target(const typename adj_list<Vertex>::edge_descriptor& e,
const adj_list<Vertex>&)
{
......@@ -1312,6 +1313,7 @@ template <class Vertex>
struct hash<boost::detail::adj_edge_descriptor<Vertex>>
{
template <class Edge>
__attribute__((always_inline))
std::size_t operator()(Edge const& e) const
{
return _h(e.idx);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment