docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
type.h File Reference

Core type system definitions for sdfglib. More...

#include <cassert>
#include <concepts>
#include <memory>
#include <nlohmann/json.hpp>
#include <string>
#include <string_view>
#include <type_traits>
#include "sdfg/exceptions.h"
#include "sdfg/symbolic/symbolic.h"

Go to the source code of this file.

Classes

class  sdfg::types::StorageType
 Represents the storage location and management characteristics of data. More...
class  sdfg::types::IType
 Abstract base interface for all types in the sdfglib type system. More...

Namespaces

namespace  sdfg
namespace  sdfg::types

Enumerations

enum  sdfg::types::PrimitiveType {
  sdfg::types::Void , sdfg::types::Bool , sdfg::types::Int8 , sdfg::types::Int16 ,
  sdfg::types::Int32 , sdfg::types::Int64 , sdfg::types::Int128 , sdfg::types::UInt8 ,
  sdfg::types::UInt16 , sdfg::types::UInt32 , sdfg::types::UInt64 , sdfg::types::UInt128 ,
  sdfg::types::Half , sdfg::types::BFloat , sdfg::types::Float , sdfg::types::Double ,
  sdfg::types::X86_FP80 , sdfg::types::FP128 , sdfg::types::PPC_FP128
}
 Enumeration of all primitive data types supported by sdfglib. More...
enum class  sdfg::types::TypeID {
  sdfg::types::Scalar , sdfg::types::Array , sdfg::types::Structure , sdfg::types::Pointer ,
  sdfg::types::Reference , sdfg::types::Function , sdfg::types::Tensor
}
 Enumeration of high-level type categories. More...

Functions

constexpr const char * sdfg::types::primitive_type_to_string (PrimitiveType e)
 Converts a PrimitiveType to its string representation.
constexpr PrimitiveType sdfg::types::primitive_type_from_string (std::string_view e)
 Converts a string to its corresponding PrimitiveType.
constexpr size_t sdfg::types::bit_width (PrimitiveType e)
 Returns the bit width of a PrimitiveType.
constexpr bool sdfg::types::is_floating_point (PrimitiveType e) noexcept
 Checks if a PrimitiveType is a floating-point type.
constexpr bool sdfg::types::is_integer (PrimitiveType e) noexcept
 Checks if a PrimitiveType is an integer type.
constexpr bool sdfg::types::is_signed (PrimitiveType e) noexcept
 Checks if a PrimitiveType is a signed integer type.
constexpr bool sdfg::types::is_unsigned (PrimitiveType e) noexcept
 Checks if a PrimitiveType is an unsigned integer type.
constexpr PrimitiveType sdfg::types::as_signed (PrimitiveType e) noexcept
 Converts an unsigned integer type to its signed equivalent.
constexpr PrimitiveType sdfg::types::as_unsigned (PrimitiveType e) noexcept
 Converts a signed integer type to its unsigned equivalent.

Detailed Description

Core type system definitions for sdfglib.

This file defines the fundamental types used throughout sdfglib, including primitive types, storage types, and the base type interface.