MCPcopy Create free account
hub / github.com/catboost/catboost / Test_mm_dualcmp

Method Test_mm_dualcmp

library/cpp/sse/ut/test.cpp:1101–1125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1099 typename TFunc, typename TElemFunc,
1100 typename TOp, typename TVectorType>
1101void TSSEEmulTest::Test_mm_dualcmp() {
1102 char data1[16] = {
1103 '\xAA', '\x00', '\xFF', '\xCC', '\x11', '\x66', '\x77', '\xAA',
1104 '\x33', '\x99', '\x44', '\x88', '\xCC', '\xBB', '\x66', '\x1C'};
1105 char data2[16] = {
1106 '\x99', '\x33', '\xFF', '\xCC', '\x88', '\x66', '\x77', '\x44',
1107 '\x33', '\x99', '\x44', '\x88', '\xCC', '\xBB', '\x22', '\xFF'};
1108 TElem* dataw1 = reinterpret_cast<TElem*>(&data1);
1109 TElem* dataw2 = reinterpret_cast<TElem*>(&data2);
1110
1111 TVectorType value1 = TFuncLoad<TVectorType>(&data1);
1112 TVectorType value2 = TFuncLoad<TVectorType>(&data2);
1113
1114 TElem procData[elemCount];
1115 for (unsigned i = 0; i < elemCount; ++i) {
1116 procData[i] = TElemFunc::Call(dataw1[i], dataw2[i]);
1117 }
1118 TVectorType result = TFunc(value1, value2);
1119
1120 for (unsigned i = 0; i < elemCount; ++i) {
1121 /* memcmp is for compare to invalid floats in results */
1122 const TElem value = TQType<TOp>::As(result)[i];
1123 UNIT_ASSERT(memcmp(&(procData[i]), &value, sizeof(TElem)) == 0);
1124 }
1125}
1126
1127void TSSEEmulTest::Test_mm_or_si128() {
1128 struct THelper {

Callers

nothing calls this directly

Calls 3

memcmpFunction · 0.85
CallFunction · 0.50
TFuncClass · 0.50

Tested by

no test coverage detected