Halide 22.0.0 Halide compiler and libraries

Public Member Functions | List of all members
Halide::Runtime::Internal::StringTable Class Reference

`#include <string_table.h>`

## Public Member Functions
| StringTable (const StringTable &)=delete
StringTable & | operator= (const StringTable &)=delete
| StringTable (const SystemMemoryAllocatorFns &allocator=StringStorage::default_allocator())
| StringTable (void *user_context, size_t capacity, const SystemMemoryAllocatorFns &allocator=StringStorage::default_allocator())
| StringTable (void *user_context, const char **array, size_t count, const SystemMemoryAllocatorFns &allocator=StringStorage::default_allocator())
| ~StringTable ()
void | resize (void *user_context, size_t capacity)
void | destroy (void *user_context)
void | clear (void *user_context)
void | fill (void *user_context, const char **array, size_t count)
void | assign (void *user_context, size_t index, const char *str, size_t length=0)
void | append (void *user_context, const char *str, size_t length=0)
void | prepend (void *user_context, const char *str, size_t length=0)
size_t | parse (void *user_context, const char *str, const char *delim)
const char * | operator[] (size_t index) const
const char ** | data () const
bool | contains (const char *str) const
size_t | size () const

## Detailed Description

Definition at line 15 of file string_table.h.

## Constructor & Destructor Documentation

## ◆ StringTable() [1/4]

Halide::Runtime::Internal::StringTable::StringTable | ( | const StringTable & |  | ) |
| delete

## ◆ StringTable() [2/4]

Halide::Runtime::Internal::StringTable::StringTable | ( | const SystemMemoryAllocatorFns & | allocator = `StringStorage::default_allocator()` | ) |
| explicit

Definition at line 65 of file string_table.h.

## ◆ StringTable() [3/4]

Halide::Runtime::Internal::StringTable::StringTable | ( | void * | user_context,
|  | size_t | capacity,
|  | const SystemMemoryAllocatorFns & | allocator = `StringStorage::default_allocator()`
| ) |  |

Definition at line 71 of file string_table.h.

References resize(), and user_context.

## ◆ StringTable() [4/4]

Halide::Runtime::Internal::StringTable::StringTable | ( | void * | user_context,
|  | const char ** | array,
|  | size_t | count,
|  | const SystemMemoryAllocatorFns & | allocator = `StringStorage::default_allocator()`
| ) |  |

Definition at line 79 of file string_table.h.

References fill(), and user_context.

## ◆ ~StringTable()

Halide::Runtime::Internal::StringTable::~StringTable | ( |  | ) |

Definition at line 85 of file string_table.h.

References destroy().

## Member Function Documentation

## ◆ operator=()

StringTable & Halide::Runtime::Internal::StringTable::operator= | ( | const StringTable & |  | ) |
| delete

## ◆ resize()

void Halide::Runtime::Internal::StringTable::resize | ( | void * | user_context,
|  | size_t | capacity
| ) |  |

Definition at line 89 of file string_table.h.

References Halide::Runtime::Internal::PointerTable::assign(), Halide::Runtime::Internal::StringStorage::create(), Halide::Runtime::Internal::PointerTable::current_allocator(), Halide::Runtime::Internal::PointerTable::resize(), Halide::Runtime::Internal::PointerTable::size(), and user_context.

Referenced by fill(), parse(), and StringTable().

## ◆ destroy()

void Halide::Runtime::Internal::StringTable::destroy | ( | void * | user_context | ) |

Definition at line 108 of file string_table.h.

References Halide::Runtime::Internal::PointerTable::assign(), Halide::Runtime::Internal::PointerTable::destroy(), Halide::Runtime::Internal::StringStorage::destroy(), Halide::Runtime::Internal::PointerTable::size(), and user_context.

Referenced by ~StringTable().

## ◆ clear()

void Halide::Runtime::Internal::StringTable::clear | ( | void * | user_context | ) |

Definition at line 98 of file string_table.h.

