97 const arrangement_t& arr,
98 unsigned char *
const __restrict__ bn,
99 uint64_t *
const __restrict__ M,
100 uint64_t *
const __restrict__ K,
101 const uint64_t upper_bound
105 const uint64_t n = g.get_num_nodes();
106 std::fill(bn, &bn[n], 0);
107 std::fill(K, &K[(n - 3)*(n - 3)], 0);
114 for (
position_t pu = 0ull; pu < n - 3; ++pu) {
116 const node u = arr[pu + 1ull];
120 uint64_t k = g.get_degree(u);
125 k -= bn[u0] + bn[u1];
134 const node ui = arr[i - 1ull];
142 M[ idx(*pu, *i - 3, n-3) ] = k;
153 K[idx(n-4,n-4, n-3)] = M[idx(n-4,n-4, n-3)];
156 uint64_t * __restrict__ next_k_it;
158 uint64_t * __restrict__ m_it;
160 uint64_t * __restrict__ k_it;
162 for (uint64_t ii = 1; ii < n - 3; ++ii) {
163 const uint64_t i = n - 3 - ii - 1;
166 m_it = &M[ idx(i,i, n-3) ];
171 k_it = &K[ idx(i,i, n-3) ];
174 next_k_it = k_it + n - 3;
176 for (uint64_t j = i; j < n - 3; ++j) {
179 *k_it++ = *m_it++ + *next_k_it++;
187 const auto process_neighbors =
201 if (pu < pv and 2 <= pv and pv < n - 1) {
202 C += K[idx(pu,pv-2, n-3)];
206 for (
position pu = 0; pu < n - 3; ++pu) {
209 if constexpr (std::is_base_of_v<graphs::directed_graph, graph_t>) {
212 process_neighbors(pu, v);
213 if constexpr (decide_upper_bound) {
214 if (C > upper_bound) {
return DECIDED_C_GT; }
219 process_neighbors(pu, v);
220 if constexpr (decide_upper_bound) {
221 if (C > upper_bound) {
return DECIDED_C_GT; }
228 process_neighbors(pu, v);
229 if constexpr (decide_upper_bound) {
230 if (C > upper_bound) {
return DECIDED_C_GT; }