* @brief Merge two planes of endpoints into a single vector. * * @param ep_plane1 The endpoints for plane 1. * @param ep_plane2 The endpoints for plane 2. * @param component_plane2 The color component for plane 2. * @param[out] result The merged output. */
| 35 | * @param[out] result The merged output. |
| 36 | */ |
| 37 | static void merge_endpoints( |
| 38 | const endpoints& ep_plane1, |
| 39 | const endpoints& ep_plane2, |
| 40 | unsigned int component_plane2, |
| 41 | endpoints& result |
| 42 | ) { |
| 43 | unsigned int partition_count = ep_plane1.partition_count; |
| 44 | assert(partition_count == 1); |
| 45 | |
| 46 | vmask4 sep_mask = vint4::lane_id() == vint4(component_plane2); |
| 47 | |
| 48 | result.partition_count = partition_count; |
| 49 | result.endpt0[0] = select(ep_plane1.endpt0[0], ep_plane2.endpt0[0], sep_mask); |
| 50 | result.endpt1[0] = select(ep_plane1.endpt1[0], ep_plane2.endpt1[0], sep_mask); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * @brief Attempt to improve weights given a chosen configuration. |
no test coverage detected