[Genabel-commits] r1272 - pkg/OmicABEL/src/reshuffle

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jul 21 20:27:54 CEST 2013


Author: sharapovsodbo
Date: 2013-07-21 20:27:53 +0200 (Sun, 21 Jul 2013)
New Revision: 1272

Modified:
   pkg/OmicABEL/src/reshuffle/iout_file.cpp
Log:
ver 0.009
--fixed bug with big data
--this version crashed on data: 100 000 traits, 2 000 000 SNP
--TODO: fixed bug for very-very big data 
improve performance
refactoring code

Modified: pkg/OmicABEL/src/reshuffle/iout_file.cpp
===================================================================
--- pkg/OmicABEL/src/reshuffle/iout_file.cpp	2013-07-19 12:05:18 UTC (rev 1271)
+++ pkg/OmicABEL/src/reshuffle/iout_file.cpp	2013-07-21 18:27:53 UTC (rev 1272)
@@ -84,10 +84,18 @@
 	int t_off = traitNo % header.tile_t;
 	int m_tile = snpNo / header.tile_m;
 	int m_off = snpNo % header.tile_m;
+
 	int per_trait_per_snp = header.p + header.p * (header.p + 1) / 2;
-	tileCoor = (t_tile * (header.m * header.tile_t)
-			+ m_tile* (header.tile_m* min(header.tile_t,header.t - header.tile_t * t_tile))
-			+ t_off * (min(header.tile_m, header.m - header.tile_m * m_tile))
-			+ m_off) * per_trait_per_snp * sizeof(double);
+
+	//cout <<t_tile<<endl<<t_off<<endl<<m_tile<<endl<<m_off<<endl<<endl;
+	//cout<<(tileCoor)<<endl;
+	tileCoor = (int64_t)t_tile * header.m * header.tile_t;
+	//cout<<(tileCoor)<<endl;
+	tileCoor += (int64_t)m_tile * header.tile_m * min(header.tile_t,header.t - header.tile_t * t_tile);
+	//cout<<(tileCoor)<<endl;
+	tileCoor += (int64_t)t_off * min(header.tile_m, header.m - header.tile_m * m_tile)+ m_off;
+	//cout<<(tileCoor)<<endl;
+	tileCoor *= (int64_t)per_trait_per_snp * sizeof(double);
+	//cout<<(tileCoor)<<endl;
 	return tileCoor;
 }



More information about the Genabel-commits mailing list