#include "services/on_device_model/ml/session_accessor.h"
#include "base/compiler_specific.h"
#include "services/on_device_model/ml/chrome_ml.h"
namespace ml {
class SessionAccessor::Canceler : public base::RefCountedThreadSafe<Canceler> { … };
SessionAccessor::Ptr SessionAccessor::Create(
const ChromeML& chrome_ml,
scoped_refptr<base::SequencedTaskRunner> task_runner,
ChromeMLModel model,
on_device_model::AdaptationAssets adaptation_assets) { … }
DISABLE_CFI_DLSYM
SessionAccessor::~SessionAccessor() { … }
SessionAccessor::SessionAccessor(
const ChromeML& chrome_ml,
scoped_refptr<base::SequencedTaskRunner> task_runner,
ChromeMLModel model)
: … { … }
SessionAccessor::Ptr SessionAccessor::Clone() { … }
ChromeMLCancelFn SessionAccessor::Execute(
on_device_model::mojom::InputOptionsPtr input,
ChromeMLExecutionOutputFn output_fn,
ChromeMLContextSavedFn context_saved_fn) { … }
void SessionAccessor::Score(const std::string& text, ChromeMLScoreFn score_fn) { … }
void SessionAccessor::SizeInTokens(const std::string& text,
ChromeMLSizeInTokensFn size_in_tokens_fn) { … }
DISABLE_CFI_DLSYM
void SessionAccessor::CloneFrom(SessionAccessor* other) { … }
DISABLE_CFI_DLSYM
void SessionAccessor::CreateInternal(
on_device_model::AdaptationAssets adaptation_assets) { … }
DISABLE_CFI_DLSYM
void SessionAccessor::ExecuteInternal(
on_device_model::mojom::InputOptionsPtr input,
ChromeMLExecutionOutputFn output_fn,
ChromeMLContextSavedFn context_saved_fn,
scoped_refptr<Canceler> canceler) { … }
DISABLE_CFI_DLSYM
void SessionAccessor::ScoreInternal(const std::string& text,
ChromeMLScoreFn score_fn) { … }
DISABLE_CFI_DLSYM
void SessionAccessor::SizeInTokensInternal(
const std::string& text,
ChromeMLSizeInTokensFn size_in_tokens_fn) { … }
}