Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/intgemm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'aligned.h')
-rw-r--r--aligned.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/aligned.h b/aligned.h
index 7514000..6795788 100644
--- a/aligned.h
+++ b/aligned.h
@@ -22,6 +22,9 @@ template <class T> class AlignedVector {
T *end() { return mem_ + size_; }
const T *end() const { return mem_ + size_; }
+ template <typename ReturnType>
+ ReturnType *as() { return reinterpret_cast<ReturnType*>(mem_); }
+
private:
T *mem_;
std::size_t size_;