Add a TypeDocumenter for Cretonne types.

Use the autodoc Sphinx module to add a .. autoctontype:: directive which
generates documentation for one of the types in the cretonne.types module.
This commit is contained in:
Jakob Olesen
2016-02-08 18:21:58 -08:00
parent c459c11a5a
commit 19b4facbe0
4 changed files with 87 additions and 50 deletions

View File

@@ -2,19 +2,32 @@
from . import ScalarType, IntType, FloatType
#: A boolean value.
bool = ScalarType('bool')
bool = ScalarType('bool', 0,
"""
A boolean value that is either true or false.
""")
i8 = IntType(8) #: 8-bit int.
i16 = IntType(16) #: 16-bit int.
i32 = IntType(32) #: 32-bit int.
i64 = IntType(64) #: 64-bit int.
i8 = IntType(8)
i16 = IntType(16)
i32 = IntType(32)
i64 = IntType(64)
f32 = FloatType(32) #: IEEE 32-bit float.
f64 = FloatType(64) #: IEEE 64-bit float
f32 = FloatType(32,
"""
A 32-bit floating point type represented in the IEEE 754-2008 *binary32*
interchange format. This corresponds to the :c:type:`float` type in most
C implementations.
""")
i8x16 = i8.by(16) #: Vector of 16 i8 lanes.
f64 = FloatType(64,
"""
A 64-bit floating point type represented in the IEEE 754-2008 *binary64*
interchange format. This corresponds to the :c:type:`double` type in
most C implementations.
""")
f32x4 = f32.by(4) #: Vector of 4 f32 lanes.
f64x2 = f64.by(2) #: Vector of 2 f64 lanes.
i8x16 = i8.by(16)
f32x4 = f32.by(4)
f64x2 = f64.by(2)