| @@ -88,6 +88,8 @@ class NodePass : public Pass { | |||||
| // Default DFS traversal | // Default DFS traversal | ||||
| explicit NodePass(Order order = Order::DFS) { traversalOrder_ = order; } | explicit NodePass(Order order = Order::DFS) { traversalOrder_ = order; } | ||||
| ~NodePass() = default; | |||||
| // Run the transformation pass against the execution tree. | // Run the transformation pass against the execution tree. | ||||
| // @param tree - Pointer to the execution tree to be transformed. | // @param tree - Pointer to the execution tree to be transformed. | ||||
| // @param modified - Pointer to the modified flag, | // @param modified - Pointer to the modified flag, | ||||
| @@ -35,6 +35,8 @@ class LookupOp : public TensorOp { | |||||
| // @param WordIdType default_id, id to lookup if a word is not in vocab | // @param WordIdType default_id, id to lookup if a word is not in vocab | ||||
| explicit LookupOp(std::shared_ptr<Vocab> vocab, WordIdType default_id = Vocab::kSpecialTokens::unk); | explicit LookupOp(std::shared_ptr<Vocab> vocab, WordIdType default_id = Vocab::kSpecialTokens::unk); | ||||
| ~LookupOp() = default; | |||||
| // perform actual lookup on each tensor | // perform actual lookup on each tensor | ||||
| // @param const std::shared_ptr<Tensor> &input | // @param const std::shared_ptr<Tensor> &input | ||||
| // @param std::shared_ptr<Tensor> *output | // @param std::shared_ptr<Tensor> *output | ||||
| @@ -71,6 +71,8 @@ class Vocab { | |||||
| // @param std::unordered_map<WordType, WordIdType> map - sanitized word2id map | // @param std::unordered_map<WordType, WordIdType> map - sanitized word2id map | ||||
| explicit Vocab(std::unordered_map<WordType, WordIdType> map); | explicit Vocab(std::unordered_map<WordType, WordIdType> map); | ||||
| ~Vocab() = default; | |||||
| // enum type that holds all special tokens, add more if needed | // enum type that holds all special tokens, add more if needed | ||||
| enum kSpecialTokens : WordIdType { pad = 0, unk = 1, num_tokens = 2 }; | enum kSpecialTokens : WordIdType { pad = 0, unk = 1, num_tokens = 2 }; | ||||