mirror of
https://github.com/twitter/the-algorithm.git
synced 2025-01-09 18:59:25 +01:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
#pragma once
|
|
#include <twml/defines.h>
|
|
#include <twml/Tensor.h>
|
|
|
|
#ifdef __cplusplus
|
|
namespace twml {
|
|
TWMLAPI void linearInterpolation(
|
|
Tensor output,
|
|
const Tensor input,
|
|
const Tensor xs,
|
|
const Tensor ys);
|
|
|
|
TWMLAPI void nearestInterpolation(
|
|
Tensor output,
|
|
const Tensor input,
|
|
const Tensor xs,
|
|
const Tensor ys);
|
|
|
|
TWMLAPI void mdlInfer(
|
|
Tensor &output_keys,
|
|
Tensor &output_vals,
|
|
const Tensor &input_keys,
|
|
const Tensor &input_vals,
|
|
const Tensor &bin_ids,
|
|
const Tensor &bin_vals,
|
|
const Tensor &feature_offsets,
|
|
bool return_bin_indices = false);
|
|
}
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
TWMLAPI twml_err twml_optim_nearest_interpolation(
|
|
twml_tensor output,
|
|
const twml_tensor input,
|
|
const twml_tensor xs,
|
|
const twml_tensor ys);
|
|
|
|
TWMLAPI twml_err twml_optim_mdl_infer(
|
|
twml_tensor output_keys,
|
|
twml_tensor output_vals,
|
|
const twml_tensor input_keys,
|
|
const twml_tensor input_vals,
|
|
const twml_tensor bin_ids,
|
|
const twml_tensor bin_vals,
|
|
const twml_tensor feature_offsets,
|
|
const bool return_bin_indices = false);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|