Files
rr3-apk/decompiled-community/sources/com/facebook/appevents/ml/MTensor.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

74 lines
2.1 KiB
Java

package com.facebook.appevents.ml;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes2.dex */
public final class MTensor {
public static final Companion Companion = new Companion(null);
private int capacity;
private float[] data;
private int[] shape;
public final float[] getData() {
return this.data;
}
public MTensor(int[] shape) {
Intrinsics.checkNotNullParameter(shape, "shape");
this.shape = shape;
int capacity = Companion.getCapacity(shape);
this.capacity = capacity;
this.data = new float[capacity];
}
public final int getShapeSize() {
return this.shape.length;
}
public final int getShape(int i) {
return this.shape[i];
}
public final void reshape(int[] shape) {
Intrinsics.checkNotNullParameter(shape, "shape");
this.shape = shape;
int capacity = Companion.getCapacity(shape);
float[] fArr = new float[capacity];
System.arraycopy(this.data, 0, fArr, 0, Math.min(this.capacity, capacity));
this.data = fArr;
this.capacity = capacity;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
/* JADX INFO: Access modifiers changed from: private */
public final int getCapacity(int[] iArr) {
int lastIndex;
if (iArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
int i = iArr[0];
lastIndex = ArraysKt___ArraysKt.getLastIndex(iArr);
int i2 = 1;
if (1 <= lastIndex) {
while (true) {
i *= iArr[i2];
if (i2 == lastIndex) {
break;
}
i2++;
}
}
return i;
}
}
}