Enable inheritance diagrams.
This commit is contained in:
@@ -38,6 +38,8 @@ extensions = [
|
|||||||
'sphinx.ext.todo',
|
'sphinx.ext.todo',
|
||||||
'sphinx.ext.mathjax',
|
'sphinx.ext.mathjax',
|
||||||
'sphinx.ext.ifconfig',
|
'sphinx.ext.ifconfig',
|
||||||
|
'sphinx.ext.graphviz',
|
||||||
|
'sphinx.ext.inheritance_diagram',
|
||||||
'cton_domain',
|
'cton_domain',
|
||||||
'cton_lexer',
|
'cton_lexer',
|
||||||
]
|
]
|
||||||
@@ -293,3 +295,10 @@ texinfo_documents = [
|
|||||||
|
|
||||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||||
#texinfo_no_detailmenu = False
|
#texinfo_no_detailmenu = False
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for Graphviz -------------------------------------------------
|
||||||
|
|
||||||
|
graphviz_output_format = 'svg'
|
||||||
|
|
||||||
|
inheritance_graph_attrs = dict(rankdir='TD')
|
||||||
|
|||||||
@@ -13,21 +13,28 @@ directory that has a global variable called ``instructions``. The basic
|
|||||||
Cretonne instruction set described in :doc:`langref` is defined by the Python
|
Cretonne instruction set described in :doc:`langref` is defined by the Python
|
||||||
module :mod:`cretonne.instrs`.
|
module :mod:`cretonne.instrs`.
|
||||||
|
|
||||||
|
.. module:: cretonne
|
||||||
|
|
||||||
Types
|
Types
|
||||||
=====
|
=====
|
||||||
|
|
||||||
Concrete value types are represented as instances of :class:`cretonne.Type`. There are
|
Concrete value types are represented as instances of :class:`cretonne.Type`. There are
|
||||||
subclasses to represent scalar and vector types.
|
subclasses to represent scalar and vector types.
|
||||||
|
|
||||||
.. autoclass:: cretonne.Type
|
.. inheritance-diagram:: Type ScalarType VectorType IntType FloatType
|
||||||
.. autoclass:: cretonne.ScalarType
|
:parts: 1
|
||||||
|
.. autoclass:: Type
|
||||||
|
.. autoclass:: ScalarType
|
||||||
:members:
|
:members:
|
||||||
.. autoclass:: cretonne.VectorType
|
.. autoclass:: VectorType
|
||||||
:members:
|
:members:
|
||||||
.. autoclass:: cretonne.IntType
|
.. autoclass:: IntType
|
||||||
:members:
|
:members:
|
||||||
.. autoclass:: cretonne.FloatType
|
.. autoclass:: FloatType
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
Predefined types
|
||||||
|
----------------
|
||||||
.. automodule:: cretonne.types
|
.. automodule:: cretonne.types
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
"""Predefined types."""
|
"""
|
||||||
|
The cretonne.types module predefines all the Cretonne scalar types.
|
||||||
|
"""
|
||||||
|
|
||||||
from . import ScalarType, IntType, FloatType
|
from . import ScalarType, IntType, FloatType
|
||||||
|
|
||||||
|
#: Boolean.
|
||||||
bool = ScalarType('bool', 0,
|
bool = ScalarType('bool', 0,
|
||||||
"""
|
"""
|
||||||
A boolean value that is either true or false.
|
A boolean value that is either true or false.
|
||||||
""")
|
""")
|
||||||
|
|
||||||
i8 = IntType(8)
|
i8 = IntType(8) #: 8-bit int.
|
||||||
i16 = IntType(16)
|
i16 = IntType(16) #: 16-bit int.
|
||||||
i32 = IntType(32)
|
i32 = IntType(32) #: 32-bit int.
|
||||||
i64 = IntType(64)
|
i64 = IntType(64) #: 64-bit int.
|
||||||
|
|
||||||
|
#: IEEE single precision.
|
||||||
f32 = FloatType(32,
|
f32 = FloatType(32,
|
||||||
"""
|
"""
|
||||||
A 32-bit floating point type represented in the IEEE 754-2008 *binary32*
|
A 32-bit floating point type represented in the IEEE 754-2008 *binary32*
|
||||||
@@ -19,15 +23,10 @@ f32 = FloatType(32,
|
|||||||
C implementations.
|
C implementations.
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
#: IEEE double precision.
|
||||||
f64 = FloatType(64,
|
f64 = FloatType(64,
|
||||||
"""
|
"""
|
||||||
A 64-bit floating point type represented in the IEEE 754-2008 *binary64*
|
A 64-bit floating point type represented in the IEEE 754-2008 *binary64*
|
||||||
interchange format. This corresponds to the :c:type:`double` type in
|
interchange format. This corresponds to the :c:type:`double` type in
|
||||||
most C implementations.
|
most C implementations.
|
||||||
""")
|
""")
|
||||||
|
|
||||||
i8x16 = i8.by(16)
|
|
||||||
|
|
||||||
f32x4 = f32.by(4)
|
|
||||||
f64x2 = f64.by(2)
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user