File tree Expand file tree Collapse file tree 3 files changed +1
-51
lines changed
angel-ps/graph/src/main/java/com/tencent/angel/graph/data
spark-on-angel/graph/src/main/java/com/tencent/angel/graph/common/data Expand file tree Collapse file tree 3 files changed +1
-51
lines changed Original file line number Diff line number Diff line change 18
18
* .class
19
19
angel-ps /core /target /
20
20
angel-ps /psf /target /
21
- angel-ps /graph /
21
+ angel-ps /graph /target /
22
22
angel-ps /examples /target /
23
23
angel-ps /jarvis /target /
24
24
angel-ps /tools /target /
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .tencent .angel .graph .data ;
18
18
19
- import com .tencent .angel .graph .utils .HalfPrecisionConversion ;
20
19
import com .tencent .angel .ml .math2 .VFactory ;
21
20
import com .tencent .angel .ml .math2 .vector .IntFloatVector ;
22
21
import com .tencent .angel .ps .storage .vector .storage .StorageMethod ;
@@ -204,17 +203,6 @@ public static void serialize(float[] feats, ByteBuf output) {
204
203
}
205
204
}
206
205
207
- public static void serializeShortFromFloat (float [] feats , ByteBuf output ) {
208
- if (feats != null ) {
209
- output .writeInt (feats .length );
210
- for (int i = 0 ; i < feats .length ; i ++) {
211
- output .writeShort (HalfPrecisionConversion .toHalfPrecision (feats [i ]));
212
- }
213
- } else {
214
- output .writeInt (0 );
215
- }
216
- }
217
-
218
206
public static void serialize (double [] feats , ByteBuf output ) throws IOException {
219
207
if (feats != null ) {
220
208
output .writeInt (feats .length );
@@ -276,19 +264,6 @@ public static float[] deserializeFloats(ByteBuf input) {
276
264
}
277
265
}
278
266
279
- public static float [] deserializeFloatFromShort (ByteBuf input ) {
280
- int len = input .readInt ();
281
- if (len > 0 ) {
282
- float [] res = new float [len ];
283
- for (int i = 0 ; i < len ; i ++) {
284
- res [i ] = HalfPrecisionConversion .fromHalfPrecision (input .readShort ());
285
- }
286
- return res ;
287
- } else {
288
- return null ;
289
- }
290
- }
291
-
292
267
public static double [] deserializeDoubles (ByteBuf input ) {
293
268
int len = input .readInt ();
294
269
if (len > 0 ) {
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .tencent .angel .graph .common .data ;
18
18
19
- import com .tencent .angel .graph .utils .HalfPrecisionConversion ;
20
19
import com .tencent .angel .ml .math2 .VFactory ;
21
20
import com .tencent .angel .ml .math2 .vector .IntFloatVector ;
22
21
import com .tencent .angel .ps .storage .vector .storage .StorageMethod ;
@@ -204,17 +203,6 @@ public static void serialize(float[] feats, ByteBuf output) {
204
203
}
205
204
}
206
205
207
- public static void serializeShortFromFloat (float [] feats , ByteBuf output ) {
208
- if (feats != null ) {
209
- output .writeInt (feats .length );
210
- for (int i = 0 ; i < feats .length ; i ++) {
211
- output .writeShort (HalfPrecisionConversion .toHalfPrecision (feats [i ]));
212
- }
213
- } else {
214
- output .writeInt (0 );
215
- }
216
- }
217
-
218
206
public static void serialize (double [] feats , ByteBuf output ) throws IOException {
219
207
if (feats != null ) {
220
208
output .writeInt (feats .length );
@@ -276,19 +264,6 @@ public static float[] deserializeFloats(ByteBuf input) {
276
264
}
277
265
}
278
266
279
- public static float [] deserializeFloatFromShort (ByteBuf input ) {
280
- int len = input .readInt ();
281
- if (len > 0 ) {
282
- float [] res = new float [len ];
283
- for (int i = 0 ; i < len ; i ++) {
284
- res [i ] = HalfPrecisionConversion .fromHalfPrecision (input .readShort ());
285
- }
286
- return res ;
287
- } else {
288
- return null ;
289
- }
290
- }
291
-
292
267
public static double [] deserializeDoubles (ByteBuf input ) {
293
268
int len = input .readInt ();
294
269
if (len > 0 ) {
You can’t perform that action at this time.
0 commit comments