Skip to content
Snippets Groups Projects
Commit 5189ef94 authored by Danny Auble's avatar Danny Auble
Browse files

BGQ - Add the _find_distance() function used in previous commit.

parent 11991cf8
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,9 @@ static bool _mp_used(ba_mp_t* ba_mp, int dim);
/** */
static bool _mp_out_used(ba_mp_t* ba_mp, int dim);
/** */
static uint16_t _find_distance(uint16_t start, uint16_t end, int dim);
extern void ba_create_system()
{
int a,x,y,z, i = 0, dim;
......@@ -1660,3 +1663,11 @@ static bool _mp_out_used(ba_mp_t* ba_mp, int dim)
return false;
}
static uint16_t _find_distance(uint16_t start, uint16_t end, int dim)
{
if (end < start)
return (((DIM_SIZE[dim]-1) - start) + end) * 4;
else
return (end - start) * 4;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment