concerted-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject incubator-concerted git commit: CONCERTED-20:Add Apache header to files and change license
Date Mon, 26 Oct 2015 14:57:12 GMT
Repository: incubator-concerted
Updated Branches:
  refs/heads/master c99bbdcf6 -> af37c9fe8


CONCERTED-20:Add Apache header to files and change license


Project: http://git-wip-us.apache.org/repos/asf/incubator-concerted/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-concerted/commit/af37c9fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-concerted/tree/af37c9fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-concerted/diff/af37c9fe

Branch: refs/heads/master
Commit: af37c9fe88aa45deadb829b3c4206fbbd02c864f
Parents: c99bbdc
Author: Nupur <nupurs@ingeniumsys.com>
Authored: Mon Oct 26 20:26:22 2015 +0530
Committer: Nupur <nupurs@ingeniumsys.com>
Committed: Mon Oct 26 20:26:22 2015 +0530

----------------------------------------------------------------------
 include/CacheManager.h          |  16 ++
 include/ConcDCT.h               |  16 ++
 include/ConcDef.h               |  16 ++
 include/ConcInvertedIndex.h     |  18 ++-
 include/ConcMAT.h               |  16 ++
 include/ConcQueue.h             |  32 +++-
 include/ConcSegHashTable.h      |  24 ++-
 include/QueueLock.h             |  22 ++-
 include/QueueLock2.h            |  22 ++-
 include/TransactionManager.h    |  18 ++-
 license                         | 203 +++++++++++++++++++++++-
 makefile                        |  17 ++
 src/CacheManager.cpp            |  16 ++
 src/ConcQueueTest.cpp           |  18 ++-
 test/ConcDCTConcurrencyTest.cpp |  20 ++-
 test/ConcDCTFileReader.cpp      |  18 ++-
 test/ConcDCTFileReader.cpp~     |  53 -------
 test/ConcDCTTest.cpp            |  16 ++
 test/ConcDCTTest.cpp~           |  62 --------
 test/ConcInvertedIndexTest.cpp  |  18 ++-
 test/ConcInvertedIndexTest.cpp~ |  28 ----
 test/ConcMATFileReader.cpp      |  18 ++-
 test/ConcMATTest.cpp            |  19 ++-
 test/ConcMATTest.cpp~           |  24 ---
 test/ConcSegHashTableTest.cpp   |  18 ++-
 test/ConcSegHashTableTest.cpp~  |  87 -----------
 test/ConcSkipListTest.cpp       |  22 ++-
 test/ConcSkipListTest.cpp~      | 294 -----------------------------------
 test/FileReader.cpp             |  16 ++
 test/FileReader.cpp~            |  52 -------
 test/QueueLockTest.cpp          |  18 ++-
 test/QueueLockTest.cpp~         |  43 -----
 32 files changed, 593 insertions(+), 687 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/CacheManager.h
----------------------------------------------------------------------
diff --git a/include/CacheManager.h b/include/CacheManager.h
index 4c137f3..546ff22 100644
--- a/include/CacheManager.h
+++ b/include/CacheManager.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include <iostream>
 #include "ConcDef.h"
 using namespace std;

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/ConcDCT.h
----------------------------------------------------------------------
diff --git a/include/ConcDCT.h b/include/ConcDCT.h
index 59a4e34..1c323ae 100644
--- a/include/ConcDCT.h
+++ b/include/ConcDCT.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include <iostream>
 #include "TransactionManager.h"
 using namespace std;

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/ConcDef.h
----------------------------------------------------------------------
diff --git a/include/ConcDef.h b/include/ConcDef.h
index c518e6c..4c75d81 100644
--- a/include/ConcDef.h
+++ b/include/ConcDef.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include <iostream>
 using namespace std;
 

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/ConcInvertedIndex.h
----------------------------------------------------------------------
diff --git a/include/ConcInvertedIndex.h b/include/ConcInvertedIndex.h
index 9fbab2f..4cf6fa6 100644
--- a/include/ConcInvertedIndex.h
+++ b/include/ConcInvertedIndex.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include<iostream>
 using namespace std;
 
@@ -273,7 +289,7 @@ public:
 			index_val->insert_val(temp);
 			traverse = temp;
 		}
-			
+
 		for (i = 1;i < n;i++)
 		{
 			if (i != index)

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/ConcMAT.h
----------------------------------------------------------------------
diff --git a/include/ConcMAT.h b/include/ConcMAT.h
index 1c8dc0e..8694567 100644
--- a/include/ConcMAT.h
+++ b/include/ConcMAT.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include<iostream>
 using namespace std;
 

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/ConcQueue.h
----------------------------------------------------------------------
diff --git a/include/ConcQueue.h b/include/ConcQueue.h
index 07dba00..c015580 100644
--- a/include/ConcQueue.h
+++ b/include/ConcQueue.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #ifndef CONCQUEUE_INCLUDED
 #define CONCQUEUE_INCLUDED
 
@@ -58,7 +74,7 @@ public:
 		insertion_lock.lock_value = 0;
 		deletion_lock.lock_value = 0;
 	}
-	
+
 	int CAS(volatile int *val, int compare_value, int swap_value)
 	{
 
@@ -77,7 +93,7 @@ public:
 			traverse = traverse->GetPointer();
 		}
 	}
