Use OpenMP for scanner
[ctsim.git] / libctsupport / xform.cpp
index 03cc14eae2d47ec3b94455872cc777340f623cda..a8f09560d7aaa8871729db151eccbbf64b31e053 100644 (file)
@@ -1,8 +1,6 @@
 /*****************************************************************************
 **  This is part of the CTSim program
-**  Copyright (c) 1983-2001 Kevin Rosenberg
-**
-**  $Id$
+**  Copyright (c) 1983-2009 Kevin Rosenberg
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -121,6 +119,13 @@ rot_mtx2 (GRFMTX_2D m, const double theta)
   m[1][0] = -s;  m[1][1] = c;
 }
 
+void
+copy_mtx2 (GRFMTX_2D to, const GRFMTX_2D from) {
+  for (int r = 0; r < 3; r++)
+    for (int c = 0; c < 3; c++)
+      to[r][c] = from[r][c];
+}
+
 void
 mult_mtx2 (const GRFMTX_2D m1, const GRFMTX_2D m2, GRFMTX_2D result)
 {
@@ -133,10 +138,7 @@ mult_mtx2 (const GRFMTX_2D m1, const GRFMTX_2D m2, GRFMTX_2D result)
             temp[row][col] += m1[row][calc] * m2[calc][col];
     }
   }
-
-  for (int r = 0; r < 3; r++)
-    for (int col = 0; col < 3; col++)
-      result[r][col] = temp[r][col];
+  copy_mtx2 (result, temp);
 }
 
 void