@@ -54,25 +54,25 @@ mod private {
5454
5555macro_rules! f32_intrinsic {
5656 ( $self: expr, $func: ident( $( $param: expr) ,* ) ) => { {
57- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
57+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
5858 let val = $self. $func( $( $param) ,* ) ;
59- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
59+ #[ cfg( target_arch = "nvptx64" ) ]
6060 let val = paste:: paste! { unsafe { intrinsics:: [ <$func f>] ( $self, $( $param) ,* ) } } ;
6161 val
6262 } } ;
6363}
6464
6565macro_rules! f64_intrinsic {
6666 ( $self: expr, $func: ident( $( $param: expr) ,* ) ) => { {
67- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
67+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
6868 let val = $self. $func( $( $param) ,* ) ;
69- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
69+ #[ cfg( target_arch = "nvptx64" ) ]
7070 let val = unsafe { intrinsics:: $func( $self, $( $param) ,* ) } ;
7171 val
7272 } } ;
7373}
7474
75- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
75+ #[ cfg( target_arch = "nvptx64" ) ]
7676use crate :: intrinsics;
7777
7878impl GpuFloat for f32 {
@@ -117,9 +117,9 @@ impl GpuFloat for f32 {
117117 #[ must_use = "method returns a new number and does not mutate the original value" ]
118118 #[ inline]
119119 fn abs ( self ) -> f32 {
120- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
120+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
121121 let val = self . abs ( ) ;
122- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
122+ #[ cfg( target_arch = "nvptx64" ) ]
123123 let val = { unsafe { intrinsics:: fabsf ( self ) } } ;
124124 val
125125 }
@@ -161,9 +161,9 @@ impl GpuFloat for f32 {
161161 #[ must_use = "method returns a new number and does not mutate the original value" ]
162162 #[ inline]
163163 fn mul_add ( self , a : f32 , b : f32 ) -> f32 {
164- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
164+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
165165 let val = self . mul_add ( a, b) ;
166- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
166+ #[ cfg( target_arch = "nvptx64" ) ]
167167 let val = { unsafe { intrinsics:: fmaf ( self , a, b) } } ;
168168 val
169169 }
@@ -218,9 +218,9 @@ impl GpuFloat for f32 {
218218 #[ must_use = "method returns a new number and does not mutate the original value" ]
219219 #[ inline]
220220 fn powf ( self , n : f32 ) -> f32 {
221- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
221+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
222222 let val = self . powf ( n) ;
223- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
223+ #[ cfg( target_arch = "nvptx64" ) ]
224224 let val = { unsafe { intrinsics:: powf ( self , n) } } ;
225225 val
226226 }
@@ -252,9 +252,9 @@ impl GpuFloat for f32 {
252252 #[ must_use = "method returns a new number and does not mutate the original value" ]
253253 #[ inline]
254254 fn ln ( self ) -> f32 {
255- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
255+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
256256 let val = self . ln ( ) ;
257- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
257+ #[ cfg( target_arch = "nvptx64" ) ]
258258 let val = { unsafe { intrinsics:: logf ( self ) } } ;
259259 val
260260 }
@@ -362,9 +362,9 @@ impl GpuFloat for f32 {
362362 /// `(sin(x), cos(x))`.
363363 #[ inline]
364364 fn sin_cos ( self ) -> ( f32 , f32 ) {
365- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
365+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
366366 let val = self . sin_cos ( ) ;
367- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
367+ #[ cfg( target_arch = "nvptx64" ) ]
368368 let val = {
369369 let mut sptr = 0.0 ;
370370 let mut cptr = 0.0 ;
@@ -381,9 +381,9 @@ impl GpuFloat for f32 {
381381 #[ must_use = "method returns a new number and does not mutate the original value" ]
382382 #[ inline]
383383 fn exp_m1 ( self ) -> f32 {
384- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
384+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
385385 let val = self . exp_m1 ( ) ;
386- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
386+ #[ cfg( target_arch = "nvptx64" ) ]
387387 let val = { unsafe { intrinsics:: expm1f ( self ) } } ;
388388 val
389389 }
@@ -393,9 +393,9 @@ impl GpuFloat for f32 {
393393 #[ must_use = "method returns a new number and does not mutate the original value" ]
394394 #[ inline]
395395 fn ln_1p ( self ) -> f32 {
396- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
396+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
397397 let val = self . ln_1p ( ) ;
398- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
398+ #[ cfg( target_arch = "nvptx64" ) ]
399399 let val = { unsafe { intrinsics:: log1pf ( self ) } } ;
400400 val
401401 }
@@ -485,9 +485,9 @@ impl GpuFloat for f64 {
485485 #[ must_use = "method returns a new number and does not mutate the original value" ]
486486 #[ inline]
487487 fn abs ( self ) -> f64 {
488- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
488+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
489489 let val = self . abs ( ) ;
490- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
490+ #[ cfg( target_arch = "nvptx64" ) ]
491491 let val = { unsafe { intrinsics:: fabs ( self ) } } ;
492492 val
493493 }
@@ -529,9 +529,9 @@ impl GpuFloat for f64 {
529529 #[ must_use = "method returns a new number and does not mutate the original value" ]
530530 #[ inline]
531531 fn mul_add ( self , a : f64 , b : f64 ) -> f64 {
532- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
532+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
533533 let val = self . mul_add ( a, b) ;
534- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
534+ #[ cfg( target_arch = "nvptx64" ) ]
535535 let val = { unsafe { intrinsics:: fma ( self , a, b) } } ;
536536 val
537537 }
@@ -586,9 +586,9 @@ impl GpuFloat for f64 {
586586 #[ must_use = "method returns a new number and does not mutate the original value" ]
587587 #[ inline]
588588 fn powf ( self , n : f64 ) -> f64 {
589- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
589+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
590590 let val = self . powf ( n) ;
591- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
591+ #[ cfg( target_arch = "nvptx64" ) ]
592592 let val = { unsafe { intrinsics:: pow ( self , n) } } ;
593593 val
594594 }
@@ -620,9 +620,9 @@ impl GpuFloat for f64 {
620620 #[ must_use = "method returns a new number and does not mutate the original value" ]
621621 #[ inline]
622622 fn ln ( self ) -> f64 {
623- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
623+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
624624 let val = self . ln ( ) ;
625- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
625+ #[ cfg( target_arch = "nvptx64" ) ]
626626 let val = { unsafe { intrinsics:: log ( self ) } } ;
627627 val
628628 }
@@ -730,9 +730,9 @@ impl GpuFloat for f64 {
730730 /// `(sin(x), cos(x))`.
731731 #[ inline]
732732 fn sin_cos ( self ) -> ( f64 , f64 ) {
733- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
733+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
734734 let val = self . sin_cos ( ) ;
735- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
735+ #[ cfg( target_arch = "nvptx64" ) ]
736736 let val = {
737737 let mut sptr = 0.0 ;
738738 let mut cptr = 0.0 ;
@@ -749,9 +749,9 @@ impl GpuFloat for f64 {
749749 #[ must_use = "method returns a new number and does not mutate the original value" ]
750750 #[ inline]
751751 fn exp_m1 ( self ) -> f64 {
752- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
752+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
753753 let val = self . exp_m1 ( ) ;
754- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
754+ #[ cfg( target_arch = "nvptx64" ) ]
755755 let val = { unsafe { intrinsics:: expm1 ( self ) } } ;
756756 val
757757 }
@@ -761,9 +761,9 @@ impl GpuFloat for f64 {
761761 #[ must_use = "method returns a new number and does not mutate the original value" ]
762762 #[ inline]
763763 fn ln_1p ( self ) -> f64 {
764- #[ cfg( not( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ) ]
764+ #[ cfg( not( target_arch = "nvptx64" ) ) ]
765765 let val = self . ln_1p ( ) ;
766- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
766+ #[ cfg( target_arch = "nvptx64" ) ]
767767 let val = { unsafe { intrinsics:: log1p ( self ) } } ;
768768 val
769769 }
0 commit comments