chromium/services/on_device_model/ml/session_accessor.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// Wrapper for the ChromeMLCancel object.
class SessionAccessor::Canceler : public base::RefCountedThreadSafe<Canceler> {};

// static
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) {}

}  // namespace ml