Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
intend_to_pass_type_in_template_arg
Créé
il y a 3 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
0 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
45 lignes
Copier tout
4 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
45 lignes
Copier tout
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
//
//
// 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;
Copier
Copié
Copier
Copié
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...>) {
Copier
Copié
Copier
Copié
(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>>;
Copier
Copié
Copier
Copié
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>{});
}
}
};
};
Copier
Copié
Copier
Copié
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
Différences enregistrées
Texte d'origine
Ouvrir un fichier
//===----------------------------------------------------------------------===// // // 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
Texte modifié
Ouvrir un fichier
//===----------------------------------------------------------------------===// // // 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
Trouver la différence