Fix GPU test bugs, a slight optimization, and moving/adding tests
Change-Id: I96e129a1093f6df3466fc02263afbbde6f1a9bb8
Signed-off-by: Justin Turcotte <jjturcot@gmail.com>
diff --git a/frc971/orin/points.h b/frc971/orin/points.h
index 312d90a..d530a17 100644
--- a/frc971/orin/points.h
+++ b/frc971/orin/points.h
@@ -203,9 +203,17 @@
}
// See QuadBoundaryPoint for a description of the rest of these.
+ // Sets the 10 bit x and y.
+ __forceinline__ __host__ __device__ void set_base_xy(uint32_t x, uint32_t y) {
+ key = (key & 0xffffffffff00000full) |
+ (static_cast<uint64_t>(x & 0x3ff) << 14) |
+ (static_cast<uint64_t>(y & 0x3ff) << 4);
+ }
+
__forceinline__ __host__ __device__ uint32_t base_x() const {
return ((key >> 14) & 0x3ff);
}
+
__forceinline__ __host__ __device__ uint32_t base_y() const {
return ((key >> 4) & 0x3ff);
}