All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dds.boards Maven / Gradle / Ivy

// Generated by jextract

package dds;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
/**
 * {@snippet :
 * struct boards {
 *     int noOfBoards;
 *     struct deal deals[200];
 *     int target[200];
 *     int solutions[200];
 *     int mode[200];
 * };
 * }
 */
public class boards {

    public static MemoryLayout $LAYOUT() {
        return constants$1.const$3;
    }
    public static VarHandle noOfBoards$VH() {
        return constants$1.const$4;
    }
    /**
     * Getter for field:
     * {@snippet :
     * int noOfBoards;
     * }
     */
    public static int noOfBoards$get(MemorySegment seg) {
        return (int)constants$1.const$4.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * int noOfBoards;
     * }
     */
    public static void noOfBoards$set(MemorySegment seg, int x) {
        constants$1.const$4.set(seg, x);
    }
    public static int noOfBoards$get(MemorySegment seg, long index) {
        return (int)constants$1.const$4.get(seg.asSlice(index*sizeof()));
    }
    public static void noOfBoards$set(MemorySegment seg, long index, int x) {
        constants$1.const$4.set(seg.asSlice(index*sizeof()), x);
    }
    public static MemorySegment deals$slice(MemorySegment seg) {
        return seg.asSlice(4, 19200);
    }
    public static MemorySegment target$slice(MemorySegment seg) {
        return seg.asSlice(19204, 800);
    }
    public static MemorySegment solutions$slice(MemorySegment seg) {
        return seg.asSlice(20004, 800);
    }
    public static MemorySegment mode$slice(MemorySegment seg) {
        return seg.asSlice(20804, 800);
    }
    public static long sizeof() { return $LAYOUT().byteSize(); }
    public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); }
    public static MemorySegment allocateArray(long len, SegmentAllocator allocator) {
        return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT()));
    }
    public static MemorySegment ofAddress(MemorySegment addr, Arena arena) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, arena); }
}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy