Class KMer

Inheritance Relationships

Base Type

Class Documentation

class seq::types::KMer : public seq::types::Type

Public Functions

KMer(KMer const&) = delete
void operator=(KMer const&) = delete
unsigned getK()
std::string getName() const override

Returns the full name (e.g. array[int], Foo[str,bool]) of this type.

llvm::Value *defaultValue(llvm::BasicBlock *block) override

Codegens the default value of this type. Usually this is just what you’d expect: zero for integral types, null for pointer and reference types, recursively defined for aggregate types.


value of the default value

  • block: where to codegen the default value

void initOps() override

Performs a one-time initialization of this type’s methods, including magic methods.

bool isAtomic() const override

Returns whether this type is “atomic”. A type is defined to be atomic if its LLVM representation contains no pointers to heap allocated data. This is used internally by the GC, as we can allocate “atomic” and “non-atomic” blocks separately. Atomic blocks do not need to be scanned when searching for pointers.

bool is(Type *type) const override

Checks whether this type “is” another type.

llvm::Type *getLLVMType(llvm::LLVMContext &context) const override

Returns the LLVM type corresponding to this type.

size_t size(llvm::Module *module) const override

Returns the size (in bytes) of the LLVM type corresponding to this type.

KMer *asKMer() override

Returns this type as a k-mer type, or null if it isn’t a k-mer type. This is basically for overriding C++’s RTTI/dynamic_cast so that generic types can be converted to their actual types.

Public Static Functions

KMer *get(unsigned k)

Public Static Attributes

const unsigned MAX_LEN = 1024

Protected Functions

KMer(unsigned k)

Protected Attributes

unsigned k