Skip to content

Commit 12cc299

Browse files
committed
Avoid direct use of INFINITY.
It's not very portable. Per buildfarm.
1 parent f941d03 commit 12cc299

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/backend/lib/bipartite_match.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
#include "lib/bipartite_match.h"
2323
#include "miscadmin.h"
24-
#include "utils/palloc.h"
24+
#include "utils/builtins.h"
25+
2526

2627
static bool hk_breadth_search(BipartiteMatchState *state);
2728
static bool hk_depth_search(BipartiteMatchState *state, int u, int depth);
@@ -87,7 +88,7 @@ hk_breadth_search(BipartiteMatchState *state)
8788
int qtail = 0; /* so don't have to worry about wrapping */
8889
int u;
8990

90-
distance[0] = INFINITY;
91+
distance[0] = get_float4_infinity();
9192

9293
for (u = 1; u <= usize; ++u)
9394
{
@@ -97,7 +98,7 @@ hk_breadth_search(BipartiteMatchState *state)
9798
queue[qhead++] = u;
9899
}
99100
else
100-
distance[u] = INFINITY;
101+
distance[u] = get_float4_infinity();
101102
}
102103

103104
while (qtail < qhead)
@@ -156,6 +157,6 @@ hk_depth_search(BipartiteMatchState *state, int u, int depth)
156157
}
157158
}
158159

159-
distance[u] = INFINITY;
160+
distance[u] = get_float4_infinity();
160161
return false;
161162
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy