Commit 3091c1de authored by Adam P. Goucher's avatar Adam P. Goucher

Three more symmetries

parent 2796d429
Pipeline #54404214 passed with stages
in 7 minutes and 44 seconds
#ifndef LIFELIB_VERSION /* #ifndef LIFELIB_VERSION /*
__version__=[x.replace('"', '') for x in ''' __version__=[x.replace('"', '') for x in '''
*/ */
#define LIFELIB_VERSION "ll2.2.2" #define LIFELIB_VERSION "ll2.2.3"
// '''.split() if ('ll' in x)][0][2:] // '''.split() if ('ll' in x)][0][2:]
#endif #endif
...@@ -94,6 +94,48 @@ __global__ void copyhashes_D2_p2(uint64_cu *multiverse, uint32_cu *univec, uint6 ...@@ -94,6 +94,48 @@ __global__ void copyhashes_D2_p2(uint64_cu *multiverse, uint32_cu *univec, uint6
#include "cphash_footer.h" #include "cphash_footer.h"
} }
__global__ void copyhashes_D4_p1(uint64_cu *multiverse, uint32_cu *univec, uint64_cu *hashes, uint32_cu offset, bool initial) {
#include "cphash_header.h"
if ((threadIdx.x >= 32) && (threadIdx.x < 48)) {
b = hashes[(hashnum << 2) + (threadIdx.x >> 2) - 8];
b = (b >> (16 * (threadIdx.x & 3)));
b = ((b & 0x00ff) << 32) | ((b & 0xff00) << 16);
} else if ((threadIdx.x > 16) && (threadIdx.x < 32)) {
uint32_cu ti = 64 - threadIdx.x;
b = hashes[(hashnum << 2) + (ti >> 2) - 8];
b = (b >> (16 * (ti & 3)));
b = ((b & 0x00ff) << 32) | ((b & 0xff00) << 16);
}
uint64_cu CUDABITREVERSE(c, b);
b = (b >> 7) | (c << 8);
#include "cphash_footer.h"
}
__global__ void copyhashes_D4_p2(uint64_cu *multiverse, uint32_cu *univec, uint64_cu *hashes, uint32_cu offset, bool initial) {
#include "cphash_header.h"
if ((threadIdx.x >= 32) && (threadIdx.x < 48)) {
b = hashes[(hashnum << 2) + (threadIdx.x >> 2) - 8];
b = (b >> (16 * (threadIdx.x & 3)));
b = ((b & 0x00ff) << 32) | ((b & 0xff00) << 16);
} else if ((threadIdx.x > 16) && (threadIdx.x < 32)) {
uint32_cu ti = 64 - threadIdx.x;
b = hashes[(hashnum << 2) + (ti >> 2) - 8];
b = (b >> (16 * (ti & 3)));
b = ((b & 0x00ff) << 32) | ((b & 0xff00) << 16);
}
uint64_cu CUDABITREVERSE(c, b);
b = (b >> 8) | (c << 8);
#include "cphash_footer.h"
}
__global__ void copyhashes_D4_p4(uint64_cu *multiverse, uint32_cu *univec, uint64_cu *hashes, uint32_cu offset, bool initial) { __global__ void copyhashes_D4_p4(uint64_cu *multiverse, uint32_cu *univec, uint64_cu *hashes, uint32_cu offset, bool initial) {
#include "cphash_header.h" #include "cphash_header.h"
...@@ -135,6 +177,10 @@ void copyhashes(std::string full_symmetry, int universes_left, uint64_cu *multiv ...@@ -135,6 +177,10 @@ void copyhashes(std::string full_symmetry, int universes_left, uint64_cu *multiv
copyhashes_D2_p1<<<universes_left, 64>>>(multiverse, univec, hashes, offset, initial); copyhashes_D2_p1<<<universes_left, 64>>>(multiverse, univec, hashes, offset, initial);
} else if (symmetry == "D2_+2") { } else if (symmetry == "D2_+2") {
copyhashes_D2_p2<<<universes_left, 64>>>(multiverse, univec, hashes, offset, initial); copyhashes_D2_p2<<<universes_left, 64>>>(multiverse, univec, hashes, offset, initial);
} else if (symmetry == "D4_+1") {
copyhashes_D4_p1<<<universes_left, 64>>>(multiverse, univec, hashes, offset, initial);
} else if (symmetry == "D4_+2") {
copyhashes_D4_p2<<<universes_left, 64>>>(multiverse, univec, hashes, offset, initial);
} else if (symmetry == "D4_+4") { } else if (symmetry == "D4_+4") {
copyhashes_D4_p4<<<universes_left, 64>>>(multiverse, univec, hashes, offset, initial); copyhashes_D4_p4<<<universes_left, 64>>>(multiverse, univec, hashes, offset, initial);
} else { } else {
......
...@@ -14,7 +14,7 @@ def get_symmetries(rulestring): ...@@ -14,7 +14,7 @@ def get_symmetries(rulestring):
"D2_+2", "D2_+1", "D2_x", "D4_+4", "D4_+2", "D4_+1", "D4_x4", "D4_x1", "D8_4", "D8_1"] "D2_+2", "D2_+1", "D2_x", "D4_+4", "D4_+2", "D4_+1", "D4_x4", "D4_x1", "D8_4", "D8_1"]
if (re.match('^b0?1?2?3?4?5?6?7?8?s0?1?2?3?4?5?6?7?8?$', rulestring)): if (re.match('^b0?1?2?3?4?5?6?7?8?s0?1?2?3?4?5?6?7?8?$', rulestring)):
validsyms += ["G1", "H2_+1", "H2_+2"] # GPU symmetries validsyms += ["G1", "H2_+1", "H2_+2", "H4_+1", "H4_+2", "H4_+4"] # GPU symmetries
return validsyms return validsyms
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment