@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)
\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
|
int |
bits() |
static DataType |
Bool() |
static DataType |
Bool(int lanes)
\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 uint type.
|
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_float() |
boolean |
is_float16() |
boolean |
is_handle() |
boolean |
is_int() |
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.
|
DataType |
position(long position) |
static DataType |
ShapeIndex()
\brief Get the corresponding type of TVMShapeIndex.
|
static DataType |
UInt(int bits) |
static DataType |
UInt(int bits,
int lanes)
\brief Construct an uint type.
|
static DataType |
Void()
\brief Construct a Void type.
|
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.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, 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)
code - The type code.bits - The number of bits in the type.lanes - The number of lanes.public DataType getPointer(long i)
getPointer in class Pointerpublic int code()
public int bits()
public int bytes()
public int lanes()
@Cast(value="bool") public boolean is_bfloat16()
@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_bits(int bits)
bits - The target number of bits.@ByVal public DataType element_of()
@Cast(value="bool") @Name(value="operator ==") public boolean equals(@Const @ByRef DataType other)
other - The data type to compre against.@Cast(value="bool") @Name(value="operator !=") public boolean notEquals(@Const @ByRef DataType other)
other - The data type to compre 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)
bits - The number of bits in the type.lanes - The number of lanes@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 Bool(int lanes)
lanes - The number of lanes@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 © 2021. All rights reserved.