vector<int64_t> negative(vector<int64_t> elems){ vector<int64_t> results; for (auto &elem : elems){ int64_t temp = 255 - elem > 0 ? 255 - elem : 0 ; results.push_back(temp); } return results; }
for (int64_t elem : elems) { cout << "first: " << elem << endl; asm ( "sub $255, %[in1];" "neg %[out]" : [out] "=r" (elem), [sse] "=x" (elems) : [in1] "r" (elem) ); cout << "second: " << elem << endl; results.push_back(elem); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)