-	
+
 	const QueueElement<data_val_type>* AddElement(data_val_type val)
 	{
 		QueueElement<data_val_type> *temp = NULL;
@@ -86,8 +102,8 @@ public:
 		temp = new QueueElement<data_val_type>(val);
 		temp->SetPointer(NULL);
 
-		/* Synchronization by locking with compare and swap.The current value of 
-                 * lock is compared with the expected value(locked,unlocked) and  
+		/* Synchronization by locking with compare and swap.The current value of
+                 * lock is compared with the expected value(locked,unlocked) and
                  * swapped accordingly.Threads spin until they acquire the lock.
                  */
 		 while(!(CAS(&(insertion_lock.lock_value), 0, 1)))
@@ -121,8 +137,8 @@ public:
 		temp = new QueueElement<data_val_type>(val);
 		temp->SetPointer(NULL);
 
-		/* Synchronization by locking with compare and swap.The current value of 
-                 * lock is compared with the expected value(locked,unlocked) and  
+		/* Synchronization by locking with compare and swap.The current value of
+                 * lock is compared with the expected value(locked,unlocked) and
                  * swapped accordingly.Threads spin until they acquire the lock.
                  */
 		 while(!(CAS(&(insertion_lock.lock_value), 0, 1)))
@@ -150,7 +166,7 @@ public:
 	{
 		QueueElement<data_val_type> *current_element = head;
 		QueueElement<data_val_type> *temp = NULL;
-		
+
 		while(!(CAS(&(deletion_lock.lock_value), 0, 1)))
 		{
 			//Spin waiting for the lock
@@ -235,5 +251,5 @@ public:
 
 	}
 };
-		 
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/ConcSegHashTable.h
----------------------------------------------------------------------
diff --git a/include/ConcSegHashTable.h b/include/ConcSegHashTable.h
index 764e323..7eed6db 100644
--- a/include/ConcSegHashTable.h
+++ b/include/ConcSegHashTable.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include "QueueLock.h"
 
 template<class data_val_type> class ConcSegHashTable
@@ -33,7 +49,7 @@ public:
 		read_lock_queues = new QueueLock[m * n];
 		write_lock_queues = new QueueLock[m * n];
 		read_lock_queues->SetTimeOutPeriod(3.0);
-		write_lock_queues->SetTimeOutPeriod(3.0);	
+		write_lock_queues->SetTimeOutPeriod(3.0);
 	}
 
 	int HashVal(data_val_type val)
@@ -115,7 +131,7 @@ public:
 			cout<<"Lock already taken"<<endl;
 		}
 		else
-		{	
+		{
 			get_write_lock = GetWriteLock(seg_index, pos, name1);
 			if(get_write_lock == 0)
 			{
@@ -130,7 +146,7 @@ public:
 
 				return (1);
 			}
-			
+
 		}
 
 			return (0);
@@ -162,7 +178,7 @@ public:
 				last_insert_segment = i;
 				return 1;
 			}
-		
+
 		}
 
 		for(i = 0;i < k;i++)

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/QueueLock.h
----------------------------------------------------------------------
diff --git a/include/QueueLock.h b/include/QueueLock.h
index e7549b8..b17a723 100644
--- a/include/QueueLock.h
+++ b/include/QueueLock.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include "ConcQueue.h"
 #include <ctime>
 
@@ -70,7 +86,7 @@ public:
 		const QueueElement<int> *p_add = lock_queue.AddElementInFront(0);
 		const int *p_spin = p_add->GetPointerToData();
 		struct timespec requestStart, requestEnd;
-			
+
 		if(lock_taken != 0)
 		{
 			clock_gettime(CLOCK_REALTIME, &requestStart);
@@ -99,7 +115,7 @@ public:
 		return (1);
 	}
 
-	 
+
 	int CheckLockIsAcquired()
 	{
 
@@ -118,5 +134,3 @@ public:
 	}
 
 };
-
-			

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/QueueLock2.h
----------------------------------------------------------------------
diff --git a/include/QueueLock2.h b/include/QueueLock2.h
index e4ada9e..7b846d9 100644
--- a/include/QueueLock2.h
+++ b/include/QueueLock2.h
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include "ConcQueue.h"
 #include <ctime>
 
@@ -70,7 +86,7 @@ public:
 		const QueueElement<int> *p_add = lock_queue.AddElementInFront(0);
 		const int *p_spin = p_add->GetPointerToData();
 		struct timespec requestStart, requestEnd;
-			
+
 		if(lock_taken != 0)
 		{
 			clock_gettime(CLOCK_REALTIME, &requestStart);
@@ -99,7 +115,7 @@ public:
 		return (1);
 	}
 
-	 
+
 	int CheckLockIsAcquired()
 	{
 
@@ -118,5 +134,3 @@ public:
 	}
 
 };
