Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
9962dadc
Commit
9962dadc
authored
Oct 23, 2017
by
Tiago Peixoto
Browse files
Improve inline __attribute__ annotation
parent
adc8937c
Pipeline
#386
failed with stage
in 419 minutes and 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/graph/graph_adaptor.hh
View file @
9962dadc
...
...
@@ -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
)
{
...
...
src/graph/graph_adjacency.hh
View file @
9962dadc
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment