@Namespace(value="tvm::runtime") @NoOffset @Properties(inherit=tvm_runtime.class) public class DataType extends Pointer
| Modifier and Type | Class and Description |
|---|---|
static class |
DataType.TypeCode
\brief Type code for the DataType.
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
DataType()
\brief default constructor
|
DataType(DLDataType dtype)
\brief Constructor
|
DataType(int code,
int bits,
int lanes) |
DataType(int code,
int bits,
int lanes,
boolean is_scalable)
\brief Constructor
|
DataType(long size)
Native array allocator.
|
DataType(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
DLDataType |
asDLDataType()
\brief Converter to DLDataType
|
static DataType |
BFloat(int bits) |
static DataType |
BFloat(int bits,
int lanes)
\brief Construct an bfloat type.
|
int |
bits() |
static DataType |
Bool() |
static DataType |
Bool(int lanes,
boolean is_scalable)
\brief Construct a bool type.
|
int |
bytes() |
int |
code() |
DataType |
element_of()
\brief Get the scalar version of the type.
|
boolean |
equals(DataType other)
\brief Equal comparator.
|
static DataType |
Float(int bits) |
static DataType |
Float(int bits,
int lanes)
\brief Construct an float type.
|
int |
get_lanes_or_vscale_factor() |
DataType |
getPointer(long i) |
static DataType |
Handle() |
static DataType |
Handle(int bits,
int lanes)
\brief Construct a handle type.
|
static DataType |
Int(int bits) |
static DataType |
Int(int bits,
int lanes)
\brief Construct an int type.
|
boolean |
is_bfloat16() |
boolean |
is_bool() |
boolean |
is_e4m3_float8() |
boolean |
is_e5m2_float8() |
boolean |
is_fixed_length_vector() |
boolean |
is_float() |
boolean |
is_float16() |
boolean |
is_float8() |
boolean |
is_handle() |
boolean |
is_int() |
boolean |
is_scalable_or_fixed_length_vector() |
boolean |
is_scalable_vector() |
boolean |
is_scalar() |
boolean |
is_uint() |
boolean |
is_vector_bool() |
boolean |
is_vector() |
boolean |
is_void() |
int |
lanes() |
boolean |
notEquals(DataType other)
\brief NotEqual comparator.
|
static DataType |
NVFloat8E4M3() |
static DataType |
NVFloat8E4M3(int lanes)
\brief Construct NV float8 e4m3 datatype.
|
static DataType |
NVFloat8E5M2() |
static DataType |
NVFloat8E5M2(int lanes)
\brief Construct NV float8 e5m2 datatype.
|
DataType |
position(long position) |
DataType |
put(DataType rhs)
\brief Assignment operator.
|
static DataType |
ShapeIndex()
\brief Get the corresponding type of TVMShapeIndex.
|
static DataType |
UInt(int bits) |
static DataType |
UInt(int bits,
int lanes,
boolean is_scalable)
\brief Construct an uint type.
|
static DataType |
Void()
\brief Construct a Void type.
|
int |
vscale_factor() |
DataType |
with_bits(int bits)
\brief Create a new data type by change bits to a specified value.
|
DataType |
with_lanes(int lanes)
\brief Create a new data type by change lanes to a specified value.
|
DataType |
with_scalable_vscale_factor(int vscale_factor)
\brief Create a new scalable vector data type by changing the vscale multiplier to a specified
value.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic DataType(Pointer p)
Pointer(Pointer).public DataType(long size)
Pointer.position(long).public DataType()
public DataType(@ByVal DLDataType dtype)
dtype - The DLDataTypepublic DataType(int code,
int bits,
int lanes,
@Cast(value="bool")
boolean is_scalable)
code - The type code.bits - The number of bits in the type.lanes - The number of lanes.is_scalable - Whether the data type is scalable.public DataType(int code,
int bits,
int lanes)
public DataType getPointer(long i)
getPointer in class Pointerpublic int code()
public int bits()
public int bytes()
public int lanes()
public int vscale_factor()
public int get_lanes_or_vscale_factor()
@Cast(value="bool") public boolean is_bfloat16()
@Cast(value="bool") public boolean is_scalable_or_fixed_length_vector()
@Cast(value="bool") public boolean is_fixed_length_vector()
@Cast(value="bool") public boolean is_scalable_vector()
@Cast(value="bool") public boolean is_vector_bool()
@ByVal public DataType with_lanes(int lanes)
lanes - The target number of lanes.@ByVal public DataType with_scalable_vscale_factor(int vscale_factor)
@ByVal public DataType with_bits(int bits)
bits - The target number of bits.@ByVal public DataType element_of()
@ByRef @Name(value="operator =") public DataType put(@Const @ByRef DataType rhs)
@Cast(value="bool") @Name(value="operator ==") public boolean equals(@Const @ByRef DataType other)
other - The data type to compare against.@Cast(value="bool") @Name(value="operator !=") public boolean notEquals(@Const @ByRef DataType other)
other - The data type to compare against.@ByVal @Name(value="operator DLDataType") public DLDataType asDLDataType()
@ByVal public static DataType Int(int bits, int lanes)
bits - The number of bits in the type.lanes - The number of lanes.@ByVal public static DataType UInt(int bits, int lanes, @Cast(value="bool") boolean is_scalable)
bits - The number of bits in the type.lanes - The number of lanes.is_scalable - Whether the data type is scalable.@ByVal public static DataType Float(int bits, int lanes)
bits - The number of bits in the type.lanes - The number of lanes@ByVal public static DataType BFloat(int bits, int lanes)
bits - The number of bits in the type.lanes - The number of lanes@ByVal public static DataType NVFloat8E4M3(int lanes)
lanes - The number of lanes@ByVal public static DataType NVFloat8E5M2(int lanes)
lanes - The number of lanes@ByVal public static DataType Bool(int lanes, @Cast(value="bool") boolean is_scalable)
lanes - The number of lanes.is_scalable - Whether the data type is scalable.@ByVal public static DataType Handle(int bits, int lanes)
bits - The number of bits in the type.lanes - The number of lanes@ByVal public static DataType Void()
Copyright © 2024. All rights reserved.