You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/NumSharp.Core/Backends/NPTypeCode.cs
-32Lines changed: 0 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -15,64 +15,48 @@ namespace NumSharp
15
15
publicenumNPTypeCode
16
16
{
17
17
/// <summary>A null reference.</summary>
18
-
/// <returns></returns>
19
18
Empty=0,
20
19
21
20
/// <summary>A simple type representing Boolean values of true or false.</summary>
22
-
/// <returns></returns>
23
21
Boolean=3,
24
22
25
23
/// <summary>An integral type representing unsigned 16-bit integers with values between 0 and 65535. The set of possible values for the <see cref="F:System.TypeCode.Char"></see> type corresponds to the Unicode character set.</summary>
26
-
/// <returns></returns>
27
24
Char=4,
28
25
29
26
/// <summary>An integral type representing unsigned 8-bit integers with values between 0 and 255.</summary>
30
-
/// <returns></returns>
31
27
Byte=6,
32
28
33
29
/// <summary>An integral type representing signed 16-bit integers with values between -32768 and 32767.</summary>
34
-
/// <returns></returns>
35
30
Int16=7,
36
31
37
32
/// <summary>An integral type representing unsigned 16-bit integers with values between 0 and 65535.</summary>
38
-
/// <returns></returns>
39
33
UInt16=8,
40
34
41
35
/// <summary>An integral type representing signed 32-bit integers with values between -2147483648 and 2147483647.</summary>
42
-
/// <returns></returns>
43
36
Int32=9,
44
37
45
38
/// <summary>An integral type representing unsigned 32-bit integers with values between 0 and 4294967295.</summary>
46
-
/// <returns></returns>
47
39
UInt32=10,// 0x0000000A
48
40
49
41
/// <summary>An integral type representing signed 64-bit integers with values between -9223372036854775808 and 9223372036854775807.</summary>
50
-
/// <returns></returns>
51
42
Int64=11,// 0x0000000B
52
43
53
44
/// <summary>An integral type representing unsigned 64-bit integers with values between 0 and 18446744073709551615.</summary>
54
-
/// <returns></returns>
55
45
UInt64=12,// 0x0000000C
56
46
57
47
/// <summary>A floating point type representing values ranging from approximately 1.5 x 10 -45 to 3.4 x 10 38 with a precision of 7 digits.</summary>
58
-
/// <returns></returns>
59
48
Single=13,// 0x0000000D
60
49
61
50
/// <summary>A floating point type representing values ranging from approximately 5.0 x 10 -324 to 1.7 x 10 308 with a precision of 15-16 digits.</summary>
62
-
/// <returns></returns>
63
51
Double=14,// 0x0000000E
64
52
65
53
/// <summary>A simple type representing values ranging from 1.0 x 10 -28 to approximately 7.9 x 10 28 with 28-29 significant digits.</summary>
66
-
/// <returns></returns>
67
54
Decimal=15,// 0x0000000F
68
55
69
56
/// <summary>A sealed class type representing Unicode character strings.</summary>
70
-
/// <returns></returns>
71
57
String=18,// 0x00000012
72
58
73
59
Complex=128,//0x00000080
74
-
75
-
NDArray=129,//0x00000081
76
60
}
77
61
78
62
publicstaticclassNPTypeCodeExtensions
@@ -101,11 +85,6 @@ public static NPTypeCode GetTypeCode(this Type type)
101
85
vartc=Type.GetTypeCode(type);
102
86
if(tc==TypeCode.Object)
103
87
{
104
-
if(type==typeof(NDArray))
105
-
{
106
-
returnNPTypeCode.NDArray;
107
-
}
108
-
109
88
if(type==typeof(Complex))
110
89
{
111
90
returnNPTypeCode.Complex;
@@ -152,7 +131,6 @@ public static Type AsType(this NPTypeCode typeCode)
152
131
default:
153
132
thrownewNotSupportedException();
154
133
#else
155
-
case NPTypeCode.NDArray:returntypeof(NDArray);
156
134
case NPTypeCode.Complex:returntypeof(Complex);
157
135
caseNPTypeCode.Boolean:returntypeof(bool);
158
136
caseNPTypeCode.Byte:returntypeof(byte);
@@ -202,7 +180,6 @@ public static int SizeOf(this NPTypeCode typeCode)
202
180
default:
203
181
thrownewNotSupportedException();
204
182
#else
205
-
case NPTypeCode.NDArray:return IntPtr.Size;
206
183
case NPTypeCode.Complex:return InfoOf<Complex>.Size;
207
184
caseNPTypeCode.Boolean:return1;
208
185
caseNPTypeCode.Byte:return1;
@@ -239,7 +216,6 @@ public static bool IsRealNumber(this NPTypeCode typeCode)
239
216
default:
240
217
thrownewNotSupportedException();
241
218
#else
242
-
case NPTypeCode.NDArray:return false;
243
219
case NPTypeCode.Complex:return true;
244
220
case NPTypeCode.Boolean:return false;
245
221
case NPTypeCode.Byte:return false;
@@ -276,7 +252,6 @@ public static bool IsUnsigned(this NPTypeCode typeCode)
276
252
default:
277
253
thrownewNotSupportedException();
278
254
#else
279
-
case NPTypeCode.NDArray:return false;
280
255
case NPTypeCode.Complex:return false;
281
256
case NPTypeCode.Boolean:return true;
282
257
case NPTypeCode.Byte:return true;
@@ -313,7 +288,6 @@ public static bool IsSigned(this NPTypeCode typeCode)
313
288
default:
314
289
thrownewNotSupportedException();
315
290
#else
316
-
case NPTypeCode.NDArray:return false;
317
291
case NPTypeCode.Complex:return false;
318
292
case NPTypeCode.Boolean:return false;
319
293
case NPTypeCode.Byte:return false;
@@ -370,7 +344,6 @@ internal static int GetGroup(this NPTypeCode typeCode)
370
344
caseNPTypeCode.Decimal:return4;
371
345
372
346
caseNPTypeCode.Complex:return10;
373
-
caseNPTypeCode.NDArray:return100;
374
347
default:
375
348
thrownewNotSupportedException();
376
349
#endif
@@ -411,7 +384,6 @@ internal static int GetPriority(this NPTypeCode typeCode)
0 commit comments