Java Array Multiply multiplyP8(int[] x)

Here you can find the source of multiplyP8(int[] x)

Description

multiply P

License

Open Source License

Declaration

static void multiplyP8(int[] x) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    static void multiplyP8(int[] x) {
        //        for (int i = 8; i != 0; --i)
        //        {
        //            multiplyP(x);
        //        }

        int lsw = x[3];
        shiftRightN(x, 8);/*from  ww w  . ja va 2s. c  o m*/
        for (int i = 7; i >= 0; --i) {
            if ((lsw & (1 << i)) != 0) {
                x[0] ^= (0xe1000000 >>> (7 - i));
            }
        }
    }

    static void shiftRightN(int[] block, int n) {
        int i = 0;
        int bits = 0;
        for (;;) {
            int b = block[i];
            block[i] = (b >>> n) | bits;
            if (++i == 4) {
                break;
            }
            bits = b << (32 - n);
        }
    }
}

Related

  1. multiplyInto(double[] out, double[] a, double[] b)
  2. multiplyP(int[] x)
  3. multiplyP(int[] x)
  4. multiplyP(int[] x)
  5. multiplyP(int[] x)
  6. multiplyP8(int[] x)
  7. MultiplyPointSimilarityInhomogenous(double[] xp, int idx, double[] H, double[] x, int idx2)
  8. multiplyRange(double[] accumulator, int offset, double[] modulator)
  9. multiplyScalar(double[] a, double value)