ホーム › System.Diagnostics.Debug › ARM64_NT_NEON128
ARM64_NT_NEON128
共用体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Anonymous | _Anonymous_e__Struct | 16 | +0 | +0 | 128ビット値を上位/下位64ビットに分けて格納する無名構造体。 |
| D | DOUBLE | 16 | +0 | +0 | ダブル精度(64ビット)浮動小数点として解釈する配列。 |
| S | FLOAT | 16 | +0 | +0 | 単精度(32ビット)浮動小数点として解釈する配列。 |
| H | WORD | 16 | +0 | +0 | ハーフワード(16ビット)として解釈する配列。 |
| B | BYTE | 16 | +0 | +0 | バイト(8ビット)として解釈する配列。 |
構造体: _Anonymous_e__Struct x64 16B / x86 16B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| Low | ULONGLONG | 8 | +0 | +0 |
| High | LONGLONG | 8 | +8 | +8 |
各言語での定義
#include <windows.h>
// ARM64_NT_NEON128 (x64 16 / x86 16 バイト)
typedef struct ARM64_NT_NEON128 {
_Anonymous_e__Struct Anonymous;
DOUBLE D[2];
FLOAT S[4];
WORD H[8];
BYTE B[16];
} ARM64_NT_NEON128;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ARM64_NT_NEON128
{
public _Anonymous_e__Struct Anonymous;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public double[] D;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public float[] S;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public ushort[] H;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] B;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ARM64_NT_NEON128
Public Anonymous As _Anonymous_e__Struct
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=2)> Public D() As Double
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=4)> Public S() As Single
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public H() As UShort
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=16)> Public B() As Byte
End Structureimport ctypes
from ctypes import wintypes
class ARM64_NT_NEON128(ctypes.Structure):
_fields_ = [
("Anonymous", _Anonymous_e__Struct),
("D", ctypes.c_double * 2),
("S", ctypes.c_float * 4),
("H", ctypes.c_ushort * 8),
("B", ctypes.c_ubyte * 16),
]#[repr(C)]
pub struct ARM64_NT_NEON128 {
pub Anonymous: _Anonymous_e__Struct,
pub D: [f64; 2],
pub S: [f32; 4],
pub H: [u16; 8],
pub B: [u8; 16],
}import "golang.org/x/sys/windows"
type ARM64_NT_NEON128 struct {
Anonymous _Anonymous_e__Struct
D [2]float64
S [4]float32
H [8]uint16
B [16]byte
}type
ARM64_NT_NEON128 = record
Anonymous: _Anonymous_e__Struct;
D: array[0..1] of Double;
S: array[0..3] of Single;
H: array[0..7] of Word;
B: array[0..15] of Byte;
end;const ARM64_NT_NEON128 = extern struct {
Anonymous: _Anonymous_e__Struct,
D: [2]f64,
S: [4]f32,
H: [8]u16,
B: [16]u8,
};type
ARM64_NT_NEON128 {.bycopy.} = object
Anonymous: _Anonymous_e__Struct
D: array[2, float64]
S: array[4, float32]
H: array[8, uint16]
B: array[16, uint8]struct ARM64_NT_NEON128
{
_Anonymous_e__Struct Anonymous;
double[2] D;
float[4] S;
ushort[8] H;
ubyte[16] B;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ARM64_NT_NEON128 サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; Anonymous : _Anonymous_e__Struct (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; D : DOUBLE (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; S : FLOAT (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; H : WORD (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; B : BYTE (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ARM64_NT_NEON128
#field _Anonymous_e__Struct Anonymous
#field double D 2
#field float S 4
#field short H 8
#field byte B 16
#endstruct
stdim st, ARM64_NT_NEON128 ; NSTRUCT 変数を確保