Closed crowlogic closed 7 months ago
public static Real newAlignedVectorViaAllocativeNative(int size) { Real x = new Real(0, false); x.nativeSegment = arena.allocate(Real.BYTES * size, 4096); x.swigCPtr = x.nativeSegment.address(); x.dim = size; x.elements = new Real[x.dim]; for (int j = 0; j < x.dim; j++) { Real y = x.elements[j] = new Real(x.swigCPtr + (Real.BYTES * j), false); y.init(); } return x; }
screw that.. it'll be tested by virtue of it being used when its needed