reduce_util.hpp 389 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#ifndef REDUCE_UTILS_HPP
#define REDUCE_UTILS_HPP

#include "data_type.hpp"

namespace ck {
namespace reduce_util {

template <typename T>
void to_f32_vector(const Tensor<T>& src, Tensor<float>& dst)
{
12
    for(std::size_t i = 0; i < src.mData.size(); ++i)
13
14
15
16
17
18
19
        dst.mData[i] = type_convert<float>(src.mData[i]);
}

} // namespace reduce_util

} // namespace ck
#endif