References Halide::Runtime::Internal::PointerTable::assign(), Halide::Runtime::Internal::PointerTable::clear(), Halide::Runtime::Internal::StringStorage::destroy(), Halide::Runtime::Internal::PointerTable::size(), and user_context.

## ◆ fill()

void Halide::Runtime::Internal::StringTable::fill | ( | void * | user_context,
|  | const char ** | array,
|  | size_t | count
| ) |  |

Definition at line 125 of file string_table.h.

References Halide::Runtime::Internal::StringStorage::assign(), Halide::Runtime::Internal::PointerTable::assign(), Halide::Runtime::Internal::StringStorage::data(), resize(), Halide::Runtime::Internal::PointerTable::size(), and user_context.

Referenced by StringTable().

## ◆ assign()

void Halide::Runtime::Internal::StringTable::assign | ( | void * | user_context,
|  | size_t | index,
|  | const char * | str,
|  | size_t | length = `0`
| ) |  |

Definition at line 134 of file string_table.h.

References Halide::Runtime::Internal::StringStorage::assign(), Halide::Runtime::Internal::PointerTable::assign(), Halide::Runtime::Internal::StringStorage::data(), Halide::Runtime::Internal::PointerTable::size(), Halide::Runtime::Internal::strlen(), and user_context.

## ◆ append()

void Halide::Runtime::Internal::StringTable::append | ( | void * | user_context,
|  | const char * | str,
|  | size_t | length = `0`
| ) |  |

Definition at line 145 of file string_table.h.

References Halide::Runtime::Internal::PointerTable::append(), Halide::Runtime::Internal::StringStorage::assign(), Halide::Runtime::Internal::StringStorage::create(), Halide::Runtime::Internal::PointerTable::current_allocator(), Halide::Runtime::Internal::StringStorage::data(), and user_context.

## ◆ prepend()

void Halide::Runtime::Internal::StringTable::prepend | ( | void * | user_context,
|  | const char * | str,
|  | size_t | length = `0`
| ) |  |

Definition at line 152 of file string_table.h.

References Halide::Runtime::Internal::StringStorage::assign(), Halide::Runtime::Internal::StringStorage::create(), Halide::Runtime::Internal::PointerTable::current_allocator(), Halide::Runtime::Internal::StringStorage::data(), Halide::Runtime::Internal::PointerTable::prepend(), and user_context.

## ◆ parse()

size_t Halide::Runtime::Internal::StringTable::parse | ( | void * | user_context,
|  | const char * | str,
|  | const char * | delim
| ) |  |

Definition at line 159 of file string_table.h.

References Halide::Runtime::Internal::StringStorage::assign(), Halide::Runtime::Internal::PointerTable::assign(), Halide::Runtime::Internal::StringUtils::count_tokens(), Halide::Runtime::Internal::StringStorage::data(), Halide::Runtime::Internal::StringUtils::is_empty(), resize(), Halide::Runtime::Internal::PointerTable::size(), Halide::Runtime::Internal::strlen(), strstr(), and user_context.

## ◆ operator[]()

const char * Halide::Runtime::Internal::StringTable::operator[] | ( | size_t | index | ) | const

Definition at line 118 of file string_table.h.

References Halide::Runtime::Internal::PointerTable::size().

## ◆ data()

const char ** Halide::Runtime::Internal::StringTable::data | ( |  | ) | const

Definition at line 205 of file string_table.h.

References Halide::Runtime::Internal::PointerTable::data().

## ◆ contains()

bool Halide::Runtime::Internal::StringTable::contains | ( | const char * | str | ) | const

Definition at line 191 of file string_table.h.

References Halide::Runtime::Internal::StringStorage::contains(), Halide::Runtime::Internal::StringUtils::is_empty(), and Halide::Runtime::Internal::PointerTable::size().

## ◆ size()

size_t Halide::Runtime::Internal::StringTable::size | ( |  | ) | const
| inline

Definition at line 54 of file string_table.h.

References Halide::Runtime::Internal::PointerTable::size().

The documentation for this class was generated from the following file:

- src/runtime/internal/string_table.h