2 instantiations of Conversions
Microsoft.ML.Data (2)
Data\Conversion.cs (2)
64
Interlocked.CompareExchange(ref _defaultInstance, new
Conversions
(), null) ??
73
return new
Conversions
(doubleParserOptionFlags);
51 references to Conversions
Microsoft.ML.Data (51)
Commands\ShowSchemaCommand.cs (2)
237
var conv =
Conversions
.DefaultInstance.GetStringConversion<T>(type);
275
var conv =
Conversions
.DefaultInstance.GetStringConversion<T>(type.ItemType);
Commands\TypeInfoCommand.cs (4)
82
var
conv =
Conversions
.DefaultInstance;
146
var
conv =
Conversions
.DefaultInstance;
Data\Conversion.cs (5)
51
private static readonly FuncInstanceMethodInfo1<
Conversions
, KeyDataViewType, Delegate> _getKeyParseMethodInfo
52
= FuncInstanceMethodInfo1<
Conversions
, KeyDataViewType, Delegate>.Create(target => target.GetKeyParse<int>);
58
private static volatile
Conversions
_defaultInstance;
59
public static
Conversions
DefaultInstance
71
public static
Conversions
CreateInstanceWithDoubleParserOptions(DoubleParser.OptionFlags doubleParserOptionFlags)
Data\DataViewUtils.cs (2)
1361
if (!
Conversions
.DefaultInstance.TryGetStringConversion<T>(colType, out conversion))
1392
Conversions
.DefaultInstance.TryGetStringConversion<T>(colType, out conversion);
Data\RowCursorUtils.cs (4)
97
var conv =
Conversions
.DefaultInstance.GetStandardConversion<TSrc, TDst>(typeSrc, typeDst, out identity);
115
/// <see cref="
Conversions
.GetStringConversion{TSrc}(DataViewType)"/> on the input
137
var conv =
Conversions
.DefaultInstance.GetStringConversion<TSrc>(typeSrc);
263
var conv =
Conversions
.DefaultInstance.GetStandardConversion<TSrc, TDst>(typeSrc.ItemType, typeDst, out identity);
DataLoadSave\Text\TextLoaderParser.cs (6)
56
private readonly
Conversions
_conv;
65
_conv =
Conversions
.DefaultInstance;
67
_conv =
Conversions
.CreateInstanceWithDoubleParserOptions(doubleParserOptionFlags);
265
HasNA =
Conversions
.DefaultInstance.TryGetIsNAPredicate(type, out var del);
450
HasNA =
Conversions
.DefaultInstance.TryGetIsNAPredicate(type, out var del);
1074
if (!
Conversions
.DefaultInstance.TryParse(in spanT, out csrc) || csrc <= 0)
DataLoadSave\Text\TextSaver.cs (1)
126
Conv =
Conversions
.DefaultInstance.GetStringConversion<T>(type);
DataView\LambdaColumnMapper.cs (1)
59
else if (!
Conversions
.DefaultInstance.TryGetStandardConversion(typeOrig, typeSrc, out conv, out ident))
DataView\LambdaFilter.cs (1)
50
else if (!
Conversions
.DefaultInstance.TryGetStandardConversion(typeOrig, typeSrc, out conv, out ident))
DataView\Transposer.cs (2)
374
var isDefault = Conversion.
Conversions
.DefaultInstance.GetIsDefaultPredicate<T>(_view.Schema[_col].Type);
522
InPredicate<T> isDefault = Conversion.
Conversions
.DefaultInstance.GetIsDefaultPredicate<T>(itemType);
Transforms\InvertHashUtils.cs (2)
41
var
conv = Conversion.
Conversions
.DefaultInstance;
Transforms\KeyToValue.cs (3)
326
_na = Data.Conversion.
Conversions
.DefaultInstance.GetNAOrDefault<TValue>(outputItemType, out _naMapsToDefault);
331
_isDefault = Data.Conversion.
Conversions
.DefaultInstance.GetIsDefaultPredicate<TValue>(outputItemType);
335
_convertToUInt = Data.Conversion.
Conversions
.DefaultInstance.GetStandardConversion<TKey, UInt32>(typeKey, NumberDataViewType.UInt32, out identity);
Transforms\NAFilter.cs (2)
300
var hasBad = Data.Conversion.
Conversions
.DefaultInstance.GetIsNAPredicate<T>(info.Type);
312
var hasBad = Data.Conversion.
Conversions
.DefaultInstance.GetHasMissingPredicate<T>((VectorDataViewType)info.Type);
Transforms\RangeFilter.cs (1)
435
_conv = Data.Conversion.
Conversions
.DefaultInstance.GetStandardConversion<T, ulong>(Parent._type, NumberDataViewType.UInt64, out identity);
Transforms\TypeConverting.cs (2)
424
if (!Data.Conversion.
Conversions
.DefaultInstance.TryGetStandardConversion(srcType.GetItemType(), itemType, out Delegate del, out bool identity))
632
if (!Data.Conversion.
Conversions
.DefaultInstance.TryGetStandardConversion(col.ItemType, newType, out Delegate del, out bool identity))
Transforms\ValueMapping.cs (3)
499
if (Data.Conversion.
Conversions
.DefaultInstance.TryParseKey(in value, ulong.MaxValue - 1, out res))
508
else if (Microsoft.ML.Data.Conversion.
Conversions
.DefaultInstance.TryParse(in value, out res))
869
if (Data.Conversion.
Conversions
.DefaultInstance.TryGetStandardConversion<ReadOnlyMemory<char>, TValue>(
Transforms\ValueToKeyMappingTransformerImpl.cs (10)
70
if (!Data.Conversion.
Conversions
.DefaultInstance.TryGetIsNAPredicate(type, out mapsToMissing))
210
var tryParse = Data.Conversion.
Conversions
.DefaultInstance.GetTryParseConversion<T>(ItemType);
236
var tryParse = Data.Conversion.
Conversions
.DefaultInstance.GetTryParseConversion<T>(ItemType);
751
var stringMapper = Data.Conversion.
Conversions
.DefaultInstance.GetStringConversion<T>(ItemType);
1049
var
conv = Data.Conversion.
Conversions
.DefaultInstance;
1115
var
convInst = Data.Conversion.
Conversions
.DefaultInstance;
1195
var
convInst = Data.Conversion.
Conversions
.DefaultInstance;