| 122 | } |
| 123 | |
| 124 | int main() { |
| 125 | const unsigned nfill = 6000000; |
| 126 | |
| 127 | printf("baseline %.3f\n", baseline(nfill)); |
| 128 | |
| 129 | printf("1D\n"); |
| 130 | for (int itype = 0; itype < 2; ++itype) { |
| 131 | if (itype == 0) |
| 132 | printf("uniform distribution\n"); |
| 133 | else |
| 134 | printf("normal distribution\n"); |
| 135 | printf("hs_ss %.3f\n", compare_1d<static_tag, array_storage<int>>(nfill, itype)); |
| 136 | printf("hs_sd %.3f\n", compare_1d<static_tag, adaptive_storage<>>(nfill, itype)); |
| 137 | printf("hd_ss %.3f\n", compare_1d<dynamic_tag, array_storage<int>>(nfill, itype)); |
| 138 | printf("hd_sd %.3f\n", compare_1d<dynamic_tag, adaptive_storage<>>(nfill, itype)); |
| 139 | } |
| 140 | |
| 141 | printf("2D\n"); |
| 142 | for (int itype = 0; itype < 2; ++itype) { |
| 143 | if (itype == 0) |
| 144 | printf("uniform distribution\n"); |
| 145 | else |
| 146 | printf("normal distribution\n"); |
| 147 | printf("hs_ss %.3f\n", compare_2d<static_tag, array_storage<int>>(nfill, itype)); |
| 148 | printf("hs_sd %.3f\n", compare_2d<static_tag, adaptive_storage<>>(nfill, itype)); |
| 149 | printf("hd_ss %.3f\n", compare_2d<dynamic_tag, array_storage<int>>(nfill, itype)); |
| 150 | printf("hd_sd %.3f\n", compare_2d<dynamic_tag, adaptive_storage<>>(nfill, itype)); |
| 151 | } |
| 152 | |
| 153 | printf("3D\n"); |
| 154 | for (int itype = 0; itype < 2; ++itype) { |
| 155 | if (itype == 0) |
| 156 | printf("uniform distribution\n"); |
| 157 | else |
| 158 | printf("normal distribution\n"); |
| 159 | printf("hs_ss %.3f\n", compare_3d<static_tag, array_storage<int>>(nfill, itype)); |
| 160 | printf("hs_sd %.3f\n", compare_3d<static_tag, adaptive_storage<>>(nfill, itype)); |
| 161 | printf("hd_ss %.3f\n", compare_3d<dynamic_tag, array_storage<int>>(nfill, itype)); |
| 162 | printf("hd_sd %.3f\n", compare_3d<dynamic_tag, adaptive_storage<>>(nfill, itype)); |
| 163 | } |
| 164 | |
| 165 | printf("6D\n"); |
| 166 | for (int itype = 0; itype < 2; ++itype) { |
| 167 | if (itype == 0) |
| 168 | printf("uniform distribution\n"); |
| 169 | else |
| 170 | printf("normal distribution\n"); |
| 171 | printf("hs_ss %.3f\n", compare_6d<static_tag, array_storage<int>>(nfill, itype)); |
| 172 | printf("hs_sd %.3f\n", compare_6d<static_tag, adaptive_storage<>>(nfill, itype)); |
| 173 | printf("hd_ss %.3f\n", compare_6d<dynamic_tag, array_storage<int>>(nfill, itype)); |
| 174 | printf("hd_sd %.3f\n", compare_6d<dynamic_tag, adaptive_storage<>>(nfill, itype)); |
| 175 | } |
| 176 | } |
nothing calls this directly
no test coverage detected