@@ -31,7 +31,7 @@ impl MathsCore for NvptxMathsCore {
3131 let x: f32 = x as f32 ;
3232 let f: f32 ;
3333
34- asm ! ( "lg2.approx.f32 {}, {};" , out( reg32) f, in( reg32) x, options( pure, nomem, nostack) ) ;
34+ core :: arch :: asm!( "lg2.approx.f32 {}, {};" , out( reg32) f, in( reg32) x, options( pure, nomem, nostack) ) ;
3535
3636 // f / log_2(e)
3737 f64:: from ( f) * FRAC_1_LOG2_E
@@ -50,7 +50,7 @@ impl MathsCore for NvptxMathsCore {
5050 let x: f32 = ( x * core:: f64:: consts:: LOG2_E ) as f32 ;
5151 let f: f32 ;
5252
53- asm ! ( "ex2.approx.f32 {}, {};" , out( reg32) f, in( reg32) x, options( pure, nomem, nostack) ) ;
53+ core :: arch :: asm!( "ex2.approx.f32 {}, {};" , out( reg32) f, in( reg32) x, options( pure, nomem, nostack) ) ;
5454
5555 f64:: from ( f)
5656 }
@@ -73,7 +73,7 @@ impl MathsCore for NvptxMathsCore {
7373 let x: f32 = x as f32 ;
7474 let f: f32 ;
7575
76- asm ! ( "sin.approx.f32 {}, {};" , out( reg32) f, in( reg32) x, options( pure, nomem, nostack) ) ;
76+ core :: arch :: asm!( "sin.approx.f32 {}, {};" , out( reg32) f, in( reg32) x, options( pure, nomem, nostack) ) ;
7777
7878 f64:: from ( f)
7979 }
@@ -91,7 +91,7 @@ impl MathsCore for NvptxMathsCore {
9191 let x: f32 = x as f32 ;
9292 let f: f32 ;
9393
94- asm ! ( "cos.approx.f32 {}, {};" , out( reg32) f, in( reg32) x, options( pure, nomem, nostack) ) ;
94+ core :: arch :: asm!( "cos.approx.f32 {}, {};" , out( reg32) f, in( reg32) x, options( pure, nomem, nostack) ) ;
9595
9696 f64:: from ( f)
9797 }
@@ -108,12 +108,12 @@ impl MathsCore for NvptxMathsCore {
108108 const ROUND_TRUNC_OFFSET : f64 = 0.5_f64 - 0.25_f64 * f64:: EPSILON ;
109109
110110 let offset: f64 ;
111- asm ! ( "copysign {}, {}, {};" , out( reg64) offset, in( reg64) x, const ROUND_TRUNC_OFFSET . to_bits( ) , options( pure, nomem, nostack) ) ;
111+ core :: arch :: asm!( "copysign {}, {}, {};" , out( reg64) offset, in( reg64) x, const ROUND_TRUNC_OFFSET . to_bits( ) , options( pure, nomem, nostack) ) ;
112112
113113 let overshot = x + offset;
114114
115115 let round: f64 ;
116- asm ! ( "cvt.rzi.f64.f64 {}, {};" , out( reg64) round, in( reg64) overshot, options( pure, nomem, nostack) ) ;
116+ core :: arch :: asm!( "cvt.rzi.f64.f64 {}, {};" , out( reg64) round, in( reg64) overshot, options( pure, nomem, nostack) ) ;
117117
118118 round
119119 }
0 commit comments