fixed bench macros
This commit is contained in:
parent
bc89f14250
commit
dde1fd26be
2 changed files with 4 additions and 4 deletions
|
@ -82,7 +82,7 @@ macro_rules! bench_unop(
|
||||||
);
|
);
|
||||||
|
|
||||||
macro_rules! bench_construction(
|
macro_rules! bench_construction(
|
||||||
($name: ident, $t: ty, $constructor: path $(, $args: ident: $types: ty)*) => {
|
($name: ident, $t: ty, $constructor: path [ $($args: ident: $types: ty),+ ]) => {
|
||||||
#[bench]
|
#[bench]
|
||||||
fn $name(bh: &mut Bencher) {
|
fn $name(bh: &mut Bencher) {
|
||||||
const LEN: uint = 1 << 13;
|
const LEN: uint = 1 << 13;
|
||||||
|
|
|
@ -55,7 +55,7 @@ fn _bench_rot3_from_axisangle(bh: &mut Bencher) {
|
||||||
bench_from_axis_angle::<Basis3<f32>>(bh)
|
bench_from_axis_angle::<Basis3<f32>>(bh)
|
||||||
}
|
}
|
||||||
|
|
||||||
bench_construction!(_bench_rot2_from_axisangle, Basis2<f32>, Rotation2::from_angle, angle: Rad<f32>);
|
bench_construction!(_bench_rot2_from_axisangle, Basis2<f32>, Rotation2::from_angle [ angle: Rad<f32> ]);
|
||||||
|
|
||||||
bench_construction!(_bench_quat_from_euler_angles, Quaternion<f32>, Rotation3::from_euler, roll: Rad<f32>, pitch: Rad<f32>, yaw: Rad<f32>);
|
bench_construction!(_bench_quat_from_euler_angles, Quaternion<f32>, Rotation3::from_euler [roll: Rad<f32>, pitch: Rad<f32>, yaw: Rad<f32>]);
|
||||||
bench_construction!(_bench_rot3_from_euler_angles, Basis3<f32>, Rotation3::from_euler, roll: Rad<f32>, pitch: Rad<f32>, yaw: Rad<f32>);
|
bench_construction!(_bench_rot3_from_euler_angles, Basis3<f32>, Rotation3::from_euler [roll: Rad<f32>, pitch: Rad<f32>, yaw: Rad<f32>]);
|
||||||
|
|
Loading…
Reference in a new issue