diff --git a/src/tools/Emulator.cpp b/src/tools/Emulator.cpp index aed720b0..0e3ded82 100644 --- a/src/tools/Emulator.cpp +++ b/src/tools/Emulator.cpp @@ -2844,8 +2844,7 @@ EmulationResult tools::emulate(const EmulationData& data) if(!data.memoryDump.empty()) dumpMemory(mem, data.memoryDump, uniformAddress, false); - EmulationResult result{data}; - result.executionSuccessful = status; + EmulationResult result{data, status, {}}; result.results.reserve(data.parameter.size()); for(std::size_t i = 0; i < data.parameter.size(); ++i) diff --git a/testing/boost-compute/test_function.cl b/testing/boost-compute/test_function.cl index f4423fee..730baff7 100644 --- a/testing/boost-compute/test_function.cl +++ b/testing/boost-compute/test_function.cl @@ -30,3 +30,25 @@ for(uint i = 0; i < n; i++){ } +inline bool compare_second(_pair_int_float_t a, _pair_int_float_t b){ return a.second < b.second; } + + +__kernel void serial_insertion_sort_second(__local _pair_int_float_t* data, uint n, __global _pair_int_float_t* _buf0) +{ +for(uint i = 0; i < n; i++){ + data[i] = _buf0[i]; +} +for(uint i = 1; i < n; i++){ + const _pair_int_float_t value = data[i]; + uint pos = i; + while(pos > 0 && compare_second(value, data[pos-1])){ + data[pos] = data[pos-1]; + pos--; + } + data[pos] = value; +} +for(uint i = 0; i < n; i++){ + _buf0[i] = data[i]; +} + +} diff --git a/testing/test_shuffle.cl b/testing/test_shuffle.cl index 87f35032..a24b582f 100644 --- a/testing/test_shuffle.cl +++ b/testing/test_shuffle.cl @@ -292,3 +292,107 @@ __kernel void sample_test_char4(__global char* source, __global char4* dest) tmp.s1 = shuffle_fn(source[31]); dest[31] = tmp; } + +__kernel void sample_test_float3(__global float* source, __global float* dest) +{ + if(get_global_id(0) != 0) + return; + // float src1 /*, src2*/; + float3 tmp; + tmp = (float) ((float) 0); + tmp.s1 = source[0]; + vstore3(tmp, 0, dest); + tmp = (float) ((float) 0); + tmp.S0 = source[1]; + vstore3(tmp, 1, dest); + tmp = (float) ((float) 0); + tmp.S1 = source[2]; + vstore3(tmp, 2, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[3]; + vstore3(tmp, 3, dest); + tmp = (float) ((float) 0); + tmp.s0 = source[4]; + vstore3(tmp, 4, dest); + tmp = (float) ((float) 0); + tmp.S0 = source[5]; + vstore3(tmp, 5, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[6]; + vstore3(tmp, 6, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[7]; + vstore3(tmp, 7, dest); + tmp = (float) ((float) 0); + tmp.S2 = source[8]; + vstore3(tmp, 8, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[9]; + vstore3(tmp, 9, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[10]; + vstore3(tmp, 10, dest); + tmp = (float) ((float) 0); + tmp.S0 = source[11]; + vstore3(tmp, 11, dest); + tmp = (float) ((float) 0); + tmp.s0 = source[12]; + vstore3(tmp, 12, dest); + tmp = (float) ((float) 0); + tmp.s1 = source[13]; + vstore3(tmp, 13, dest); + tmp = (float) ((float) 0); + tmp.S0 = source[14]; + vstore3(tmp, 14, dest); + tmp = (float) ((float) 0); + tmp.s1 = source[15]; + vstore3(tmp, 15, dest); + tmp = (float) ((float) 0); + tmp.S2 = source[16]; + vstore3(tmp, 16, dest); + tmp = (float) ((float) 0); + tmp.S2 = source[17]; + vstore3(tmp, 17, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[18]; + vstore3(tmp, 18, dest); + tmp = (float) ((float) 0); + tmp.S2 = source[19]; + vstore3(tmp, 19, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[20]; + vstore3(tmp, 20, dest); + tmp = (float) ((float) 0); + tmp.S2 = source[21]; + vstore3(tmp, 21, dest); + tmp = (float) ((float) 0); + tmp.S1 = source[22]; + vstore3(tmp, 22, dest); + tmp = (float) ((float) 0); + tmp.s0 = source[23]; + vstore3(tmp, 23, dest); + tmp = (float) ((float) 0); + tmp.S2 = source[24]; + vstore3(tmp, 24, dest); + tmp = (float) ((float) 0); + tmp.S1 = source[25]; + vstore3(tmp, 25, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[26]; + vstore3(tmp, 26, dest); + tmp = (float) ((float) 0); + tmp.s1 = source[27]; + vstore3(tmp, 27, dest); + tmp = (float) ((float) 0); + tmp.s2 = source[28]; + vstore3(tmp, 28, dest); + tmp = (float) ((float) 0); + tmp.S2 = source[29]; + vstore3(tmp, 29, dest); + tmp = (float) ((float) 0); + tmp.S2 = source[30]; + vstore3(tmp, 30, dest); + tmp = (float) ((float) 0); + tmp.s1 = source[31]; + vstore3(tmp, 31, dest); +}