| 201 | output.resize(input_size / 64); |
| 202 | } |
| 203 | void Exec(const std::vector<int64_t>& input) { |
| 204 | size_t input_size = input.size(); |
| 205 | |
| 206 | for (size_t index = 0; index < input_size / 64; index++) { |
| 207 | size_t value = 0; |
| 208 | for (size_t bit = 0; bit < 64; bit++) { |
| 209 | value |= input[index * 64 + bit] > 0; |
| 210 | value <<= 1; |
| 211 | } |
| 212 | greater_0[index] = value; |
| 213 | } |
| 214 | for (size_t index = 0; index < input_size / 64; index++) { |
| 215 | size_t value = 0; |
| 216 | for (size_t bit = 0; bit < 64; bit++) { |
| 217 | value |= input[index * 64 + bit] < 20; |
| 218 | value <<= 1; |
| 219 | } |
| 220 | less_20[index] = value; |
| 221 | } |
| 222 | |
| 223 | for (size_t index = 0; index < input_size / 64; index++) { |
| 224 | output[index] = greater_0[index] & less_20[index]; |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | private: |
| 229 | std::vector<int64_t> greater_0; |