| 98 | // do not choose zero, which indicates invalid. |
| 99 | template<typename T> |
| 100 | __device__ __inline__ static T relabel(const T a, const T b) { |
| 101 | T aa = (a == 0) ? arrayfire::cuda::maxval<T>() : a; |
| 102 | T bb = (b == 0) ? arrayfire::cuda::maxval<T>() : b; |
| 103 | return min(aa, bb); |
| 104 | } |
| 105 | |
| 106 | // Calculates the number of warps at compile time |
| 107 | template<unsigned thread_count> |