Skip to content

Commit

Permalink
repo-sync-2024-10-08T10:24:52+0800 (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie authored Oct 8, 2024
1 parent 4fb5ce5 commit ccabb41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions yacl/math/galois_field/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ yacl_cc_library(
visibility = ["//visibility:public"],
deps = [
":gf_interface",
"//yacl/math/galois_field/factory:intel_factory",
"//yacl/math/galois_field/factory:mcl_factory",
"//yacl/math/galois_field/factory:mpint_factory",
],
] + select({
"@platforms//cpu:x86_64": [
"//yacl/math/galois_field/factory:intel_factory",
],
"//conditions:default": [],
}),
)

yacl_cc_library(
Expand Down
2 changes: 2 additions & 0 deletions yacl/math/galois_field/gf_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ TEST(ExtensionFieldTest, Works) {
EXPECT_TRUE(gf->GetExtensionDegree() == 2);
}

#ifdef __x86_64__
TEST(BinaryTest, Works) {
// Note that: kPrimeField implmentation requires ArgDegree
auto gf = GaloisFieldFactory::Instance().Create(kBinaryField, ArgDegree = 64);
Expand All @@ -50,5 +51,6 @@ TEST(BinaryTest, Works) {
EXPECT_EQ(gf->GetFieldName(), kBinaryField);
EXPECT_TRUE(gf->GetExtensionDegree() == 64);
}
#endif

} // namespace yacl::math

0 comments on commit ccabb41

Please sign in to comment.