File tree 4 files changed +58
-0
lines changed
4 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -301,40 +301,53 @@ impl num::One for f32 {
301
301
302
302
#[ cfg( notest) ]
303
303
impl Add < f32 , f32 > for f32 {
304
+ #[ inline( always) ]
304
305
fn add ( & self , other : & f32 ) -> f32 { * self + * other }
305
306
}
307
+
306
308
#[ cfg( notest) ]
307
309
impl Sub < f32 , f32 > for f32 {
310
+ #[ inline( always) ]
308
311
fn sub ( & self , other : & f32 ) -> f32 { * self - * other }
309
312
}
313
+
310
314
#[ cfg( notest) ]
311
315
impl Mul < f32 , f32 > for f32 {
316
+ #[ inline( always) ]
312
317
fn mul ( & self , other : & f32 ) -> f32 { * self * * other }
313
318
}
319
+
314
320
#[ cfg( stage0, notest) ]
315
321
impl Div < f32 , f32 > for f32 {
322
+ #[ inline( always) ]
316
323
fn div ( & self , other : & f32 ) -> f32 { * self / * other }
317
324
}
325
+
318
326
#[ cfg( stage1, notest) ]
319
327
#[ cfg( stage2, notest) ]
320
328
#[ cfg( stage3, notest) ]
321
329
impl Quot < f32 , f32 > for f32 {
322
330
#[ inline( always) ]
323
331
fn quot ( & self , other : & f32 ) -> f32 { * self / * other }
324
332
}
333
+
325
334
#[ cfg( stage0, notest) ]
326
335
impl Modulo < f32 , f32 > for f32 {
336
+ #[ inline( always) ]
327
337
fn modulo ( & self , other : & f32 ) -> f32 { * self % * other }
328
338
}
339
+
329
340
#[ cfg( stage1, notest) ]
330
341
#[ cfg( stage2, notest) ]
331
342
#[ cfg( stage3, notest) ]
332
343
impl Rem < f32 , f32 > for f32 {
333
344
#[ inline( always) ]
334
345
fn rem ( & self , other : & f32 ) -> f32 { * self % * other }
335
346
}
347
+
336
348
#[ cfg( notest) ]
337
349
impl Neg < f32 > for f32 {
350
+ #[ inline( always) ]
338
351
fn neg ( & self ) -> f32 { -* self }
339
352
}
340
353
Original file line number Diff line number Diff line change @@ -455,18 +455,25 @@ impl num::Round for float {
455
455
456
456
#[cfg(notest)]
457
457
impl Add<float,float> for float {
458
+ #[inline(always)]
458
459
fn add(&self, other: &float) -> float { *self + *other }
459
460
}
461
+
460
462
#[cfg(notest)]
461
463
impl Sub<float,float> for float {
464
+ #[inline(always)]
462
465
fn sub(&self, other: &float) -> float { *self - *other }
463
466
}
467
+
464
468
#[cfg(notest)]
465
469
impl Mul<float,float> for float {
470
+ #[inline(always)]
466
471
fn mul(&self, other: &float) -> float { *self * *other }
467
472
}
473
+
468
474
#[cfg(stage0,notest)]
469
475
impl Div<float,float> for float {
476
+ #[inline(always)]
470
477
fn div(&self, other: &float) -> float { *self / *other }
471
478
}
472
479
#[cfg(stage1,notest)]
@@ -478,6 +485,7 @@ impl Quot<float,float> for float {
478
485
}
479
486
#[cfg(stage0,notest)]
480
487
impl Modulo<float,float> for float {
488
+ #[inline(always)]
481
489
fn modulo(&self, other: &float) -> float { *self % *other }
482
490
}
483
491
#[cfg(stage1,notest)]
@@ -489,6 +497,7 @@ impl Rem<float,float> for float {
489
497
}
490
498
#[cfg(notest)]
491
499
impl Neg<float> for float {
500
+ #[inline(always)]
492
501
fn neg(&self) -> float { -*self }
493
502
}
494
503
Original file line number Diff line number Diff line change @@ -175,40 +175,53 @@ impl num::One for T {
175
175
176
176
#[cfg(notest)]
177
177
impl Add<T,T> for T {
178
+ #[inline(always)]
178
179
fn add(&self, other: &T) -> T { *self + *other }
179
180
}
181
+
180
182
#[cfg(notest)]
181
183
impl Sub<T,T> for T {
184
+ #[inline(always)]
182
185
fn sub(&self, other: &T) -> T { *self - *other }
183
186
}
187
+
184
188
#[cfg(notest)]
185
189
impl Mul<T,T> for T {
190
+ #[inline(always)]
186
191
fn mul(&self, other: &T) -> T { *self * *other }
187
192
}
193
+
188
194
#[cfg(stage0,notest)]
189
195
impl Div<T,T> for T {
196
+ #[inline(always)]
190
197
fn div(&self, other: &T) -> T { *self / *other }
191
198
}
199
+
192
200
#[cfg(stage1,notest)]
193
201
#[cfg(stage2,notest)]
194
202
#[cfg(stage3,notest)]
195
203
impl Quot<T,T> for T {
196
204
#[inline(always)]
197
205
fn quot(&self, other: &T) -> T { *self / *other }
198
206
}
207
+
199
208
#[cfg(stage0,notest)]
200
209
impl Modulo<T,T> for T {
210
+ #[inline(always)]
201
211
fn modulo(&self, other: &T) -> T { *self % *other }
202
212
}
213
+
203
214
#[cfg(stage1,notest)]
204
215
#[cfg(stage2,notest)]
205
216
#[cfg(stage3,notest)]
206
217
impl Rem<T,T> for T {
207
218
#[inline(always)]
208
219
fn rem(&self, other: &T) -> T { *self % *other }
209
220
}
221
+
210
222
#[cfg(notest)]
211
223
impl Neg<T> for T {
224
+ #[inline(always)]
212
225
fn neg(&self) -> T { -*self }
213
226
}
214
227
@@ -217,26 +230,31 @@ impl BitOr<T,T> for T {
217
230
#[inline(always)]
218
231
fn bitor(&self, other: &T) -> T { *self | *other }
219
232
}
233
+
220
234
#[cfg(notest)]
221
235
impl BitAnd<T,T> for T {
222
236
#[inline(always)]
223
237
fn bitand(&self, other: &T) -> T { *self & *other }
224
238
}
239
+
225
240
#[cfg(notest)]
226
241
impl BitXor<T,T> for T {
227
242
#[inline(always)]
228
243
fn bitxor(&self, other: &T) -> T { *self ^ *other }
229
244
}
245
+
230
246
#[cfg(notest)]
231
247
impl Shl<T,T> for T {
232
248
#[inline(always)]
233
249
fn shl(&self, other: &T) -> T { *self << *other }
234
250
}
251
+
235
252
#[cfg(notest)]
236
253
impl Shr<T,T> for T {
237
254
#[inline(always)]
238
255
fn shr(&self, other: &T) -> T { *self >> *other }
239
256
}
257
+
240
258
#[cfg(notest)]
241
259
impl Not<T> for T {
242
260
#[inline(always)]
Original file line number Diff line number Diff line change @@ -140,40 +140,53 @@ impl num::One for T {
140
140
141
141
#[cfg(notest)]
142
142
impl Add<T,T> for T {
143
+ #[inline(always)]
143
144
fn add(&self, other: &T) -> T { *self + *other }
144
145
}
146
+
145
147
#[cfg(notest)]
146
148
impl Sub<T,T> for T {
149
+ #[inline(always)]
147
150
fn sub(&self, other: &T) -> T { *self - *other }
148
151
}
152
+
149
153
#[cfg(notest)]
150
154
impl Mul<T,T> for T {
155
+ #[inline(always)]
151
156
fn mul(&self, other: &T) -> T { *self * *other }
152
157
}
158
+
153
159
#[cfg(stage0,notest)]
154
160
impl Div<T,T> for T {
161
+ #[inline(always)]
155
162
fn div(&self, other: &T) -> T { *self / *other }
156
163
}
164
+
157
165
#[cfg(stage1,notest)]
158
166
#[cfg(stage2,notest)]
159
167
#[cfg(stage3,notest)]
160
168
impl Quot<T,T> for T {
161
169
#[inline(always)]
162
170
fn quot(&self, other: &T) -> T { *self / *other }
163
171
}
172
+
164
173
#[cfg(stage0,notest)]
165
174
impl Modulo<T,T> for T {
175
+ #[inline(always)]
166
176
fn modulo(&self, other: &T) -> T { *self % *other }
167
177
}
178
+
168
179
#[cfg(stage1,notest)]
169
180
#[cfg(stage2,notest)]
170
181
#[cfg(stage3,notest)]
171
182
impl Rem<T,T> for T {
172
183
#[inline(always)]
173
184
fn rem(&self, other: &T) -> T { *self % *other }
174
185
}
186
+
175
187
#[cfg(notest)]
176
188
impl Neg<T> for T {
189
+ #[inline(always)]
177
190
fn neg(&self) -> T { -*self }
178
191
}
179
192
@@ -182,26 +195,31 @@ impl BitOr<T,T> for T {
182
195
#[inline(always)]
183
196
fn bitor(&self, other: &T) -> T { *self | *other }
184
197
}
198
+
185
199
#[cfg(notest)]
186
200
impl BitAnd<T,T> for T {
187
201
#[inline(always)]
188
202
fn bitand(&self, other: &T) -> T { *self & *other }
189
203
}
204
+
190
205
#[cfg(notest)]
191
206
impl BitXor<T,T> for T {
192
207
#[inline(always)]
193
208
fn bitxor(&self, other: &T) -> T { *self ^ *other }
194
209
}
210
+
195
211
#[cfg(notest)]
196
212
impl Shl<T,T> for T {
197
213
#[inline(always)]
198
214
fn shl(&self, other: &T) -> T { *self << *other }
199
215
}
216
+
200
217
#[cfg(notest)]
201
218
impl Shr<T,T> for T {
202
219
#[inline(always)]
203
220
fn shr(&self, other: &T) -> T { *self >> *other }
204
221
}
222
+
205
223
#[cfg(notest)]
206
224
impl Not<T> for T {
207
225
#[inline(always)]
You can’t perform that action at this time.
0 commit comments