Struct short2
2 26 bits integers
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Hybridizer.Runtime.CUDAImports
Assembly: Hybridizer.Runtime.CUDAImports.dll
Syntax
[IntrinsicType("short2")]
public struct short2
Constructors
short2(short2)
copy constructor
Declaration
public short2(short2 res)
Parameters
Type | Name | Description |
---|---|---|
short2 | res |
short2(Int16)
constructor from single component
Declaration
public short2(short val)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | val |
short2(Int16, Int16)
constructor from components
Declaration
public short2(short xx, short yy)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | xx | |
System.Int16 | yy |
short2(Int32)
constructor from 32 bits integer
Declaration
public short2(int val)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | val |
Fields
x
x
Declaration
public short x
Field Value
Type | Description |
---|---|
System.Int16 |
y
y
Declaration
public short y
Field Value
Type | Description |
---|---|
System.Int16 |
Methods
Load(short2*, Int32)
loads from memory
Declaration
[IntrinsicFunction(IsNaked = true, Name = "__hybridizer_load_short2")]
public static short2 Load(short2*ptr, int alignment)
Parameters
Type | Name | Description |
---|---|---|
short2* | ptr | |
System.Int32 | alignment | has to be a compile time constant |
Returns
Type | Description |
---|---|
short2 |
Store(short2*, short2, Int32)
stores in memory
Declaration
[IntrinsicFunction(IsNaked = true, Name = "__hybridizer_store_short2")]
public static void Store(short2*ptr, short2 val, int alignment)
Parameters
Type | Name | Description |
---|---|---|
short2* | ptr | destination pointer |
short2 | val | value to store |
System.Int32 | alignment | has to be a compile time constant |
Store(short2*, SByte, Int32)
stores in memory
Declaration
[IntrinsicFunction(IsNaked = true, Name = "__hybridizer_store_splat_short2")]
public static void Store(short2*ptr, sbyte val, int alignment)
Parameters
Type | Name | Description |
---|---|---|
short2* | ptr | destination pointer |
System.SByte | val | value to store |
System.Int32 | alignment | has to be a compile time constant |
Operators
Addition(short2, short2)
addition operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator+")]
public static short2 operator +(short2 a, short2 b)
Parameters
Type | Name | Description |
---|---|---|
short2 | a | |
short2 | b |
Returns
Type | Description |
---|---|
short2 |
Addition(short2, Int16)
addition operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator+")]
public static short2 operator +(short2 a, short b)
Parameters
Type | Name | Description |
---|---|---|
short2 | a | |
System.Int16 | b |
Returns
Type | Description |
---|---|
short2 |
Addition(Int16, short2)
addition operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator+")]
public static short2 operator +(short a, short2 b)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | a | |
short2 | b |
Returns
Type | Description |
---|---|
short2 |
Division(short2, short2)
division operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator/")]
public static short2 operator /(short2 a, short2 b)
Parameters
Type | Name | Description |
---|---|---|
short2 | a | |
short2 | b |
Returns
Type | Description |
---|---|
short2 |
Division(short2, Int16)
division operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator/")]
public static short2 operator /(short2 a, short b)
Parameters
Type | Name | Description |
---|---|---|
short2 | a | |
System.Int16 | b |
Returns
Type | Description |
---|---|
short2 |
Division(Int16, short2)
division operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator/")]
public static short2 operator /(short a, short2 b)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | a | |
short2 | b |
Returns
Type | Description |
---|---|
short2 |
Explicit(short2 to Int32)
conversion to 32 bits integer
Declaration
public static explicit operator int (short2 res)
Parameters
Type | Name | Description |
---|---|---|
short2 | res |
Returns
Type | Description |
---|---|
System.Int32 |
Multiply(short2, short2)
multiplication operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator*")]
public static short2 operator *(short2 a, short2 b)
Parameters
Type | Name | Description |
---|---|---|
short2 | a | |
short2 | b |
Returns
Type | Description |
---|---|
short2 |
Multiply(short2, Int16)
multiplication operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator*")]
public static short2 operator *(short2 a, short b)
Parameters
Type | Name | Description |
---|---|---|
short2 | a | |
System.Int16 | b |
Returns
Type | Description |
---|---|
short2 |
Multiply(Int16, short2)
multiplication operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator*")]
public static short2 operator *(short a, short2 b)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | a | |
short2 | b |
Returns
Type | Description |
---|---|
short2 |
Subtraction(short2, short2)
substraction operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator-")]
public static short2 operator -(short2 a, short2 b)
Parameters
Type | Name | Description |
---|---|---|
short2 | a | |
short2 | b |
Returns
Type | Description |
---|---|
short2 |
Subtraction(short2, Int16)
substraction operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator-")]
public static short2 operator -(short2 a, short b)
Parameters
Type | Name | Description |
---|---|---|
short2 | a | |
System.Int16 | b |
Returns
Type | Description |
---|---|
short2 |
Subtraction(Int16, short2)
substraction operator
Declaration
[IntrinsicFunction(IsNaked = true, Name = "operator-")]
public static short2 operator -(short a, short2 b)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | a | |
short2 | b |
Returns
Type | Description |
---|---|
short2 |