多倍精度モジュールを実装していますが、現時点では乗算で立ち往生しています。
私のアルゴリズムを実行するには、Haswell マイクロアーキテクチャを使用して 64 ビットの 2 つの符号なしオペランドを乗算し、結果をメモリ ブロックに格納する必要があります。「g++」を使用した実装と、「icpc」を使用した別のより効率的な実装を行っています。
int main(){
//Operands
size_t a = 10000000000000000000 //Fit in 8 bytes
b = 7;
//To store the result;
size_t dst[2];
//Multiplication here... (Note that the multiplication result don't fit in 64bits. So, I need to save the result in two memory positions)
dst[0] = //Store the less significative half..
dst[1] = //Store the more significative half..
//My function
print_To_Screen(dst);
}
結果の各半分にアクセスして、必要なメモリ ブロックに格納する方法がわかりません。乗算にアセンブリ命令を使用し、結果を格納する義務がありますか、または簡単な方法がありますか?