• Abnorc@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    4 months ago

    Gender is a second order tensor, so you should store it as a pointer to an array of pointers for maximum read/write speed.

    • Gladaed@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      4 months ago

      That’s only due to technical reasons on weird platforms like x86, 64bit x86 or ARM.

    • ZILtoid1991@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      4 months ago

      Gender is a struct

      struct Gender {
        byte binaryBias;    ///Determines male (+) or female (-) bias if present
        ubyte binaryAm;    ///Determines the amount of binary gender(s) present
        bool isTrans;    ///True if assigned at birth gender does not equal with current one
        ubyte xenoAm;    ///Determines the amount of xenogender
        uint xenoGen;    ///Xenogender selection, 0 if not applicable
        Sex* sex;    ///Pointer to the person's current sex
      }