MCPcopy Create free account
hub / github.com/OpenMined/TenSEAL / create_encoder

Method create_encoder

tenseal/cpp/context/tensealencoder.h:123–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 // Can throw exception in case of invalid parameters
122 template <typename T>
123 shared_ptr<T> create_encoder() {
124 std::unique_lock lock(mutex_);
125
126 const type_index& tidx = type_index(typeid(T));
127
128 _encoders[tidx] = make_shared<T>(*this->_context);
129
130 return any_cast<shared_ptr<T>>(_encoders[tidx]);
131 }
132
133 bool has_encoder(const type_index& tidx) {
134 std::shared_lock lock(mutex_);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected