Fixed bitfieldInsert and bitfieldExtract
This commit is contained in:
@@ -866,7 +866,7 @@ namespace sign
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
std::size_t const Count = 1000000000;
|
||||
std::size_t const Count = 10000000;
|
||||
std::vector<glm::int32> Input, Output;
|
||||
Input.resize(Count);
|
||||
Output.resize(Count);
|
||||
@@ -913,7 +913,7 @@ namespace sign
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
std::size_t const Count = 1000000000;
|
||||
std::size_t const Count = 10000000;
|
||||
std::vector<glm::int32> Input, Output;
|
||||
Input.resize(Count);
|
||||
Output.resize(Count);
|
||||
@@ -960,7 +960,7 @@ namespace sign
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
glm::uint32 const Count = 1000000000;
|
||||
glm::uint32 const Count = 10000000;
|
||||
|
||||
std::clock_t Timestamp0 = std::clock();
|
||||
glm::int32 Sum = 0;
|
||||
|
||||
@@ -37,11 +37,12 @@ namespace bitfieldInsert
|
||||
|
||||
typeU32 const Data32[] =
|
||||
{
|
||||
{0x00000000, 0xffffffff, 0, 31, 0x7fffffff},
|
||||
{0x00000000, 0xffffffff, 0, 32, 0xffffffff},
|
||||
{0x00000000, 0xffffffff, 0, 0, 0x00000000},
|
||||
{0xff000000, 0x0000ff00, 8, 8, 0xff00ff00},
|
||||
{0xffff0000, 0x0000ffff, 16, 16, 0x00000000},
|
||||
{0x0000ffff, 0xffff0000, 16, 16, 0xffffffff},
|
||||
{0x00000000, 0xffffffff, 0, 32, 0xffffffff},
|
||||
{0x00000000, 0xffffffff, 0, 0, 0x00000000}
|
||||
{0x0000ffff, 0xffff0000, 16, 16, 0xffffffff}
|
||||
};
|
||||
|
||||
int test()
|
||||
@@ -342,7 +343,7 @@ namespace findMSB
|
||||
|
||||
std::clock_t Timestamps1 = std::clock();
|
||||
|
||||
for(std::size_t k = 0; k < 10000000; ++k)
|
||||
for(std::size_t k = 0; k < 1000000; ++k)
|
||||
for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
|
||||
{
|
||||
int Result = findMSB_095(Data[i].Value);
|
||||
@@ -401,7 +402,7 @@ namespace findMSB
|
||||
|
||||
std::clock_t Timestamps1 = std::clock();
|
||||
|
||||
for(std::size_t k = 0; k < 10000000; ++k)
|
||||
for(std::size_t k = 0; k < 1000000; ++k)
|
||||
for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
|
||||
{
|
||||
int Result = findMSB_nlz1(Data[i].Value);
|
||||
@@ -536,7 +537,7 @@ namespace findMSB
|
||||
int Error(0);
|
||||
|
||||
Error += perf_950();
|
||||
Error += perf_ops();
|
||||
//Error += perf_ops();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user