-
-			

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/include/TransactionManager.h
----------------------------------------------------------------------
diff --git a/include/TransactionManager.h b/include/TransactionManager.h
index cb7c1ff..e8e6d8c 100644
--- a/include/TransactionManager.h
+++ b/include/TransactionManager.h
@@ -1,4 +1,20 @@
-#include <iostream>
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ #include <iostream>
 #include "QueueLock2.h"
 #include "ConcDef.h"
 using namespace std;

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/license
----------------------------------------------------------------------
diff --git a/license b/license
index 42c955d..5e0fd33 100644
--- a/license
+++ b/license
@@ -1,10 +1,201 @@
-Copyright (c) 2013, Atri Sharma
-All rights reserved.
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
 
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
 
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+1. Definitions.
 
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"Licensor" shall mean the copyright owner or entity authorized by
+the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all
+other entities that control, are controlled by, or are under common
+control with that entity. For the purposes of this definition,
+"control" means (i) the power, direct or indirect, to cause the
+direction or management of such entity, whether by contract or
+otherwise, or (ii) ownership of fifty percent (50%) or more of the
+outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation
+source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a
+copyright notice that is included in or attached to the work
+(an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object
+form, that is based on (or derived from) the Work and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship. For the purposes
+of this License, Derivative Works shall not include works that remain
+separable from, or merely link (or bind by name) to the interfaces of,
+the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including
+the original version of the Work and any modifications or additions
+to that Work or Derivative Works thereof, that is intentionally
+submitted to Licensor for inclusion in the Work by the copyright owner
+or by an individual or Legal Entity authorized to submit on behalf of
+the copyright owner. For the purposes of this definition, "submitted"
+means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems,
+and issue tracking systems that are managed by, or on behalf of, the
+Licensor for the purpose of discussing and improving the Work, but
+excluding communication that is conspicuously marked or otherwise
+designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the
+Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made,
+use, offer to sell, sell, import, and otherwise transfer the Work,
+where such license applies only to those patent claims licensable
+by such Contributor that are necessarily infringed by their
+Contribution(s) alone or by combination of their Contribution(s)
+with the Work to which such Contribution(s) was submitted. If You
+institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work
+or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses
+granted to You under this License for that Work shall terminate
+as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+Work or Derivative Works thereof in any medium, with or without
+modifications, and in Source or Object form, provided that You
+meet the following conditions:
+
+(a) You must give any other recipients of the Work or
+Derivative Works a copy of this License; and
+
+(b) You must cause any modified files to carry prominent notices
+stating that You changed the files; and
+
+(c) You must retain, in the Source form of any Derivative Works
+that You distribute, all copyright, patent, trademark, and
+attribution notices from the Source form of the Work,
+excluding those notices that do not pertain to any part of
+the Derivative Works; and
+
+(d) If the Work includes a "NOTICE" text file as part of its
+distribution, then any Derivative Works that You distribute must
+include a readable copy of the attribution notices contained
+within such NOTICE file, excluding those notices that do not
+pertain to any part of the Derivative Works, in at least one
+of the following places: within a NOTICE text file distributed
+as part of the Derivative Works; within the Source form or
+documentation, if provided along with the Derivative Works; or,
+within a display generated by the Derivative Works, if and
+wherever such third-party notices normally appear. The contents
+of the NOTICE file are for informational purposes only and
+do not modify the License. You may add Your own attribution
+notices within Derivative Works that You distribute, alongside
+or as an addendum to the NOTICE text from the Work, provided
+that such additional attribution notices cannot be construed
+as modifying the License.
+
+You may add Your own copyright statement to Your modifications and
+may provide additional or different license terms and conditions
+for use, reproduction, or distribution of Your modifications, or
+for any such Derivative Works as a whole, provided Your use,
+reproduction, and distribution of the Work otherwise complies with
+the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work
+by You to the Licensor shall be under the terms and conditions of
+this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify
+the terms of any separate license agreement you may have executed
+with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+agreed to in writing, Licensor provides the Work (and each
+Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied, including, without limitation, any warranties or conditions
+of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any
+risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise,
+unless required by applicable law (such as deliberate and grossly
+negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a
+result of this License or out of the use or inability to use the
+Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses), even if such Contributor
+has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+the Work or Derivative Works thereof, You may choose to offer,
+and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this
+License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf
+of any other Contributor, and only if You agree to indemnify,
+defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason
+of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following
+boilerplate notice, with the fields enclosed by brackets "{}"
+replaced with your own identifying information. (Don't include
+the brackets!)  The text should be enclosed in the appropriate
+comment syntax for the file format. We also recommend that a
+file or class name and description of purpose be included on the
+same "printed page" as the copyright notice for easier
+identification within third-party archives.
+
+Copyright {yyyy} {name of copyright owner}
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/makefile
----------------------------------------------------------------------
diff --git a/makefile b/makefile
index adfb34a..abae2b8 100644
--- a/makefile
+++ b/makefile
@@ -1,3 +1,20 @@
+# /*
+#  * Licensed to the Apache Software Foundation (ASF) under one or more
+#  * contributor license agreements.  See the NOTICE file distributed with
+#  * this work for additional information regarding copyright ownership.
+#  * The ASF licenses this file to you under the Apache License, Version 2.0
+#  * (the "License"); you may not use this file except in compliance with
+#  * the License.  You may obtain a copy of the License at
+#  *
+#  * http://www.apache.org/licenses/LICENSE-2.0
+#  *
+#  * Unless required by applicable law or agreed to in writing, software
+#  * distributed under the License is distributed on an "AS IS" BASIS,
+#  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  * See the License for the specific language governing permissions and
+#  * limitations under the License.
+#  */
+
 OBJS = obj/CacheManager.o obj/ConcDCT.o obj/ConcMAT.o obj/ConcQueue.o obj/ConcSegHashTable.o obj/ConcInvertedIndex.o
 
 all: mkdirectory libconcerted.a obj/CacheManager.o obj/ConcDCT.o obj/ConcInvertedIndex.o obj/ConcMAT.o obj/ConcQueue.o obj/ConcSegHashTable.o

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/src/CacheManager.cpp
----------------------------------------------------------------------
diff --git a/src/CacheManager.cpp b/src/CacheManager.cpp
index 1043e03..a62bc52 100644
--- a/src/CacheManager.cpp
+++ b/src/CacheManager.cpp
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include "ConcDef.h"
 
 class CacheManager

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/src/ConcQueueTest.cpp
----------------------------------------------------------------------
diff --git a/src/ConcQueueTest.cpp b/src/ConcQueueTest.cpp
index a17919c..3fd6489 100644
--- a/src/ConcQueueTest.cpp
+++ b/src/ConcQueueTest.cpp
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include "ConcQueue.h"
 
 int main()
@@ -10,5 +26,3 @@ int main()
 	intqueue.GetToFront(intqueue.SearchQueue(6));
 	intqueue.PrintQueue();
 }
-
-

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcDCTConcurrencyTest.cpp
----------------------------------------------------------------------
diff --git a/test/ConcDCTConcurrencyTest.cpp b/test/ConcDCTConcurrencyTest.cpp
index ed775bb..544d72c 100644
--- a/test/ConcDCTConcurrencyTest.cpp
+++ b/test/ConcDCTConcurrencyTest.cpp
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include "../ConcDCT.h"
 
 	void *thread_lock_test1(void *arg1)
@@ -47,7 +63,7 @@
 
 		search_val(arr_val, tree_val);
 	}
