blob: 59d1fc7688e880a695de7e5755238ff12866ad00 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
namespace vespalib::eval::tensor_function {
template <typename T, typename IN> uint64_t wrap_param(const IN &value_in) {
const T &value = value_in;
static_assert(sizeof(uint64_t) == sizeof(&value));
return (uint64_t)&value;
}
template <typename T> const T &unwrap_param(uint64_t param) {
return *((const T *)param);
}
} // namespace
|