Java Array Multiply multiplyX(long[] x, long[] z)

Here you can find the source of multiplyX(long[] x, long[] z)

Description

multiply X

License

Open Source License

Declaration

public static void multiplyX(long[] x, long[] z) 

Method Source Code

//package com.java2s;

public class Main {
    public static void multiplyX(long[] x, long[] z) {
        long x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3];
        long x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7];
        long m = x7 >> 63;
        z[0] = (x0 << 1) ^ (m & 0x125L);
        z[1] = (x1 << 1) | (x0 >>> 63);
        z[2] = (x2 << 1) | (x1 >>> 63);
        z[3] = (x3 << 1) | (x2 >>> 63);
        z[4] = (x4 << 1) | (x3 >>> 63);
        z[5] = (x5 << 1) | (x4 >>> 63);
        z[6] = (x6 << 1) | (x5 >>> 63);
        z[7] = (x7 << 1) | (x6 >>> 63);
    }/*  w ww.jav a2  s.c o m*/
}

Related

  1. multiplyValues(byte[] array, int multiplier)
  2. multiplyVecorWithScalar(double[] v, double s)
  3. multiplyVector(float[] mat, float[] vec, float[] dest)
  4. multiplyVectorByMatrix(double[] v, double[] m, double[] result)
  5. multiplyX(long[] x, long[] z)