Diff
checker
文本
文本
圖像
文檔
Excel
文件夾
Legal
Enterprise
桌面版
定價
登入
下載 Diffchecker 桌面版
比較文本
尋找兩個文字檔案之間的差異
工具
歷史
即時編輯器
摺疊未變更行
關閉換行
檢視
拆分
統一
比對精度
智能
單詞
字符
語法突出顯示
選擇語法
忽略
文字轉換
前往第一個差異
編輯輸入
Diffchecker Desktop
執行Diffchecker最安全的方式。取得Diffchecker桌面應用程式:您的差異永遠不會離開您的電腦!
取得桌面版
intend_to_pass_type_in_template_arg
建立於
3 年前
差異永不過期
清除
匯出
分享
解釋
0 刪除
行
總計
刪除
字符
總計
刪除
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
45 行
全部複製
4 新增
行
總計
新增
字符
總計
新增
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
45 行
全部複製
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
#ifndef TEST_UTIL_H
#ifndef TEST_UTIL_H
#define TEST_UTIL_H
#define TEST_UTIL_H
#include <utility>
#include <utility>
#include <experimental/simd>
#include <experimental/simd>
#include "type_algorithms.h"
#include "type_algorithms.h"
namespace ex = std::experimental::parallelism_v2;
namespace ex = std::experimental::parallelism_v2;
constexpr std::size_t max_simd_size = 32;
constexpr std::size_t max_simd_size = 32;
複製
已複製
複製
已複製
template <template <
std::size_t N> class F>
template <template <
class T,
std::size_t N> class F>
struct TestAllSimdAbiFunctor {
struct TestAllSimdAbiFunctor {
template <class T, std::size_t N>
template <class T, std::size_t N>
using sized_abis = types::type_list<ex::simd_abi::fixed_size<N>, ex::simd_abi::deduce_t<T, N>>;
using sized_abis = types::type_list<ex::simd_abi::fixed_size<N>, ex::simd_abi::deduce_t<T, N>>;
template <class T, std::size_t... Ns>
template <class T, std::size_t... Ns>
void instantiate_with_n(std::index_sequence<Ns...>) {
void instantiate_with_n(std::index_sequence<Ns...>) {
複製
已複製
複製
已複製
(types::for_each(sized_abis<T, Ns + 1>{}, F<
Ns + 1>{}), ...);
(types::for_each(sized_abis<T, Ns + 1>{}, F<
T,
Ns + 1>{}), ...);
}
}
template <class T>
template <class T>
void operator()() {
void operator()() {
using abis = types::type_list<ex::simd_abi::scalar, ex::simd_abi::native<T>, ex::simd_abi::compatible<T>>;
using abis = types::type_list<ex::simd_abi::scalar, ex::simd_abi::native<T>, ex::simd_abi::compatible<T>>;
複製
已複製
複製
已複製
types::for_each(abis{}, F<
1>());
types::for_each(abis{}, F<
T,
1>());
instantiate_with_n<T>(std::make_index_sequence<max_simd_size - 1>{});
instantiate_with_n<T>(std::make_index_sequence<max_simd_size - 1>{});
}
}
};
};
複製
已複製
複製
已複製
template <template <
std::size_t N> class Func>
template <template <
class T,
std::size_t N> class Func>
void test_all_simd_abi() {
void test_all_simd_abi() {
using arithmetic_no_bool_types = types::concatenate_t<types::integer_types, types::floating_point_types>;
using arithmetic_no_bool_types = types::concatenate_t<types::integer_types, types::floating_point_types>;
types::for_each(arithmetic_no_bool_types(), TestAllSimdAbiFunctor<Func>());
types::for_each(arithmetic_no_bool_types(), TestAllSimdAbiFunctor<Func>());
}
}
#endif // TEST_UTIL_H
#endif // TEST_UTIL_H
已保存差異
原始文本
開啟檔案
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef TEST_UTIL_H #define TEST_UTIL_H #include <utility> #include <experimental/simd> #include "type_algorithms.h" namespace ex = std::experimental::parallelism_v2; constexpr std::size_t max_simd_size = 32; template <template <std::size_t N> class F> struct TestAllSimdAbiFunctor { template <class T, std::size_t N> using sized_abis = types::type_list<ex::simd_abi::fixed_size<N>, ex::simd_abi::deduce_t<T, N>>; template <class T, std::size_t... Ns> void instantiate_with_n(std::index_sequence<Ns...>) { (types::for_each(sized_abis<T, Ns + 1>{}, F<Ns + 1>{}), ...); } template <class T> void operator()() { using abis = types::type_list<ex::simd_abi::scalar, ex::simd_abi::native<T>, ex::simd_abi::compatible<T>>; types::for_each(abis{}, F<1>()); instantiate_with_n<T>(std::make_index_sequence<max_simd_size - 1>{}); } }; template <template <std::size_t N> class Func> void test_all_simd_abi() { using arithmetic_no_bool_types = types::concatenate_t<types::integer_types, types::floating_point_types>; types::for_each(arithmetic_no_bool_types(), TestAllSimdAbiFunctor<Func>()); } #endif // TEST_UTIL_H
更改後文本
開啟檔案
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef TEST_UTIL_H #define TEST_UTIL_H #include <utility> #include <experimental/simd> #include "type_algorithms.h" namespace ex = std::experimental::parallelism_v2; constexpr std::size_t max_simd_size = 32; template <template <class T, std::size_t N> class F> struct TestAllSimdAbiFunctor { template <class T, std::size_t N> using sized_abis = types::type_list<ex::simd_abi::fixed_size<N>, ex::simd_abi::deduce_t<T, N>>; template <class T, std::size_t... Ns> void instantiate_with_n(std::index_sequence<Ns...>) { (types::for_each(sized_abis<T, Ns + 1>{}, F<T, Ns + 1>{}), ...); } template <class T> void operator()() { using abis = types::type_list<ex::simd_abi::scalar, ex::simd_abi::native<T>, ex::simd_abi::compatible<T>>; types::for_each(abis{}, F<T, 1>()); instantiate_with_n<T>(std::make_index_sequence<max_simd_size - 1>{}); } }; template <template <class T, std::size_t N> class Func> void test_all_simd_abi() { using arithmetic_no_bool_types = types::concatenate_t<types::integer_types, types::floating_point_types>; types::for_each(arithmetic_no_bool_types(), TestAllSimdAbiFunctor<Func>()); } #endif // TEST_UTIL_H
尋找差異