# This file contains all the header-only C++ APIs/symbols in torch.
# If a symbol is added in this file, it should be tested in a .cpp file
# to guarantee that compiling these symbols do not require linking libtorch
# to ensure header-only-ness.

# torch/headeronly/util/shim_utils.h
TORCH_ERROR_CODE_CHECK

# c10/util/TypeCast.h
convert

# torch/headeronly/util/bit_cast.h
bit_cast

# torch/headeronly/util/BFloat16.h
BFloat16

# torch/headeronly/util/Float4_e2m1fn_x2.h
Float4_e2m1fn_x2

# torch/headeronly/util/Float8_e4m3fn.h
Float8_e4m3fn

# torch/headeronly/util/Float8_e4m3fnuz.h
Float8_e4m3fnuz

# torch/headeronly/util/Float8_e5m2.h
Float8_e5m2

# torch/headeronly/util/Float8_e5m2fnuz.h
Float8_e5m2fnuz

# torch/headeronly/util/Float8_e8m0fnu.h
Float8_e8m0fnu

# torch/headeronly/util/Half.h
Half
fp16_ieee_from_fp32_value
fp16_ieee_to_fp32_value

# torch/headeronly/util/floating_point_utils.h
# fp32_from_bits called from fp16_ieee_to_fp32_value
# fp32_to_bits called from fp16_ieee_from_fp32_value

# torch/headeronly/util/HeaderOnlyArrayRef.h
HeaderOnlyArrayRef

# c10/util/complex.h, torch/headeronly/util/complex.h
complex

# ATen/NumericUtils.h, c10/util/generic_math.h
div_floor_floating
div_floor_integer
_isnan

# ATen/core/PhiloxRNGEngine.h
Philox4_32
randn

# torch/headeronly/Metaprogramming.h
infer_function_traits_t
make_function_traits_t
tuple_elements
tuple_map
tuple_slice
tuple_take

# torch/headeronly/TypeList.h
# false_t => tested through from_tuple_t and various other APIs
all
concat_t
contains
count_if
drop_if_nonempty_t
drop_t
filter_t
find_if
from_tuple_t
head_t
head_with_default_t
map_t
map_types_to_values
reverse_t
size
take_t
to_tuple_t
true_for_any_type
typelist

# torch/headeronly/TypeTraits.h
is_equality_comparable
is_function_type
is_hashable
is_instantiation_of
is_stateless_lambda
is_type_condition

# ATen/cpu/vec/vec.h
Vectorized
clamp_min
convert
loadu
maximum
minimum
size

# torch/headeronly/cpu/vec/vec_half.h
float2half_scalar
half2float_scalar

# torch/headeronly/macros/Export.h
C10_API

# torch/headeronly/util/Exception.h
STD_TORCH_CHECK

# torch/headeronly/util/quint8.h
quint8

# torch/headeronly/util/quint4x2.h
quint4x2

# torch/headeronly/util/quint2x4.h
quint2x4

# torch/headeronly/util/qint8.h
qint8

# torch/headeronly/util/qint32.h
qint32

# torch/headeronly/util/bits.h
bits1x8
bits2x4
bits4x2
bits8
bits16

# torch/headeronly/core/DeviceType.h
DeviceType
kCPU
kCUDA
kHIP
kFPGA
kMAIA
kXLA
kMPS
kMeta
kVulkan
kMetal
kXPU
kHPU
kVE
kLazy
kIPU
kMTIA
kPrivateUse1
COMPILE_TIME_MAX_DEVICE_TYPES

# torch/headeronly/core/ScalarType.h
NumScalarTypes
ScalarType
# dummy_int1_7_t, dummy_uint1_7_t tested through ScalarType
CppTypeToScalarType
ScalarTypeToCPPTypeT
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_EXCEPT_COMPLEX_HALF_F8NZ
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_AND_QINTS
AT_FORALL_INT_TYPES
AT_FORALL_SCALAR_TYPES
AT_FORALL_SCALAR_TYPES_AND
AT_FORALL_SCALAR_TYPES_AND2
AT_FORALL_SCALAR_TYPES_AND3
AT_FORALL_SCALAR_TYPES_AND7
AT_FORALL_QINT_TYPES
AT_FORALL_FLOAT8_TYPES
AT_FORALL_COMPLEX_TYPES
toString
<<
toUnderlying

# torch/headeronly/core/Layout.h
Layout
kStrided
kSparse
kSparseCsr
kSparseCsc
kSparseBsr
kSparseBsc
kMkldnn
kJagged

# torch/headeronly/core/MemoryFormat.h
MemoryFormat
get_contiguous_memory_format

# torch/headeronly/core/Dispatch_v2.h
THO_DISPATCH_V2_TMPL
THO_PRIVATE_CASE_TYPE_USING_HINT_TMPL
THO_DISPATCH_CASE_TMPL
THO_DISPATCH_SWITCH_TMPL
# AT_WRAP, THO_AP_VAR_TMPL, AT_CONCAT, AT_CONCAT_AUX, AT_EXPAND are tested through THO_DISPATCH_V2_TMPL
# scalar_type is tested through THO_DISPATCH_SWITCH_TMPL
AT_FLOAT8_TYPES
AT_INTEGRAL_TYPES
AT_FLOATING_TYPES
AT_BAREBONES_UNSIGNED_TYPES
AT_INTEGRAL_TYPES_V2
AT_COMPLEX_TYPES
AT_QINT_TYPES
AT_ALL_TYPES
AT_ALL_TYPES_AND_COMPLEX
THO_DISPATCH_V2
# THO_EMPTY, THO_DISPATCH_CASE, THO_DISPATCH_SWITCH, THO_PRIVATE_CASE_TYPE_USING_HINT are tested through THO_DISPATCH_V2

# torch/headeronly/core/TensorAccessor.h
HeaderOnlyTensorAccessor
HeaderOnlyGenericPackedTensorAccessor
# HeaderOnlyTensorAccessorBase and
# HeaderOnlyGenericPackedTensorAccessorBase are tested through
# HeaderOnlyTensorAccessor and HeaderOnlyGenericPackedTensorAccessor

# torch/headeronly/util/Deprecated.h
# C10_DEPRECATED, C10_DEPRECATED_MESSAGE, and
# C10_DEFINE_DEPRECATED_USING functionalities are expressed at compile
# time that have no effect to runtime. Therefore, these macros are not
# tested under test/.
