daphne-project / daphne-project/daphne

Kernels for DenseMatrix of strings

Open
#415 7 comments 0 reactions 1 assignee Claimed by @akroviakov View on GitHub
Dominant language
C++
Stars
81
Forks
83
PR merge metrics
No merged PRs in 30d

Description

With the introduction of `DenseMatrix` for strings, we need to support kernels for strings, as well as add new string-specific kernels. Specializing templates for strings may result in _possibly severe_ code duplication. To address this issue, a conditional compilation (of a string-specific branch) within templates is preferred.

One of the main drawbacks in this regard of the current "naive" implementation is the usage of `const char*` to store strings, which requires heap allocation (and subsequent deletion) of temporaries before they can be `set()` in the result `DenseMatrix`.

**Objectives:**
1. Introduce elementwise string-specific kernels:
1.1. Unary: `ewLower`, `ewUpper`
1.2. Binary: `ewConcat`, `ewLike`

2. Extend existing kernels (not all of them, just try to find a good way to handle different classes of kernels) to support strings:
2.1. Output of new strings: `fill`, `matrixConstant`
2.2. Only output of existing strings: `transpose`
2.3. No output of strings: elementwise binary comparisons (lexicographical order)
2.4. Output of single string: aggregations

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.