Disable unrolling in FixedVector to remove "warning: loop not unrolled"
MODIFY
test/test_utils.hpp
test/test_utils.hpp
@@ -150,6 +150,7 @@ struct FixedVector
__host__ __device__
FixedVector()
{
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
data[i] = T();
}
@@ -157,6 +158,7 @@ struct FixedVector
__host__ __device__
FixedVector(T init)
{
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
data[i] = init;
}
@@ -165,6 +167,7 @@ struct FixedVector
FixedVector operator+(const FixedVector& bs) const
{
FixedVector output;
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
output.data[i] = data[i] + bs.data[i];
return output;
@@ -173,6 +176,7 @@ struct FixedVector
__host__ __device__
bool operator<(const FixedVector& bs) const
{
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
{
if(data[i] < bs.data[i])
@@ -186,6 +190,7 @@ struct FixedVector
__host__ __device__
bool operator==(const FixedVector& bs) const
{
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
{
if(!(data[i] == bs.data[i]))

MODIFY
testing/unittest/special_types.h
testing/unittest/special_types.h
@@ -11,6 +11,7 @@ struct FixedVector
__host__ __device__
FixedVector()
{
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
data[i] = T();
}
@@ -18,6 +19,7 @@ struct FixedVector
__host__ __device__
FixedVector(T init)
{
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
data[i] = init;
}
@@ -26,6 +28,7 @@ struct FixedVector
FixedVector operator+(const FixedVector& bs) const
{
FixedVector output;
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
output.data[i] = data[i] + bs.data[i];
return output;
@@ -34,6 +37,7 @@ struct FixedVector
__host__ __device__
bool operator<(const FixedVector& bs) const
{
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
{
if(data[i] < bs.data[i])
@@ -47,6 +51,7 @@ struct FixedVector
__host__ __device__
bool operator==(const FixedVector& bs) const
{
+ #pragma nounroll
for(unsigned int i = 0; i < N; i++)
{
if(!(data[i] == bs.data[i]))
@@ -181,4 +186,3 @@ using thrust::detail::uint64_t;
}
-

Disable unrolling in FixedVector to remove "warning: loop not unrolled"