Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Cresson Remi
GRM
Commits
a57529d7
Commit
a57529d7
authored
Nov 06, 2017
by
Gaetano Raffaele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: platform check for int64 type, will be __int64 for WIN32, long unsigned int otherwise
parent
ea78cfb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
include/grmGraphOperations.txx
include/grmGraphOperations.txx
+2
-2
include/grmNeighborhood.h
include/grmNeighborhood.h
+8
-2
src/grmNeighborhood.cxx
src/grmNeighborhood.cxx
+2
-2
No files found.
include/grmGraphOperations.txx
View file @
a57529d7
...
@@ -39,7 +39,7 @@ namespace grm
...
@@ -39,7 +39,7 @@ namespace grm
{
{
for(auto& r : seg.m_Graph.m_Nodes)
for(auto& r : seg.m_Graph.m_Nodes)
{
{
__int64
neighborhood[4];
NeighIDType
neighborhood[4];
FOURNeighborhood(neighborhood, r->m_Id, width, height);
FOURNeighborhood(neighborhood, r->m_Id, width, height);
for(short j = 0; j < 4; ++j)
for(short j = 0; j < 4; ++j)
{
{
...
@@ -53,7 +53,7 @@ namespace grm
...
@@ -53,7 +53,7 @@ namespace grm
{
{
for(auto& r : seg.m_Graph.m_Nodes)
for(auto& r : seg.m_Graph.m_Nodes)
{
{
__int64
neighborhood[8];
NeighIDType
neighborhood[8];
EIGHTNeighborhood(neighborhood, r->m_Id, width, height);
EIGHTNeighborhood(neighborhood, r->m_Id, width, height);
bool haveNeighbors = false;
bool haveNeighbors = false;
for(short j = 0; j < 8; ++j)
for(short j = 0; j < 8; ++j)
...
...
include/grmNeighborhood.h
View file @
a57529d7
...
@@ -20,16 +20,22 @@
...
@@ -20,16 +20,22 @@
#include <cstddef>
#include <cstddef>
#if defined(_WIN32)
typedef
__int64
NeighIDType
;
#else
typedef
long
unsigned
int
NeighIDType
;
#endif
enum
CONNECTIVITY
{
FOUR
=
0
,
EIGHT
};
enum
CONNECTIVITY
{
FOUR
=
0
,
EIGHT
};
namespace
grm
namespace
grm
{
{
void
FOURNeighborhood
(
__int64
*
neighborhood
,
void
FOURNeighborhood
(
NeighIDType
*
neighborhood
,
const
std
::
size_t
id
,
const
std
::
size_t
id
,
const
unsigned
int
width
,
const
unsigned
int
width
,
const
unsigned
int
height
);
const
unsigned
int
height
);
void
EIGHTNeighborhood
(
__int64
*
neighborhood
,
void
EIGHTNeighborhood
(
NeighIDType
*
neighborhood
,
const
std
::
size_t
id
,
const
std
::
size_t
id
,
const
unsigned
int
width
,
const
unsigned
int
width
,
const
unsigned
int
height
);
const
unsigned
int
height
);
...
...
src/grmNeighborhood.cxx
View file @
a57529d7
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
namespace
grm
namespace
grm
{
{
void
FOURNeighborhood
(
__int64
*
neighborhood
,
void
FOURNeighborhood
(
NeighIDType
*
neighborhood
,
const
std
::
size_t
id
,
const
std
::
size_t
id
,
const
unsigned
int
width
,
const
unsigned
int
width
,
const
unsigned
int
height
)
const
unsigned
int
height
)
...
@@ -40,7 +40,7 @@ namespace grm
...
@@ -40,7 +40,7 @@ namespace grm
neighborhood
[
3
]
=
(
x
>
0
?
(
id
-
1
)
:
-
1
);
neighborhood
[
3
]
=
(
x
>
0
?
(
id
-
1
)
:
-
1
);
}
}
void
EIGHTNeighborhood
(
__int64
*
neighborhood
,
void
EIGHTNeighborhood
(
NeighIDType
*
neighborhood
,
const
std
::
size_t
id
,
const
std
::
size_t
id
,
const
unsigned
int
width
,
const
unsigned
int
width
,
const
unsigned
int
height
)
const
unsigned
int
height
)
...
...
Write
Preview
Markdown
is supported
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