| 4127 | |
| 4128 | |
| 4129 | void CellEngine::n_spinsbank() |
| 4130 | { |
| 4131 | long bonds; |
| 4132 | |
| 4133 | #define SPINSBANK ( \ |
| 4134 | ((((xx + x) ^ (yy + y) ^ phase) & 1) /* spatio-temporal phase */ \ |
| 4135 | ? c /* stay the same if true */ \ |
| 4136 | : (((c & 3) ^ /* else xor center with the following */ \ |
| 4137 | ((bonds = SUM4REG(1)), \ |
| 4138 | (bonds = ((c & 1) /* if center then subtract from 4 */ \ |
| 4139 | ? (4 - bonds) \ |
| 4140 | : (bonds))), \ |
| 4141 | (((bonds == 0) || /* case 0, 4 */ \ |
| 4142 | (bonds == 4)) \ |
| 4143 | ? 0 /* xor with 0 */ \ |
| 4144 | : ((bonds == 2) /* case 2 */ \ |
| 4145 | ? 1 /* xor with 1 */ \ |
| 4146 | : ((bonds == 1) /* case 1 */ \ |
| 4147 | ? ((c & 2) /* can we get from bank? */ \ |
| 4148 | ? 0 /* xor with 0 */ \ |
| 4149 | : 3 /* xor with 3 */ \ |
| 4150 | ) \ |
| 4151 | : ((c & 2) /* can we put to bank? */ \ |
| 4152 | ? 3 /* xor with 3 */ \ |
| 4153 | : 0 /* xor with 0 */ \ |
| 4154 | ) \ |
| 4155 | ) \ |
| 4156 | ) \ |
| 4157 | ) \ |
| 4158 | ) \ |
| 4159 | ) \ |
| 4160 | ) \ |
| 4161 | ) \ |
| 4162 | ) |
| 4163 | |
| 4164 | CAM_MASKED_REG_LOOP(SPINSBANK) |
| 4165 | } |
| 4166 | |
| 4167 | |
| 4168 |
nothing calls this directly
no outgoing calls
no test coverage detected