// Generated by jextract

package c.lib.math;

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 :
 * union __mingw_fp_types_t {
 *     long double* ld;
 *     double* d;
 *     float* f;
 *     __mingw_ldbl_type_t* ldt;
 *     __mingw_dbl_type_t* dt;
 *     __mingw_flt_type_t* ft;
 * };
 * }
 */
public class __mingw_fp_types_t {

    public static MemoryLayout $LAYOUT() {
        return constants$6.const$3;
    }
    public static VarHandle ld$VH() {
        return constants$6.const$4;
    }
    /**
     * Getter for field:
     * {@snippet :
     * long double* ld;
     * }
     */
    public static MemorySegment ld$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$6.const$4.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * long double* ld;
     * }
     */
    public static void ld$set(MemorySegment seg, MemorySegment x) {
        constants$6.const$4.set(seg, x);
    }
    public static MemorySegment ld$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$6.const$4.get(seg.asSlice(index*sizeof()));
    }
    public static void ld$set(MemorySegment seg, long index, MemorySegment x) {
        constants$6.const$4.set(seg.asSlice(index*sizeof()), x);
    }
    public static VarHandle d$VH() {
        return constants$6.const$5;
    }
    /**
     * Getter for field:
     * {@snippet :
     * double* d;
     * }
     */
    public static MemorySegment d$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$6.const$5.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * double* d;
     * }
     */
    public static void d$set(MemorySegment seg, MemorySegment x) {
        constants$6.const$5.set(seg, x);
    }
    public static MemorySegment d$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$6.const$5.get(seg.asSlice(index*sizeof()));
    }
    public static void d$set(MemorySegment seg, long index, MemorySegment x) {
        constants$6.const$5.set(seg.asSlice(index*sizeof()), x);
    }
    public static VarHandle f$VH() {
        return constants$7.const$0;
    }
    /**
     * Getter for field:
     * {@snippet :
     * float* f;
     * }
     */
    public static MemorySegment f$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$7.const$0.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * float* f;
     * }
     */
    public static void f$set(MemorySegment seg, MemorySegment x) {
        constants$7.const$0.set(seg, x);
    }
    public static MemorySegment f$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$7.const$0.get(seg.asSlice(index*sizeof()));
    }
    public static void f$set(MemorySegment seg, long index, MemorySegment x) {
        constants$7.const$0.set(seg.asSlice(index*sizeof()), x);
    }
    public static VarHandle ldt$VH() {
        return constants$7.const$1;
    }
    /**
     * Getter for field:
     * {@snippet :
     * __mingw_ldbl_type_t* ldt;
     * }
     */
    public static MemorySegment ldt$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$7.const$1.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * __mingw_ldbl_type_t* ldt;
     * }
     */
    public static void ldt$set(MemorySegment seg, MemorySegment x) {
        constants$7.const$1.set(seg, x);
    }
    public static MemorySegment ldt$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$7.const$1.get(seg.asSlice(index*sizeof()));
    }
    public static void ldt$set(MemorySegment seg, long index, MemorySegment x) {
        constants$7.const$1.set(seg.asSlice(index*sizeof()), x);
    }
    public static VarHandle dt$VH() {
        return constants$7.const$2;
    }
    /**
     * Getter for field:
     * {@snippet :
     * __mingw_dbl_type_t* dt;
     * }
     */
    public static MemorySegment dt$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$7.const$2.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * __mingw_dbl_type_t* dt;
     * }
     */
    public static void dt$set(MemorySegment seg, MemorySegment x) {
        constants$7.const$2.set(seg, x);
    }
    public static MemorySegment dt$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$7.const$2.get(seg.asSlice(index*sizeof()));
    }
    public static void dt$set(MemorySegment seg, long index, MemorySegment x) {
        constants$7.const$2.set(seg.asSlice(index*sizeof()), x);
    }
    public static VarHandle ft$VH() {
        return constants$7.const$3;
    }
    /**
     * Getter for field:
     * {@snippet :
     * __mingw_flt_type_t* ft;
     * }
     */
    public static MemorySegment ft$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$7.const$3.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * __mingw_flt_type_t* ft;
     * }
     */
    public static void ft$set(MemorySegment seg, MemorySegment x) {
        constants$7.const$3.set(seg, x);
    }
    public static MemorySegment ft$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$7.const$3.get(seg.asSlice(index*sizeof()));
    }
    public static void ft$set(MemorySegment seg, long index, MemorySegment x) {
        constants$7.const$3.set(seg.asSlice(index*sizeof()), x);
    }
    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); }
}


