File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1535,6 +1535,22 @@ namespace internal
15351535 };
15361536
15371537
1538+
1539+ /* *
1540+ * Replacement of std::swap for numbers that
1541+ * also runs on device.
1542+ */
1543+ template <class NumberType >
1544+ DEAL_II_HOST_DEVICE void
1545+ swap (NumberType &x, NumberType &y)
1546+ {
1547+ NumberType tmp = x;
1548+ x = y;
1549+ y = tmp;
1550+ }
1551+
1552+
1553+
15381554 template <typename Number>
15391555 struct Inverse <4 , 3 , Number>
15401556 {
@@ -1586,9 +1602,9 @@ namespace internal
15861602 if (r > j)
15871603 {
15881604 for (unsigned int k = 0 ; k < N; ++k)
1589- std:: swap (tmp.data [j][k], tmp.data [r][k]);
1605+ swap (tmp.data [j][k], tmp.data [r][k]);
15901606
1591- std:: swap (p[j], p[r]);
1607+ swap (p[j], p[r]);
15921608 }
15931609
15941610 // Transformation
You can’t perform that action at this time.
0 commit comments