@Override public ArrayPrimitiveWritable arrayAllReduce(ArrayPrimitiveWritable byteSerialArray, int rank) throws Mp4jException { try { byte[] obj = (byte[])byteSerialArray.get(); allReduceByteArray.write(obj); barrier.await(); if (rank == 0) { allReduceReturnArray = new ArrayPrimitiveWritable(allReduceByteArray.toByteArray()); allReduceByteArray.reset(); } barrier.await(); return allReduceReturnArray; } catch (Exception e) { throw new Mp4jException("array allreduce exception!"); } }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); ArrayPrimitiveWritable ow1 = new ArrayPrimitiveWritable(fvdist); ArrayPrimitiveWritable ow2 = new ArrayPrimitiveWritable(fvangle); ow1.readFields(in); ow2.readFields(in); minutia.readFields(in); fvdist = (float[]) ow1.get(); fvangle = (byte[]) ow2.get(); }
public void readFields(DataInput in) throws IOException { templatesize = in.readInt(); ArrayPrimitiveWritable auxaw = new ArrayPrimitiveWritable(bestsimilarities); auxaw.readFields(in); bestsimilarities = (float[]) auxaw.get(); }
@Override public void write(DataOutput out) throws IOException { super.write(out); ArrayPrimitiveWritable ow = new ArrayPrimitiveWritable(cm_vector); ow.write(out); minutia.write(out); out.writeFloat(norm); }
@Test(expected = IllegalArgumentException.class) public void testNoSuchMethod() { new ValueWritableConverter<>(byte[].class, ArrayPrimitiveWritable.class); }
public void readFields(DataInput in) throws IOException { ArrayPrimitiveWritable auxaw = new ArrayPrimitiveWritable(); auxaw.readFields(in); bestsimilarities = (float[]) auxaw.get(); }
public void write(DataOutput out) throws IOException { ArrayPrimitiveWritable auxaw = new ArrayPrimitiveWritable(bestsimilarities); auxaw.write(out); }
@Override public void write(DataOutput out) throws IOException { super.write(out); ArrayPrimitiveWritable ow1 = new ArrayPrimitiveWritable(fvdist); ArrayPrimitiveWritable ow2 = new ArrayPrimitiveWritable(fvangle); ow1.write(out); ow2.write(out); minutia.write(out); }
public void write(DataOutput out) throws IOException { out.writeInt(templatesize); ArrayPrimitiveWritable auxaw = new ArrayPrimitiveWritable(bestsimilarities); auxaw.write(out); }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); ArrayPrimitiveWritable ow = new ArrayPrimitiveWritable(cm_vector); ow.readFields(in); cm_vector = (float[]) ow.get(); minutia.readFields(in); norm = in.readFloat(); }
public ArrayPrimitiveWritable primitiveArrayAllReduce(ArrayPrimitiveWritable arrayPrimitiveWritable, int rank) throws Mp4jException;
public ArrayPrimitiveWritable arrayAllReduce(ArrayPrimitiveWritable byteSerialArray, int rank) throws Mp4jException;