-		
+
 	int main()
 	{
 	dct_tree *tree_val = NULL;
@@ -68,5 +84,3 @@
 	pthread_join(tid3,NULL);
 	pthread_join(tid4,NULL);
 	}
-
-	

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcDCTFileReader.cpp
----------------------------------------------------------------------
diff --git a/test/ConcDCTFileReader.cpp b/test/ConcDCTFileReader.cpp
index 33ac373..4e7471f 100644
--- a/test/ConcDCTFileReader.cpp
+++ b/test/ConcDCTFileReader.cpp
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include <iostream>
 #include <sstream>
 #include <fstream>
@@ -15,7 +31,7 @@ int count;
 int arr_val[3];
 dct_tree *tree_val = NULL;
 TransactionManager t1;
-		
+
 tree_val = build_dcttree(3);
 count = 0;
 while (std::getline(infile, line))  // this does the checking!

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcDCTFileReader.cpp~
----------------------------------------------------------------------
diff --git a/test/ConcDCTFileReader.cpp~ b/test/ConcDCTFileReader.cpp~
deleted file mode 100644
index 630c35e..0000000
--- a/test/ConcDCTFileReader.cpp~
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <iostream>
-#include <sstream>
-#include <fstream>
-#include <string>
-#include "../ConcDCT.h"
-
-using namespace std;
-
-std::string line;
-std::ifstream infile("sat.trn");
-
-int main()
-{
-int count;
-int arr_val[3];
-dct_tree *tree_val = NULL;
-TransactionManager t1;
-		
-tree_val = build_dcttree(3);
-count = 0;
-while (std::getline(infile, line))  // this does the checking!
-{
-  std::istringstream iss(line);
-  char c;
-
-   int value;
-  while (iss >> value)
-  {
-	if (count == 3)
-	{
-		insert_val(arr_val, tree_val, t1);
-		count = 0;
-		cout<<"record"<<endl;
-	}
-
-	arr_val[count] = value;
-	++count;
-  }
-}
-
-arr_val[0] = 91;
-arr_val[1] = 100;
-arr_val[2] = 81;
-
-if ((search_val(arr_val, tree_val)) != NULL)
-		{
-			cout<<"All values found"<<endl;
-		}
-		else
-		{
-			cout<<"All values not found"<<endl;
-		}
-}

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcDCTTest.cpp
----------------------------------------------------------------------
diff --git a/test/ConcDCTTest.cpp b/test/ConcDCTTest.cpp
index d17b277..ce3b5aa 100644
--- a/test/ConcDCTTest.cpp
+++ b/test/ConcDCTTest.cpp
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include "../include/ConcDCT.h"
 	int main()
 	{

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcDCTTest.cpp~
----------------------------------------------------------------------
diff --git a/test/ConcDCTTest.cpp~ b/test/ConcDCTTest.cpp~
deleted file mode 100644
index 303c166..0000000
--- a/test/ConcDCTTest.cpp~
+++ /dev/null
@@ -1,62 +0,0 @@
-#include "../ConcDCT.h"	
-	int main()
-	{
-		int att_array[3];
-		int i = 0;
-		TransactionManager transact_val1;
-		dct_tree *tree_val = NULL;
-		dct_tree *tree_val2 = NULL;
-		dct_tree *tree_val3 = NULL;
-		dct_node *temp = NULL;
-		tree_val = build_dcttree(3);
-		tree_val3 = build_dcttree(3);
-		att_array[0] = 1;
-		att_array[1] = 2;
-		att_array[2] = 3;
-		try
-		{
-			insert_val(att_array, tree_val, transact_val1);
-			insert_val(att_array, tree_val3, transact_val1);
-			//throw -1;
-			transact_val1.commit_transaction();
-			tree_val2 = copy_val((tree_val->getdummy()), (tree_val->getnumber_of_nodes()));
-		}catch (int e)
-		{
-			cout<<"exception caught"<<" "<<e<<endl;
-			return 1;
-		}
-
-		//att_array[2] = 3;
-		if (search_val(att_array, tree_val))
-		{
-			cout<<"All values found"<<endl;
-		}
-		else
-		{
-			cout<<"All values not found"<<endl;
-		}
-
-		temp = search_val(att_array, tree_val2);
-		if (temp != NULL)
-		{
-			cout<<" All values found copy tree"<<endl;
-		}
-		else
-		{
-			cout<<"All values not found copy tree"<<endl;
-		}
-
-		if (search_val(att_array, tree_val3))
-		{
-			cout<<"All values found3"<<endl;
-		}
-		else
-		{
-			cout<<"All values not found3"<<endl;
-		}
-
-		delete tree_val;
-		delete tree_val2;
-		delete tree_val3;
-		delete temp;
-	}

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcInvertedIndexTest.cpp
----------------------------------------------------------------------
diff --git a/test/ConcInvertedIndexTest.cpp b/test/ConcInvertedIndexTest.cpp
index 35ba9e0..69addb5 100644
--- a/test/ConcInvertedIndexTest.cpp
+++ b/test/ConcInvertedIndexTest.cpp
@@ -1,4 +1,20 @@
-#include "../include/ConcInvertedIndex.h"
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ #include "../include/ConcInvertedIndex.h"
 
 int main()
 	{

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcInvertedIndexTest.cpp~
----------------------------------------------------------------------
diff --git a/test/ConcInvertedIndexTest.cpp~ b/test/ConcInvertedIndexTest.cpp~
deleted file mode 100644
index 424c277..0000000
--- a/test/ConcInvertedIndexTest.cpp~
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "../ConcInvertedIndex.h"
-
-int main()
-	{
-		inv_index<3,0> *index1;
-		int att_values[3];
-		int return_value;
-
-		return_value = 0;
-		index1 = new inv_index<3,0>;
-		att_values[0] = 3;
-		att_values[1] = 4;
-		att_values[2] = 5;
-
-		insert_val(att_values, index1);
-
-		return_value = search_val(&(att_values[0]), index1);
-
-		if (return_value == 1)
-		{
-			cout<<"values found"<<" "<<return_value<<endl;
-		}
-		else
-		{
-			cout<<"values not found"<<" "<<return_value<<endl;
-		}
-
-	}

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcMATFileReader.cpp
----------------------------------------------------------------------
diff --git a/test/ConcMATFileReader.cpp b/test/ConcMATFileReader.cpp
index 3e924fc..2f05b18 100644
--- a/test/ConcMATFileReader.cpp
+++ b/test/ConcMATFileReader.cpp
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include <iostream>
 #include <sstream>
 #include <fstream>
@@ -23,7 +39,7 @@ while (std::getline(infile, line))  // this does the checking!
   char c;
 
    int value;
-  while (iss >> value) 
+  while (iss >> value)
   {
 	if (count == 3)
 	{

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcMATTest.cpp
----------------------------------------------------------------------
diff --git a/test/ConcMATTest.cpp b/test/ConcMATTest.cpp
index 555c033..5d87d54 100644
--- a/test/ConcMATTest.cpp
+++ b/test/ConcMATTest.cpp
@@ -1,4 +1,20 @@
-#include "../include/ConcMAT.h"
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ #include "../include/ConcMAT.h"
 
 	int main()
 	{
@@ -21,4 +37,3 @@
 
 		delete tree_val;
 	}
-

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcMATTest.cpp~
----------------------------------------------------------------------
diff --git a/test/ConcMATTest.cpp~ b/test/ConcMATTest.cpp~
deleted file mode 100644
index 459cdcc..0000000
--- a/test/ConcMATTest.cpp~
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "../ConcMAT.h"	
-
-	int main()
-	{
-		int att_array[3];
-		int i = 0;
-		mat_tree *tree_val = NULL;
-		tree_val = build_mattree(3);
-		att_array[0] = 1;
-		att_array[1] = 2;
-		att_array[2] = 3;
-		insert_val(att_array, tree_val);
-		if (search_val(att_array, tree_val))
-		{
-			cout<<"All values found"<<endl;
-		}
-		else
-		{
-			cout<<"All values not found"<<endl;
-		}
-
-		delete tree_val;
-	}
-

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcSegHashTableTest.cpp
----------------------------------------------------------------------
diff --git a/test/ConcSegHashTableTest.cpp b/test/ConcSegHashTableTest.cpp
index 92b8ce5..f52c773 100644
--- a/test/ConcSegHashTableTest.cpp
+++ b/test/ConcSegHashTableTest.cpp
@@ -1,4 +1,20 @@
-#include "../include/ConcSegHashTable.h"
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ #include "../include/ConcSegHashTable.h"
 
 ConcSegHashTable<int> tab1(10,2);
 void *thread_lock_test(void *arg1)

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcSegHashTableTest.cpp~
----------------------------------------------------------------------
diff --git a/test/ConcSegHashTableTest.cpp~ b/test/ConcSegHashTableTest.cpp~
deleted file mode 100644
index 6a61a1a..0000000
--- a/test/ConcSegHashTableTest.cpp~
+++ /dev/null
@@ -1,87 +0,0 @@
-#include "../ConcSegHashTable.h"
-
-ConcSegHashTable<int> tab1(10,2);
-void *thread_lock_test(void *arg1)
-{
-	//tab1.GetWriteLock(0,2,(char*)arg1);
-	//tab1.InsertElement(5, false, (char*)arg1);
-	if((tab1.InsertElement(5, false,(char*)arg1)) == 0)
-	{
-		cout<<"Value not inserted"<<" "<<(char*)arg1<<" "<<5<<endl;
-		sleep(1);
-	}
-
-	tab1.InsertElement(6, false,(char*)arg1);
-	//tab1.InsertElement(5, false,(char*)arg1);
-	//tab1.InsertElement(5, false,(char*)arg1);
-	//cout<<"read lock with"<<" "<<(char*)arg1<<endl;
-	//sleep(1);
-	//tab1.ReleaseWriteLock(0,2,(char*)arg1);
-	//cout<<"read lock released by"<<" "<<(char*)arg1<<endl;
-}
-
-void *thread_lock_test2(void *arg1)
-{
-	//tab1.GetWriteLock(0,2, (char*)arg1);
-	//cout<<"write lock with"<<" "<<(char*)arg1<<endl;
-	//tab1.ReleaseWriteLock(0,2, (char*)arg1);
-	//cout<<"write lock released by"<<" "<<(char*)arg1<<endl;
-	if((tab1.InsertElement(5, false, (char*)arg1)) == 0)
-	{
-		cout<<"Value not inserted"<<" "<<(char*)arg1<<" "<<5<<endl;
-		sleep(1);
-	}
-
-	if((tab1.InsertElement(6, false, (char*)arg1)) == 0)
-	{
-		cout<<"Value not inserted"<<" "<<(char*)arg1<<" "<<6<<endl;
-		sleep(1);
-	}
-}
-
-void *thread_lock_test3(void *arg1)
-{
-	/*tab1.GetReadLock(0,2, (char*)arg1);
-	cout<<"read lock with"<<" "<<(char*)arg1<<endl;
-	tab1.ReleaseReadLock(0,2, (char*)arg1);
-	cout<<"read lock released by"<<" "<<(char*)arg1<<endl;*/
-	if((tab1.InsertElement(6, false, (char*)arg1)) == 0)
-	{
-		cout<<"Value not inserted"<<" "<<(char*)arg1<<" "<<6<<endl;
-	}
-
-	//tab1.InsertElement(6, false, (char*)arg1);
-}
-
-void *thread_lock_test4(void *arg1)
-{
-	tab1.InsertElement(6,false,(char*)arg1);
-	tab1.InsertElement(9,false,(char*)arg1);
-}
-
-int main()
-{
-	pthread_t tid1;
-	pthread_t tid2;
-	pthread_t tid3;
-	pthread_t tid4;
-	char name1[] = "thread1";
-	char name2[] = "thread2";
-	char name3[] = "thread3";
-	char name4[] = "thread4";
-
-	pthread_create(&tid1,NULL,thread_lock_test,(void*)name1);
-	pthread_create(&tid2,NULL,thread_lock_test2,(void*)name2);
-	pthread_create(&tid3,NULL,thread_lock_test3,(void*)name3);
-	pthread_create(&tid4,NULL,thread_lock_test4,(void*)name4);
-
-	pthread_join(tid1,NULL);
-	pthread_join(tid2,NULL);
-	pthread_join(tid3,NULL);
-	pthread_join(tid4,NULL);
-
-	tab1.PrintValues();
-
-	//tab1.GetWriteLock(2,3);
-	//tab1.ReleaseWriteLock(2,3);
-}

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcSkipListTest.cpp
----------------------------------------------------------------------
diff --git a/test/ConcSkipListTest.cpp b/test/ConcSkipListTest.cpp
index 95552ff..7a252e4 100644
--- a/test/ConcSkipListTest.cpp
+++ b/test/ConcSkipListTest.cpp
@@ -1,4 +1,20 @@
-#include "../include/QueueLock.h"
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ #include "../include/QueueLock.h"
 
 class linked_list
 {
@@ -170,7 +186,7 @@ public:
 		insert_val(0, j, temp);
 		/*for (i = 1;i <= (level - 1);i++)
 		{*/
-			
+
 	}
 
 
@@ -251,7 +267,7 @@ public:
 		}
 
 		return -1;
-	}	
+	}
 };
 
 int main()

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/ConcSkipListTest.cpp~
----------------------------------------------------------------------
diff --git a/test/ConcSkipListTest.cpp~ b/test/ConcSkipListTest.cpp~
deleted file mode 100644
index 95552ff..0000000
--- a/test/ConcSkipListTest.cpp~
+++ /dev/null
@@ -1,294 +0,0 @@
-#include "../include/QueueLock.h"
-
-class linked_list
-{
-	int val;
-	linked_list *next;
-public:
-	linked_list()
-	{
-		val = 0;
-		next = NULL;
-	}
-	int getval()
-	{
-		return val;
-	}
-
-	void setval(int a)
-	{
-		val = a;
-	}
-
-	linked_list* getnext()
-	{
-		return next;
-	}
-
-	void setnext(linked_list *val)
-	{
-		next = val;
-	}
-};
-
-class skip_list_master
-{
-	int curr_level;
-	int max_level;
-	float probability_val;
-	linked_list **list_array;
-public:
-	skip_list_master()
-	{
-		curr_level = 0;
-		max_level = 5;
-		list_array = NULL;
-		probability_val = 0.25;
-	}
-
-	void insert_val(int location, int index, linked_list *temp)
-	{
-		linked_list *traverse = NULL;
-		int i = 0;
-
-		if (list_array == NULL)
-		{
-			list_array = (linked_list**)malloc(sizeof(linked_list*));
-			list_array[0] = temp;
-			curr_level = 1;
-
-			cout<<"Inserted condition 1"<<" "<<list_array[0]->getval()<<endl;
-
-			return;
-		}
-
-		i = index;
-		traverse = list_array[location];
-
-		/*while((traverse->getnext()) != NULL && (traverse->getval()) < a && ((traverse->getnext())->getval()) < a)
-		{
-			cout<<"In loop"<<endl;
-			traverse = traverse->getnext();
-		}*/
-
-		while (i > 0)
-		{
-			traverse = traverse->getnext();
-			--i;
-		}
-
-		if ((traverse->getnext()) == NULL)
-		{
-			traverse->setnext(temp);
-			return;
-		}
-		/*else if ((traverse->getval()) >= a)
-		{
-			temp->setnext(traverse);
-			return;
-		}*/
-
-		temp->setnext(traverse->getnext());
-		traverse->setnext(temp);
-
-	}
-
-	void insert_skip(int a)
-	{
-		linked_list **traverse_skip = NULL;
-		linked_list *traverse_list = NULL;
-		linked_list *previous_pointer = NULL;
-		linked_list *temp = NULL;
-		int i = 0;
-		int j = 0;
-		int level = 0;
-		int iteration_value = 0;
-
-		level = level_generate();
-		i = level - 1;
-
-		if (level > max_level)
-		{
-			iteration_value = max_level;
-		}
-		else
-		{
-			iteration_value = level;
-		}
-
-		temp = (linked_list*)malloc(sizeof(linked_list));
-
-		temp->setval(a);
-
-		if (!list_array)
-		{
-			insert_val(a, 0, temp);
-			return;
-		}
-		else
-		{
-			traverse_skip = (linked_list**)malloc(sizeof(linked_list*) * max_level);
-		}
-
-		traverse_list = list_array[level - 1];
-
-		for (i = (level - 1);i >= 0;i--)
-		{
-			previous_pointer = NULL;
-
-			if (j > 0)
-			{
-				while (j > 0)
-				{
-					traverse_list = traverse_list->getnext();
-					--j;
-				}
-			}
-
-			if (traverse_list == NULL)
-			{
-				cout<<"traverse_list is NULL"<<endl;
-			}
-			else
-			{
-				cout<<"traverse_list is not NULL"<<endl;
-			}
-
-			while (traverse_list != NULL && (traverse_list->getval()) < a)
-			{
-				cout<<"In loop 2"<<" "<<(traverse_list->getval())<<endl;
-				++j;
-				previous_pointer = traverse_list;
-				traverse_list = traverse_list->getnext();
-			}
-
-			traverse_skip[i] = previous_pointer;
-
-			traverse_list = list_array[i];
-		}
-
-		insert_val(0, j, temp);
-		/*for (i = 1;i <= (level - 1);i++)
-		{*/
-			
-	}
-
-
-	void print_val()
-	{
-		linked_list *traverse = NULL;
-
-		if (list_array)
-		{
-			traverse = list_array[0];
-		}
-
-		while (traverse != NULL)
-		{
-			cout<<"val is"<<" "<<traverse->getval()<<endl;
-			traverse = traverse->getnext();
-		}
-	}
-
-	int level_generate()
-	{
-		double rand_val = static_cast<double>(rand()) / RAND_MAX;
-		int level = 0;
-
-		while (rand_val > probability_val && level < max_level)
-		{
-			++level;
-			rand_val = static_cast<double>(rand()) / RAND_MAX;
-		}
-
-		return level;
-	}
-
-	int search_val(int key)
-	{
-		linked_list **traverse_skip = NULL;
-		linked_list *traverse_list = NULL;
-		int i = 0;
-		int j = 0;
-
-		i = curr_level;
-
-		if (!list_array)
-		{
-			return 0;
-		}
-		else
-		{
-			traverse_skip = (linked_list**)malloc(sizeof(linked_list*) * max_level);
-		}
-
-		traverse_list = list_array[curr_level - 1];
-
-		for (i = (curr_level - 1);i >= 0;i--)
-		{
-			if (j > 0)
-			{
-				while (j > 0)
-				{
-					traverse_list = traverse_list->getnext();
-					--j;
-				}
-			}
-
-			while (traverse_list != NULL && (traverse_list->getval()) != key)
-			{
-				cout<<"In loop 2"<<" "<<(traverse_list->getval())<<endl;
-				++j;
-				traverse_list = traverse_list->getnext();
-			}
-
-			if (traverse_list != NULL)
-			{
-				return 1;
-			}
-
-			traverse_list = list_array[i];
-		}
-
-		return -1;
-	}	
-};
-
-int main()
-{
-	srand(time(0));
-	int low = 0;
-	int high = 1;
-	int result_search = 0;
-	double dUniform = static_cast<double>(rand()) / RAND_MAX;
-	skip_list_master list1;
-	int val1 = list1.level_generate();
-
-	//list1.insert_val(1,0);
-	//list1.insert_val(2,0);
-	//list1.insert_val(4,0);
-	//list1.insert_val(7,0);
-	//list1.insert_val(6,0);
-
-	list1.insert_skip(1);
-	//list1.insert_skip(2);
-	//list1.insert_skip(3);
-	//list1.insert_skip(4);
-	//list1.insert_skip(5);
-
-
-	//list1.print_val();
-
-	result_search = list1.search_val(1);
-
-	cout<<"search result"<<" "<<result_search<<endl;
-
-	if (dUniform > 5)
-	{
-		cout<<"insertion"<<dUniform<<" "<<val1<<endl;
-	}
-	else
-	{
-		cout<<"no insertion"<<dUniform<<" "<<val1<<endl;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/FileReader.cpp
----------------------------------------------------------------------
diff --git a/test/FileReader.cpp b/test/FileReader.cpp
index e87cd19..9b22da7 100644
--- a/test/FileReader.cpp
+++ b/test/FileReader.cpp
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include <iostream>
 #include <sstream>
 #include <fstream>

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/FileReader.cpp~
----------------------------------------------------------------------
diff --git a/test/FileReader.cpp~ b/test/FileReader.cpp~
deleted file mode 100644
index 3e924fc..0000000
--- a/test/FileReader.cpp~
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <iostream>
-#include <sstream>
-#include <fstream>
-#include <string>
-#include "../ConcMAT.h"
-
-using namespace std;
-
-std::string line;
-std::ifstream infile("sat.trn");
-
-int main()
-{
-int count;
-int arr_val[3];
-mat_tree *tree_val = NULL;
-
-tree_val = build_mattree(3);
-count = 0;
-while (std::getline(infile, line))  // this does the checking!
-{
-  std::istringstream iss(line);
-  char c;
-
-   int value;
-  while (iss >> value) 
-  {
-	if (count == 3)
-	{
-		insert_val(arr_val, tree_val);
-		count = 0;
-		cout<<"record"<<endl;
-	}
-
-	arr_val[count] = value;
-	++count;
-  }
-}
-
-arr_val[0] = 91;
-arr_val[1] = 100;
-arr_val[2] = 81;
-
-if ((search_val(arr_val, tree_val)) != NULL)
-		{
-			cout<<"All values found"<<endl;
-		}
-		else
-		{
-			cout<<"All values not found"<<endl;
-		}
-}

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/QueueLockTest.cpp
----------------------------------------------------------------------
diff --git a/test/QueueLockTest.cpp b/test/QueueLockTest.cpp
index cb12392..828b501 100644
--- a/test/QueueLockTest.cpp
+++ b/test/QueueLockTest.cpp
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #include<unistd.h>
 #include "../include/QueueLock.h"
 
@@ -39,5 +55,3 @@ int main()
 	pthread_join(tid4,NULL);
 	pthread_join(tid5,NULL);
 }
-	
-

http://git-wip-us.apache.org/repos/asf/incubator-concerted/blob/af37c9fe/test/QueueLockTest.cpp~
----------------------------------------------------------------------
diff --git a/test/QueueLockTest.cpp~ b/test/QueueLockTest.cpp~
deleted file mode 100644
index 2e48f69..0000000
--- a/test/QueueLockTest.cpp~
+++ /dev/null
@@ -1,43 +0,0 @@
-#include<unistd.h>
-#include "../QueueLock.h"
-
-QueueLock GlobalQueueLock;
-void *thread_getlock_start(void *arg1)
-{
-	GlobalQueueLock.GetLock();
-	cout<<"Lock acquired by"<<" "<<(char*)arg1<<endl;
-	usleep(1);
-	GlobalQueueLock.ReleaseLock();
-}
-
-int main()
-{
-	int data_value = 5;
-	QueueLock lock1;
-	pthread_t tid1;
-	pthread_t tid2;
-	pthread_t tid3;
-	pthread_t tid4;
-	pthread_t tid5;
-	pthread_t tid6;
-	pthread_t tid7;
-	char name1[] = "thread1";
-	char name2[] = "thread2";
-	char name3[] = "thread3";
-	char name4[] = "thread4";
-	char name5[] = "thread5";
-
-	pthread_create(&tid1,NULL,thread_getlock_start,(void*)(name1));
-	pthread_create(&tid2,NULL,thread_getlock_start,(void*)(name2));
-	pthread_create(&tid3,NULL,thread_getlock_start,(void*)(name3));
-	pthread_create(&tid4,NULL,thread_getlock_start,(void*)(name4));
-	pthread_create(&tid5,NULL,thread_getlock_start,(void*)(name5));
-
-	pthread_join(tid1,NULL);
-	pthread_join(tid2,NULL);
-	pthread_join(tid3,NULL);
-	pthread_join(tid4,NULL);
-	pthread_join(tid5,NULL);
-}
-	
-


Mime
View raw message