public void add ( double x ) { Cell [ ] as ; long b , v ; int [ ] hc ; Cell a ; int n ; if ( ( as = cells ) != null || ! casBase ( b = base , Double . doubleToRawLongBits ( Double . longBitsToDouble ( b ) + x ) ) ) { boolean uncontended = true ; if ( ( hc = threadHashCode . get ( ) ) == null || as == null || ( n = as . length ) < 1 || ( a = as [ ( n - 1 ) & hc [ 0 ] ] ) == null || ! ( uncontended = a . cas ( v = a . value , Double . doubleToRawLongBits ( Double . longBitsToDouble ( v ) + x ) ) ) ) retryUpdate ( Double . doubleToRawLongBits ( x ) , hc , uncontended ) ; } }
Adds the given value .