2. Poplar runtime API reference¶
The following types are used when writing vertex code (codelets) for the IPU.
Codelets can be compiled for both the IPU and to run on the CPU. (Running code on the CPU is occasionally useful for debugging or simple functional tests when IPU hardware is not available.) By using these include files, the correct definitions for either the IPU or the CPU will be used. You should not directly include other include files from the Poplar runtime.
2.1. Vertex types¶
#include <poplar/Vertex.hpp>
Defines
-
WORKER_ALIGN
¶
-
namespace
poplar
Poplar classes and functions.
Typedefs
-
using
SupervisorVertexIf
= std::conditional_t<pred, SupervisorVertex, Vertex>¶ Metafunction that returns a SupervisorVertex if
pred
is true otherwise a Vertex.
-
class
ExternalExchangeVertex
¶ - #include <Vertex.hpp>
ExternalExchangeVertex base class; Any sub-type of this class needs to define a compute() method.
-
class
SupervisorVertex
¶ - #include <Vertex.hpp>
SupervisorVertex base class; Any sub-type of this class needs to define a compute() method.
-
using
2.2. Input & output types¶
#include <poplar/InOutTypes.hpp>
Defines
-
NO_INSTRUMENT
¶
-
namespace
poplar
Poplar classes and functions.
-
template<typename
T
>
classInOut
: public poplar::InOutBase¶ - #include <InOutTypes.hpp>
Public Functions
-
NO_INSTRUMENT
operator T&
() const¶
-
NO_INSTRUMENT T & operator* () const
-
NO_INSTRUMENT T * operator-> () const
-
NO_INSTRUMENT
-
struct
InOutBase
¶ Subclassed by poplar::InOut< T >, poplar::Input< T >, poplar::Output< T >
Public Members
-
void *
p
¶
-
void *
-
template<typename
2.3. Field types¶
#include <poplar/FieldTypes.hpp>
-
namespace
poplar
Poplar classes and functions.
Enums
-
enum
VectorLayout
¶ The memory layout used for a Vector.
Values:
-
enumerator
NOT_A_VECTOR
¶
-
enumerator
SPAN
¶ A pointer to the start of the vector, and a count of the number of elements (not bytes) the vector contains.
This means the .size() member and iterators are available.
-
enumerator
SHORT_SPAN
¶ A pointer to the start of the vector and a count of the number of elements the vector contains.
The count is limited to 11 bits. The .size() member and iterators are available. Only addresses up to 1MB can be represented.
-
enumerator
ONE_PTR
¶ The same as SPAN but the count is not stored, so this is a single pointer to the start of the vector.
The vector does not know its size which must be learned by some other means. The .size() member and iterators are not available.
-
enumerator
SCALED_PTR32
¶ The same as ONE_PTR, but this uses a compressed 16-bit pointer containing bits 2-17 of the offset from the pointer to the base of memory.
Since the lower 2 bits are not stored it can only point to 32-bit aligned addresses (this is where the 32 in the name comes from).
-
enumerator
SCALED_PTR64
¶ The same as ONE_PTR, but this uses a compressed 16-bit pointer containing bits 3-18 of a full pointer.
Since the lower 3 bits are not stored it can only point to 64-bit aligned addresses (this is where the 64 in the name comes from). Addresses up to 512KB can be represented.
-
enumerator
SCALED_PTR128
¶ The same as ONE_PTR, but this uses a compressed 16-bit pointer containing bits 4-18 of a full pointer.
Since the lower 4 bits are not stored it can only point to 128-bit aligned addresses (this is where the 128 in the name comes from). Addresses up to 1MB can be represented.
-
enumerator
COMPACT_PTR
¶ This pointer type will resolve into the best suited, ideally space optimised, pointer given the therefore the size of the address space and the alignment.
For example on mk1: if the alignment is in the range [4,8) then this will become a SCALED_PTR32; if it is 8 or greater then it becomes a SCALED_PTR64. For all other alignments this pointer type is an uncompressed ONE_PTR.
-
enumerator
-
enum
VectorListLayout
¶ Values:
-
enumerator
NOT_A_VECTOR
¶
-
enumerator
ONE_PTR
¶
-
enumerator
SCALED_PTR32
¶
-
enumerator
SCALED_PTR64
¶
-
enumerator
SCALED_PTR128
¶
-
enumerator
DELTAN
¶
-
enumerator
DELTANELEMENTS
¶
-
enumerator
COMPACT_DELTAN
¶ This type will resolve into the best suited, ideally space optimised, inner pointer type depending on the address space.
For example on mk1 it will be the same type of a DELTAN type as that can point to everything in the available memory.
-
enumerator
-
enum
2.4. Vector types¶
#include <poplar/VectorTypes.hpp>
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
VLayoutEnumToType
<T, VectorLayout::SPAN, MinAlign, Interleaved>¶ - #include <VectorTypes.hpp>
Vector.
Public Types
-
using
type
= SpanVectorBase<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
VLayoutEnumToType
<T, VectorLayout::SHORT_SPAN, MinAlign, Interleaved>¶ Public Types
-
using
type
= ShortSpanVectorBase<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
VLayoutEnumToType
<T, VectorLayout::ONE_PTR, MinAlign, Interleaved>¶ Public Types
-
using
type
= OnePtrVectorBase<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
VLayoutEnumToType
<T, VectorLayout::SCALED_PTR32, MinAlign, Interleaved>¶ Public Types
-
using
type
= ScaledPtr32VectorBase<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
VLayoutEnumToType
<T, VectorLayout::SCALED_PTR64, MinAlign, Interleaved>¶ Public Types
-
using
type
= ScaledPtr64VectorBase<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
ImplicitVLayoutEnumToType
<T, VectorLayout::SPAN, MinAlign, Interleaved>¶ Public Types
-
using
type
= SpanVectorBaseImplicitDeref<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
ImplicitVLayoutEnumToType
<T, VectorLayout::ONE_PTR, MinAlign, Interleaved>¶ Public Types
-
using
type
= OnePtrVectorBaseImplicitDeref<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
ImplicitVLayoutEnumToType
<T, VectorLayout::SCALED_PTR32, MinAlign, Interleaved>¶ Public Types
-
using
type
= ScaledPtr32VectorBaseImplicitDeref<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
ImplicitVLayoutEnumToType
<T, VectorLayout::SCALED_PTR64, MinAlign, Interleaved>¶ Public Types
-
using
type
= ScaledPtr64VectorBaseImplicitDeref<UnboxIO_t<T>, MinAlign>¶
-
using
-
namespace
poplar
Poplar classes and functions.
-
template<class
Base
, unsignedMinAlign
>
structBaseWithAlign
: public Base¶ Subclassed by poplar::OnePtrVectorBase< T, MinAlign >, poplar::ScaledPtr128VectorBase< T, MinAlign >, poplar::ScaledPtr32VectorBase< T, MinAlign >, poplar::ScaledPtr64VectorBase< T, MinAlign >, poplar::ShortSpanVectorBase< T, MinAlign >, poplar::SpanVectorBase< T, MinAlign >, poplar::ScaledPtr32VectorBase< DeltaN, 4 >
Public Functions
-
void *
begin
() const¶
-
void *
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
classInOut
<Vector<T, L, MinAlign, Interleaved>> : public poplar::Vector<T, L, MinAlign, Interleaved>¶ - #include <VectorTypes.hpp>
InOut<Vector>.
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
classInput
<Vector<T, L, MinAlign, Interleaved>> : public poplar::Vector<T, L, MinAlign, Interleaved>¶ - #include <VectorTypes.hpp>
Input<Vector>.
Public Types
-
using
iterator
= typename Vector<std::enable_if<L == VectorLayout::SPAN, T>, VectorLayout::SPAN, MinAlign, Interleaved>::const_iterator¶
-
using
-
template<typename
T
, unsignedMinAlign
>
classOnePtrVectorBase
: public poplar::BaseWithAlign<PtrBase, MinAlign>¶ -
Public Functions
-
const_iterator
begin
() const¶
Private Types
-
using
Base
= BaseWithAlign<PtrBase, MinAlign>¶
-
const_iterator
-
template<typename
T
, unsignedMinAlign
>
classOnePtrVectorBaseImplicitDeref
: public poplar::PtrBase¶ Public Types
Public Functions
-
const_iterator
begin
() const¶
-
const_iterator
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
classOutput
<Vector<T, L, MinAlign, Interleaved>> : public poplar::Vector<T, L, MinAlign, Interleaved>¶ - #include <VectorTypes.hpp>
Output<Vector>.
-
struct
PtrBase
¶ Subclassed by poplar::BaseWithAlign< PtrBase, MinAlign >, poplar::OnePtrVectorBaseImplicitDeref< T, MinAlign >
Public Functions
-
void *
begin
() const¶
Public Members
-
void *
ptr
¶
-
void *
-
struct
ScaledBase128
¶ Subclassed by poplar::BaseWithAlign< ScaledBase128, MinAlign >, poplar::ScaledPtr128VectorBaseImplicitDeref< T, MinAlign >
Public Functions
-
ScaledBase128
() = default¶
-
void
set
(void *p)¶
-
ScaledBase128
(void *p)¶
-
void *
begin
() const¶
Public Members
-
unsigned short
pOffset
¶
-
-
struct
ScaledBase32
¶ Subclassed by poplar::BaseWithAlign< ScaledBase32, MinAlign >, poplar::ScaledPtr32VectorBaseImplicitDeref< T, MinAlign >
Public Functions
-
ScaledBase32
() = default¶
-
void
set
(void *p)¶
-
ScaledBase32
(void *p)¶
-
void *
begin
() const¶
Public Members
-
unsigned short
pOffset
¶
Public Static Attributes
-
const uintptr_t
memBase
= 0x40000¶
-
-
struct
ScaledBase64
¶ Subclassed by poplar::BaseWithAlign< ScaledBase64, MinAlign >, poplar::ScaledPtr64VectorBaseImplicitDeref< T, MinAlign >
Public Functions
-
ScaledBase64
() = default¶
-
void
set
(void *p)¶
-
ScaledBase64
(void *p)¶
-
void *
begin
() const¶
Public Members
-
unsigned short
pOffset
¶
-
-
template<typename
T
, unsignedMinAlign
>
classScaledPtr128VectorBase
: public poplar::BaseWithAlign<ScaledBase128, MinAlign>¶ -
Public Functions
-
const_iterator
begin
() const¶
Private Types
-
using
Base
= BaseWithAlign<ScaledBase128, MinAlign>¶
-
const_iterator
-
template<typename
T
, unsignedMinAlign
>
classScaledPtr128VectorBaseImplicitDeref
: public poplar::ScaledBase128¶ Public Types
Public Functions
-
const_iterator
begin
() const¶
Private Types
-
using
Base
= ScaledBase128¶
-
const_iterator
-
template<typename
T
, unsignedMinAlign
>
classScaledPtr32VectorBase
: public poplar::BaseWithAlign<ScaledBase32, MinAlign>¶ -
Public Functions
-
const_iterator
begin
() const¶
Private Types
-
using
Base
= BaseWithAlign<ScaledBase32, MinAlign>¶
-
const_iterator
-
template<typename
T
, unsignedMinAlign
>
classScaledPtr32VectorBaseImplicitDeref
: public poplar::ScaledBase32¶ Public Types
Public Functions
-
const_iterator
begin
() const¶
Private Types
-
using
Base
= ScaledBase32¶
-
const_iterator
-
template<typename
T
, unsignedMinAlign
>
classScaledPtr64VectorBase
: public poplar::BaseWithAlign<ScaledBase64, MinAlign>¶ -
Public Functions
-
const_iterator
begin
() const¶
Private Types
-
using
Base
= BaseWithAlign<ScaledBase64, MinAlign>¶
-
const_iterator
-
template<typename
T
, unsignedMinAlign
>
classScaledPtr64VectorBaseImplicitDeref
: public poplar::ScaledBase64¶ Public Types
Public Functions
-
const_iterator
begin
() const¶
Private Types
-
using
Base
= ScaledBase64¶
-
const_iterator
-
template<typename
T
, unsignedMinAlign
>
classShortSpanVectorBase
: public poplar::BaseWithAlign<ShortVectorBase, MinAlign>¶ -
Private Types
-
using
Base
= BaseWithAlign<ShortVectorBase, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
>
classShortSpanVectorBaseImplicitDeref
: public poplar::ShortVectorBase¶ Public Types
Private Types
-
using
Base
= ShortVectorBase¶
-
using
-
struct
ShortVectorBase
¶ Subclassed by poplar::BaseWithAlign< ShortVectorBase, MinAlign >, poplar::ShortSpanVectorBaseImplicitDeref< T, MinAlign >
-
template<typename
T
, unsignedMinAlign
>
classSpanVectorBase
: public poplar::BaseWithAlign<VectorBase, MinAlign>¶ -
Private Types
-
using
Base
= BaseWithAlign<VectorBase, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
>
classSpanVectorBaseImplicitDeref
: public poplar::VectorBase¶ Public Types
Private Types
-
using
Base
= VectorBase¶
-
using
-
template<typename
T
, VectorLayoutL
= VectorLayout::SPAN, unsignedMinAlign
= detail::max(alignof(T), VectorLayoutTraits<L>::MinAlign), boolInterleaved
= false>
structVector
: public poplar::detail::VectorBase<T, L, MinAlign, Interleaved>¶ Subclassed by poplar::InOut< Vector< T, L, MinAlign, Interleaved > >, poplar::Input< Vector< T, L, MinAlign, Interleaved > >, poplar::Output< Vector< T, L, MinAlign, Interleaved > >
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
classVector
<InOut<T>, L, MinAlign, Interleaved> : public poplar::detail::VectorBaseImplicitDeref<InOut<T>, L, MinAlign, Interleaved>¶ - #include <VectorTypes.hpp>
Vector<InOut>.
-
template<typename
T
, VectorLayoutL1
, unsignedMinAlign1
, boolInterleaved
, VectorLayoutL2
, unsignedMinAlign2
>
classVector
<InOut<Vector<T, L1, MinAlign1, Interleaved>>, L2, MinAlign2, false> : public poplar::detail::VectorBase<InOut<Vector<T, L1, MinAlign1, Interleaved>>, L2, MinAlign2, false>¶ - #include <VectorTypes.hpp>
Vector<InOut<Vector<T>>.
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
classVector
<Input<T>, L, MinAlign, Interleaved> : public poplar::detail::VectorBaseImplicitDeref<Input<T>, L, MinAlign, Interleaved>¶ - #include <VectorTypes.hpp>
Vector<Input>.
-
template<typename
T
, VectorLayoutL1
, unsignedMinAlign1
, boolInterleaved
, VectorLayoutL2
, unsignedMinAlign2
>
structVector
<Input<Vector<T, L1, MinAlign1, Interleaved>>, L2, MinAlign2, false> : public poplar::detail::VectorBase<Input<Vector<T, L1, MinAlign1, Interleaved>>, L2, MinAlign2, false>¶ - #include <VectorTypes.hpp>
Vector<Input<Vector<T>>.
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
classVector
<Output<T>, L, MinAlign, Interleaved> : public poplar::detail::VectorBaseImplicitDeref<Output<T>, L, MinAlign, Interleaved>¶ - #include <VectorTypes.hpp>
Vector<Output>.
-
template<typename
T
, VectorLayoutL1
, unsignedMinAlign1
, boolInterleaved
, VectorLayoutL2
, unsignedMinAlign2
>
classVector
<Output<Vector<T, L1, MinAlign1, Interleaved>>, L2, MinAlign2, false> : public poplar::detail::VectorBase<Output<Vector<T, L1, MinAlign1, Interleaved>>, L2, MinAlign2, false>¶ - #include <VectorTypes.hpp>
Vector<Output<Vector<T>>.
-
struct
VectorBase
¶ Subclassed by poplar::BaseWithAlign< VectorBase, MinAlign >, poplar::SpanVectorBaseImplicitDeref< T, MinAlign >
-
namespace
detail
¶ -
Functions
-
constexpr VectorLayout
resolveCompactPtr
(const VectorLayout layout, const unsigned minAlign)¶
-
constexpr unsigned
max
(unsigned a, unsigned b)¶
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
structImplicitVLayoutEnumToType
¶
-
template<typename T, unsigned MinAlign, bool Interleaved> ONE_PTR, MinAlign, Interleaved >
Public Types
-
using
type
= OnePtrVectorBaseImplicitDeref<UnboxIO_t<T>, MinAlign>¶
-
using
-
template<typename T, unsigned MinAlign, bool Interleaved> SCALED_PTR32, MinAlign, Interleaved >
Public Types
-
using
type
= ScaledPtr32VectorBaseImplicitDeref<UnboxIO_t<T>, MinAlign>
-
using
-
template<typename T, unsigned MinAlign, bool Interleaved> SCALED_PTR64, MinAlign, Interleaved >
Public Types
-
using
type
= ScaledPtr64VectorBaseImplicitDeref<UnboxIO_t<T>, MinAlign>
-
using
-
template<typename T, unsigned MinAlign, bool Interleaved> SPAN, MinAlign, Interleaved >
Public Types
-
using
type
= SpanVectorBaseImplicitDeref<UnboxIO_t<T>, MinAlign>
-
using
-
template<typename
T
>
structUnboxIO
¶
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
structVectorBase
: public detail::VLayoutEnumToType::type<T, detail::resolveCompactPtr(L, MinAlign), MinAlign, Interleaved>¶ Subclassed by poplar::Vector< T, L, MinAlign, Interleaved >, poplar::Vector< InOut< Vector< T, L1, MinAlign1, Interleaved > >, L2, MinAlign2, false >, poplar::Vector< Input< Vector< T, L1, MinAlign1, Interleaved > >, L2, MinAlign2, false >, poplar::Vector< Output< Vector< T, L1, MinAlign1, Interleaved > >, L2, MinAlign2, false >
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
structVectorBaseImplicitDeref
: public detail::ImplicitVLayoutEnumToType::type<T, detail::resolveCompactPtr(L, MinAlign), MinAlign, Interleaved>¶ Subclassed by poplar::Vector< InOut< T >, L, MinAlign, Interleaved >, poplar::Vector< Input< T >, L, MinAlign, Interleaved >, poplar::Vector< Output< T >, L, MinAlign, Interleaved >
-
template<typename
T
, VectorLayoutL
, unsignedMinAlign
, boolInterleaved
>
structVLayoutEnumToType
¶
-
template<typename T, unsigned MinAlign, bool Interleaved> ONE_PTR, MinAlign, Interleaved >
Public Types
-
using
type
= OnePtrVectorBase<UnboxIO_t<T>, MinAlign>
-
using
-
template<typename T, unsigned MinAlign, bool Interleaved> SCALED_PTR32, MinAlign, Interleaved >
Public Types
-
using
type
= ScaledPtr32VectorBase<UnboxIO_t<T>, MinAlign>
-
using
-
template<typename T, unsigned MinAlign, bool Interleaved> SCALED_PTR64, MinAlign, Interleaved >
Public Types
-
using
type
= ScaledPtr64VectorBase<UnboxIO_t<T>, MinAlign>
-
using
-
template<typename T, unsigned MinAlign, bool Interleaved> SHORT_SPAN, MinAlign, Interleaved >
Public Types
-
using
type
= ShortSpanVectorBase<UnboxIO_t<T>, MinAlign>
-
using
-
template<typename T, unsigned MinAlign, bool Interleaved> SPAN, MinAlign, Interleaved >
- #include <VectorTypes.hpp>
Vector.
Public Types
-
using
type
= SpanVectorBase<UnboxIO_t<T>, MinAlign>
-
using
-
constexpr VectorLayout
-
template<class
2.5. VectorList types¶
#include <poplar/VectorListTypes.hpp>
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
V2DLayoutEnumToType
<T, VectorListLayout::DELTAN, MinAlign, Interleaved>¶ Public Types
-
using
type
= BaseAndDeltas<T, MinAlign>¶
-
using
-
template<typename
T
, unsignedMinAlign
, boolInterleaved
>
structpoplar::detail
::
V2DLayoutEnumToType
<T, VectorListLayout::DELTANELEMENTS, MinAlign, Interleaved>¶ Public Types
-
using
type
= BaseAndDeltasElements<T, MinAlign>¶
-
using
-
namespace
poplar
Poplar classes and functions.
-
template<typename
T
, unsignedMinAlign
>
structBaseAndDelta
¶ Public Functions
-
void *
begin
() const¶
-
BaseAndDelta &
operator++
()¶
-
bool
operator==
(const BaseAndDelta &rhs) const¶
-
bool
operator!=
(const BaseAndDelta &rhs) const¶
-
size_t
size
() const¶
-
bool
empty
() const¶
-
void *
-
template<typename
T
, unsignedMinAlign
>
structBaseAndDeltaElements
¶ Public Functions
-
void *
begin
() const¶
-
BaseAndDeltaElements &
operator++
()¶
-
bool
operator==
(const BaseAndDeltaElements &rhs) const¶
-
bool
operator!=
(const BaseAndDeltaElements &rhs) const¶
-
size_t
size
() const¶
-
bool
empty
() const¶
-
void *
-
struct
BaseAndDeltaElementsBase
¶ Subclassed by poplar::BaseAndDeltasElements< T, MinAlign >
Public Functions
-
BaseAndDeltaElementsBase
() = delete¶
-
unsigned
size
() const¶
-
uintptr_t
getBase
() const¶
-
DeltaNElements *
getDeltaN
() const¶
-
-
template<typename
T
, unsignedMinAlign
>
structBaseAndDeltas
: public poplar::BaseAndDeltasBase¶ Public Types
-
typedef BaseAndDelta<T, MinAlign>
iterator
¶
-
typedef BaseAndDelta<T, MinAlign>
-
struct
BaseAndDeltasBase
¶ Subclassed by poplar::BaseAndDeltas< T, MinAlign >
-
template<typename
T
, unsignedMinAlign
>
structBaseAndDeltasElements
: public poplar::BaseAndDeltaElementsBase¶ Public Types
-
typedef BaseAndDeltaElements<T, MinAlign>
iterator
¶
-
typedef BaseAndDeltaElements<T, MinAlign>
-
struct
DeltaN
¶
-
struct
DeltaNElements
¶ Public Functions
-
unsigned
getN
(unsigned alignment) const¶
-
unsigned
getOffset
(unsigned alignment) const¶
Public Members
-
uint32_t
packedBits
¶
Public Static Functions
-
constexpr unsigned
log2
(unsigned n)¶
-
unsigned
-
template<typename
T
, VectorListLayoutL
, unsignedMinAlign
, boolInterleaved
>
classInOut
<VectorList<T, L, MinAlign, Interleaved>> : public poplar::VectorList<T, L, MinAlign, Interleaved>¶ - #include <VectorListTypes.hpp>
InOut<VectorList>.
Public Functions
-
const VectorList<T, L, MinAlign, Interleaved> &
operator*
() const¶
-
const VectorList<T, L, MinAlign, Interleaved> *
operator->
() const¶
-
VectorList<T, L, MinAlign, Interleaved> &
operator*
()¶
-
VectorList<T, L, MinAlign, Interleaved> *
operator->
()¶
-
const VectorList<T, L, MinAlign, Interleaved> &
-
template<typename
T
, VectorListLayoutL
, unsignedMinAlign
, boolInterleaved
>
classInput
<VectorList<T, L, MinAlign, Interleaved>> : public poplar::VectorList<T, L, MinAlign, Interleaved>¶ - #include <VectorListTypes.hpp>
Input<VectorList>.
Public Functions
-
const VectorList<T, L, MinAlign, Interleaved> &
operator*
() const¶
-
const VectorList<T, L, MinAlign, Interleaved> *
operator->
() const¶
-
const VectorList<T, L, MinAlign, Interleaved> &
-
template<typename
T
, VectorListLayoutL
, unsignedMinAlign
, boolInterleaved
>
classOutput
<VectorList<T, L, MinAlign, Interleaved>> : public poplar::VectorList<T, L, MinAlign, Interleaved>¶ - #include <VectorListTypes.hpp>
Output<VectorList>.
Public Functions
-
const VectorList<T, L, MinAlign, Interleaved> &
operator*
() const¶
-
const VectorList<T, L, MinAlign, Interleaved> *
operator->
() const¶
-
VectorList<T, L, MinAlign, Interleaved> &
operator*
()¶
-
VectorList<T, L, MinAlign, Interleaved> *
operator->
()¶
-
const VectorList<T, L, MinAlign, Interleaved> &
-
template<typename
T
, VectorListLayoutL
, unsignedMinAlign
= detail::max(alignof(T), VectorListLayoutTraits<T, L>::MinAlign), boolInterleaved
= false>
structVectorList
: public poplar::detail::VectorListBase<T, L, MinAlign, Interleaved>¶ Subclassed by poplar::InOut< VectorList< T, L, MinAlign, Interleaved > >, poplar::Input< VectorList< T, L, MinAlign, Interleaved > >, poplar::Output< VectorList< T, L, MinAlign, Interleaved > >
-
namespace
detail
Functions
-
constexpr VectorListLayout
resolveCompactDeltaN
(const VectorListLayout layout)¶
-
template<typename
T
, VectorListLayoutL
, unsignedMinAlign
, boolInterleaved
>
structV2DLayoutEnumToType
¶ - #include <VectorListTypes.hpp>
VectorList.
-
template<typename T, unsigned MinAlign, bool Interleaved> DELTAN, MinAlign, Interleaved >
Public Types
-
using
type
= BaseAndDeltas<T, MinAlign>
-
using
-
template<typename T, unsigned MinAlign, bool Interleaved> DELTANELEMENTS, MinAlign, Interleaved >
Public Types
-
using
type
= BaseAndDeltasElements<T, MinAlign>
-
using
-
template<typename
T
, VectorListLayoutL
, unsignedMinAlign
, boolInterleaved
>
structVectorListBase
: public V2DLayoutEnumToType::type<T, resolveCompactDeltaN(L), MinAlign, Interleaved>¶ Subclassed by poplar::VectorList< T, L, MinAlign, Interleaved >
-
constexpr VectorListLayout
-
template<typename
2.6. Half-float types¶
#include <poplar/HalfFloat.hpp>
2.7. Stack size definition¶
#include <poplar/StackSizeDefs.hpp>
Defines
-
TOTAL_STACK_USAGE
¶
-
FUNCTION_IS_WORKER
¶
-
DEF_STACK_USAGE_HELPER
(size, funcname)¶
-
DEF_STACK_USAGE
(size, funcname)¶ Used to specify the TOTAL stack usage of a function.
The use of this macro must be placed at file top level (not inside a function definition). This macro will add ‘overrides’ for the stack size information for a C/C++ codelet function (either ‘own’ stack size only, or total stack usage, same as the assembly macros above).
- Parameters
size
: Size in bytes of the total stack usage of ‘funcname’, i.e. includes any function that might be called by funcname. Must be an unsigned integer literal.funcname
: A string literal containing the name of the function. If the function is a C++ one, it must be the MANGLED name, so it might be convenient to define such a function as ‘extern “C”’ for ease of use of this macro.
-
DEF_FUNC_CALL_PTRS
(caller_func, called_func_list)¶ Macro to declare that a function might call other functions via function pointers.
Note that all function names below are strings containing the name of the functions, and if the functions are C++ ones, they must be the MANGLED name, so it might be convenient to define such functions as ‘extern “C”’ for ease of use of this macro. The use of this macro must be placed at file top level (not inside a function definition).
- Parameters
caller_func
: A string literal containing the name of the function that calls other functions via function pointers.called_func_list
: a string literal containing a comma separated list of function names that are called via function pointers by ‘caller_func’.
-
DEF_FUNCTION_AS_WORKER
(funcname)¶ Macro to declare that a function is run in worker context.
The use of this macro must be placed in the same file where the function body is defined, at top level (not inside the function definition). Note that this is not needed for explicit worker vertices entry points (i.e. __runCodelet_XXXXX) and functions called directly by them. It is required only for worker code that is run from supervisor vertices but is not part of a worker vertex.
- Parameters
funcname
: A string literal containing the name of the function. If the function is a C++ one, it must be the MANGLED name, so it might be convenient to define such a function as ‘extern “C”’ for ease of use of the macro.