Module: Gogyou::Primitives
- Defined in:
- lib/gogyou/primitives.rb
Defined Under Namespace
Classes: Primitive
Constant Summary collapse
- SIZE_T =
Primitive[:size_t, TypeSpec::SIZEOF_SIZE_T, TypeSpec::SIZEOF_SIZE_T, ->(buf, offset, num) { buf.store_sizet(offset, num) }, ->(buf, offset) { buf.load_sizet(offset) }].freeze
- SSIZE_T =
Primitive[:ssize_t, TypeSpec::SIZEOF_SIZE_T, TypeSpec::SIZEOF_SIZE_T, ->(buf, offset, num) { buf.store_sizet(offset, num) }, ->(buf, offset) { buf.load_ssizet(offset) }].freeze
- INTPTR_T =
Primitive[:intptr_t, TypeSpec::SIZEOF_SIZE_T, TypeSpec::SIZEOF_SIZE_T, ->(buf, offset, num) { buf.store_sizet(offset, num) }, ->(buf, offset) { buf.load_ssizet(offset) }].freeze
- UINTPTR_T =
Primitive[:uintptr_t, TypeSpec::SIZEOF_SIZE_T, TypeSpec::SIZEOF_SIZE_T, ->(buf, offset, num) { buf.store_sizet(offset, num) }, ->(buf, offset) { buf.load_sizet(offset) }].freeze
- INT8_T =
Primitive[:int8_t, 1, 1, ->(buf, offset, num) { buf.store8(offset, num) }, ->(buf, offset) { buf.loadi8(offset) }].freeze
- UINT8_T =
Primitive[:uint8_t, 1, 1, ->(buf, offset, num) { buf.store8(offset, num) }, ->(buf, offset) { buf.loadu8(offset) }].freeze
- INT16_T =
Primitive[:int16_t, 2, 2, ->(buf, offset, num) { buf.store16(offset, num) }, ->(buf, offset) { buf.loadi16(offset) }].freeze
- UINT16_T =
Primitive[:uint16_t, 2, 2, ->(buf, offset, num) { buf.store16(offset, num) }, ->(buf, offset) { buf.loadu16(offset) }].freeze
- INT24_T =
Primitive[:int24_t, 3, 1, ->(buf, offset, num) { buf.store24(offset, num) }, ->(buf, offset) { buf.loadi24(offset) }].freeze
- UINT24_T =
Primitive[:uint24_t, 3, 1, ->(buf, offset, num) { buf.store24(offset, num) }, ->(buf, offset) { buf.loadu24(offset) }].freeze
- INT32_T =
Primitive[:int32_t, 4, 4, ->(buf, offset, num) { buf.store32(offset, num) }, ->(buf, offset) { buf.loadi32(offset) }].freeze
- UINT32_T =
Primitive[:uint32_t, 4, 4, ->(buf, offset, num) { buf.store32(offset, num) }, ->(buf, offset) { buf.loadu32(offset) }].freeze
- INT48_T =
Primitive[:int48_t, 6, 2, ->(buf, offset, num) { buf.store48(offset, num) }, ->(buf, offset) { buf.loadi48(offset) }].freeze
- UINT48_T =
Primitive[:uint48_t, 6, 2, ->(buf, offset, num) { buf.store48(offset, num) }, ->(buf, offset) { buf.loadu48(offset) }].freeze
- INT64_T =
Primitive[:int64_t, 8, 8, ->(buf, offset, num) { buf.store64(offset, num) }, ->(buf, offset) { buf.loadi64(offset) }].freeze
- UINT64_T =
Primitive[:uint64_t, 8, 8, ->(buf, offset, num) { buf.store64(offset, num) }, ->(buf, offset) { buf.loadu64(offset) }].freeze
- INT16_BE =
Primitive[:int16_be, 2, 2, ->(buf, offset, num) { buf.store16be(offset, num) }, ->(buf, offset) { buf.loadi16be(offset) }].freeze
- UINT16_BE =
Primitive[:uint16_be, 2, 2, ->(buf, offset, num) { buf.store16be(offset, num) }, ->(buf, offset) { buf.loadu16be(offset) }].freeze
- INT24_BE =
Primitive[:int24_be, 3, 1, ->(buf, offset, num) { buf.store24be(offset, num) }, ->(buf, offset) { buf.loadi24be(offset) }].freeze
- UINT24_BE =
Primitive[:uint24_be, 3, 1, ->(buf, offset, num) { buf.store24be(offset, num) }, ->(buf, offset) { buf.loadu24be(offset) }].freeze
- INT32_BE =
Primitive[:int32_be, 4, 4, ->(buf, offset, num) { buf.store32be(offset, num) }, ->(buf, offset) { buf.loadi32be(offset) }].freeze
- UINT32_BE =
Primitive[:uint32_be, 4, 4, ->(buf, offset, num) { buf.store32be(offset, num) }, ->(buf, offset) { buf.loadu32be(offset) }].freeze
- INT48_BE =
Primitive[:int48_be, 6, 2, ->(buf, offset, num) { buf.store48be(offset, num) }, ->(buf, offset) { buf.loadi48be(offset) }].freeze
- UINT48_BE =
Primitive[:uint48_be, 6, 2, ->(buf, offset, num) { buf.store48be(offset, num) }, ->(buf, offset) { buf.loadu48be(offset) }].freeze
- INT64_BE =
Primitive[:int64_be, 8, 8, ->(buf, offset, num) { buf.store64be(offset, num) }, ->(buf, offset) { buf.loadi64be(offset) }].freeze
- UINT64_BE =
Primitive[:uint64_be, 8, 8, ->(buf, offset, num) { buf.store64be(offset, num) }, ->(buf, offset) { buf.loadu64be(offset) }].freeze
- INT16_LE =
Primitive[:int16_le, 2, 2, ->(buf, offset, num) { buf.store16le(offset, num) }, ->(buf, offset) { buf.loadi16le(offset) }].freeze
- UINT16_LE =
Primitive[:uint16_le, 2, 2, ->(buf, offset, num) { buf.store16le(offset, num) }, ->(buf, offset) { buf.loadu16le(offset) }].freeze
- INT24_LE =
Primitive[:int24_le, 3, 1, ->(buf, offset, num) { buf.store24le(offset, num) }, ->(buf, offset) { buf.loadi24le(offset) }].freeze
- UINT24_LE =
Primitive[:uint24_le, 3, 1, ->(buf, offset, num) { buf.store24le(offset, num) }, ->(buf, offset) { buf.loadu24le(offset) }].freeze
- INT32_LE =
Primitive[:int32_le, 4, 4, ->(buf, offset, num) { buf.store32le(offset, num) }, ->(buf, offset) { buf.loadi32le(offset) }].freeze
- UINT32_LE =
Primitive[:uint32_le, 4, 4, ->(buf, offset, num) { buf.store32le(offset, num) }, ->(buf, offset) { buf.loadu32le(offset) }].freeze
- INT48_LE =
Primitive[:int48_le, 6, 2, ->(buf, offset, num) { buf.store48le(offset, num) }, ->(buf, offset) { buf.loadi48le(offset) }].freeze
- UINT48_LE =
Primitive[:uint48_le, 6, 2, ->(buf, offset, num) { buf.store48le(offset, num) }, ->(buf, offset) { buf.loadu48le(offset) }].freeze
- INT64_LE =
Primitive[:int64_le, 8, 8, ->(buf, offset, num) { buf.store64le(offset, num) }, ->(buf, offset) { buf.loadi64le(offset) }].freeze
- UINT64_LE =
Primitive[:uint64_le, 8, 8, ->(buf, offset, num) { buf.store64le(offset, num) }, ->(buf, offset) { buf.loadu64le(offset) }].freeze
- INT16_SWAP =
Primitive[:int16_swap, 2, 2, ->(buf, offset, num) { buf.store16swap(offset, num) }, ->(buf, offset) { buf.loadi16swap(offset) }].freeze
- UINT16_SWAP =
Primitive[:uint16_swap, 2, 2, ->(buf, offset, num) { buf.store16swap(offset, num) }, ->(buf, offset) { buf.loadu16swap(offset) }].freeze
- INT24_SWAP =
Primitive[:int24_swap, 3, 1, ->(buf, offset, num) { buf.store24swap(offset, num) }, ->(buf, offset) { buf.loadi24swap(offset) }].freeze
- UINT24_SWAP =
Primitive[:uint24_swap, 3, 1, ->(buf, offset, num) { buf.store24swap(offset, num) }, ->(buf, offset) { buf.loadu24swap(offset) }].freeze
- INT32_SWAP =
Primitive[:int32_swap, 4, 4, ->(buf, offset, num) { buf.store32swap(offset, num) }, ->(buf, offset) { buf.loadi32swap(offset) }].freeze
- UINT32_SWAP =
Primitive[:uint32_swap, 4, 4, ->(buf, offset, num) { buf.store32swap(offset, num) }, ->(buf, offset) { buf.loadu32swap(offset) }].freeze
- INT48_SWAP =
Primitive[:int48_swap, 6, 2, ->(buf, offset, num) { buf.store48swap(offset, num) }, ->(buf, offset) { buf.loadi48swap(offset) }].freeze
- UINT48_SWAP =
Primitive[:uint48_swap, 6, 2, ->(buf, offset, num) { buf.store48swap(offset, num) }, ->(buf, offset) { buf.loadu48swap(offset) }].freeze
- INT64_SWAP =
Primitive[:int64_swap, 8, 8, ->(buf, offset, num) { buf.store64swap(offset, num) }, ->(buf, offset) { buf.loadi64swap(offset) }].freeze
- UINT64_SWAP =
Primitive[:uint64_swap, 8, 8, ->(buf, offset, num) { buf.store64swap(offset, num) }, ->(buf, offset) { buf.loadu64swap(offset) }].freeze
- CHAR =
Primitive[:char, 1, 1, ->(buf, offset, num) { buf.store8(offset, num) }, ->(buf, offset) { buf.loadi8(offset) }].freeze
- UCHAR =
Primitive[:uchar, 1, 1, ->(buf, offset, num) { buf.store8(offset, num) }, ->(buf, offset) { buf.loadu8(offset) }].freeze
- SHORT =
Primitive[:short, 2, 2, ->(buf, offset, num) { buf.store16(offset, num) }, ->(buf, offset) { buf.loadi16(offset) }].freeze
- USHORT =
Primitive[:ushort, 2, 2, ->(buf, offset, num) { buf.store16(offset, num) }, ->(buf, offset) { buf.loadu16(offset) }].freeze
- INT =
Primitive[:int, 4, 4, ->(buf, offset, num) { buf.store32(offset, num) }, ->(buf, offset) { buf.loadi32(offset) }].freeze
- UINT =
Primitive[:uint, 4, 4, ->(buf, offset, num) { buf.store32(offset, num) }, ->(buf, offset) { buf.loadu32(offset) }].freeze
- LONG =
Primitive[:long, TypeSpec::SIZEOF_LONG, TypeSpec::SIZEOF_LONG, ->(buf, offset, num) { buf.store_long(offset, num) }, ->(buf, offset) { buf.load_long(offset) }].freeze
- ULONG =
Primitive[:ulong, TypeSpec::SIZEOF_LONG, TypeSpec::SIZEOF_LONG, ->(buf, offset, num) { buf.store_long(offset, num) }, ->(buf, offset) { buf.load_ulong(offset) }].freeze
- LONGLONG =
Primitive[:longlong, 8, 8, ->(buf, offset, num) { buf.store64(offset, num) }, ->(buf, offset) { buf.loadi64(offset) }].freeze
- ULONGLONG =
Primitive[:ulonglong, 8, 8, ->(buf, offset, num) { buf.store64(offset, num) }, ->(buf, offset) { buf.loadu64(offset) }].freeze
- FLOAT =
Primitive[:float, 4, 4, ->(buf, offset, num) { buf.storef32(offset, num) }, ->(buf, offset) { buf.loadf32(offset) }].freeze
- DOUBLE =
Primitive[:double, 8, 8, ->(buf, offset, num) { buf.storef64(offset, num) }, ->(buf, offset) { buf.loadf64(offset) }].freeze
- FLOAT_BE =
Primitive[:float_be, 4, 4, ->(buf, offset, num) { buf.storef32be(offset, num) }, ->(buf, offset) { buf.loadf32be(offset) }].freeze
- DOUBLE_BE =
Primitive[:double_be, 8, 8, ->(buf, offset, num) { buf.storef64be(offset, num) }, ->(buf, offset) { buf.loadf64be(offset) }].freeze
- FLOAT_LE =
Primitive[:float_le, 4, 4, ->(buf, offset, num) { buf.storef32le(offset, num) }, ->(buf, offset) { buf.loadf32le(offset) }].freeze
- DOUBLE_LE =
Primitive[:double_le, 8, 8, ->(buf, offset, num) { buf.storef64le(offset, num) }, ->(buf, offset) { buf.loadf64le(offset) }].freeze
- FLOAT_SWAP =
Primitive[:float_swap, 4, 4, ->(buf, offset, num) { buf.storef32swap(offset, num) }, ->(buf, offset) { buf.loadf32swap(offset) }].freeze
- DOUBLE_SWAP =
Primitive[:double_swap, 8, 8, ->(buf, offset, num) { buf.storef64swap(offset, num) }, ->(buf, offset) { buf.loadf64swap(offset) }].freeze