diff --git a/src/aparapi/com.amd.aparapi.jni/build_altera_ocl_v15_posix_mem_align.xml b/src/aparapi/com.amd.aparapi.jni/build_altera_ocl_v15_posix_mem_align.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0418ee9be34e1a174b73708263fcde8c490791f5
--- /dev/null
+++ b/src/aparapi/com.amd.aparapi.jni/build_altera_ocl_v15_posix_mem_align.xml
@@ -0,0 +1,907 @@
+<?xml version="1.0"?>
+
+<!--
+You should not have to edit this file
+First consider editing the properties in build.properties
+-->
+<project name="com.amd.aparapi.jni" default="build" basedir=".">
+
+   <property file="build.properties"/>
+	
+   <!-- 
+   DO NOT EDIT BELOW THIS LINE 
+   -->
+   <echo>OS Name:    ${os.name}</echo>
+   <echo>OS Version: ${os.version}</echo>
+   <echo>OS Arch:    ${os.arch}</echo>
+
+   <!--<property name="build.compiler" value="javac1.6"/>-->
+   <!--  <property name="ant.build.javac.source" value="1.6"/>-->
+   <!-- <property name="ant.build.javac.target" value="1.6"/> -->
+
+   <property environment="env" />
+   <!-- we need env.PATH for msvc only -->
+
+   <!-- uncomment this if you want to use mingw! -->
+   <!--<property name="mingw.dir" value="c:\\MinGW"/>-->
+
+   <target name="init">
+      <available property="win32.amd.app.sdk.exists" file="C:/Program Files/AMD APP" type="dir"/>
+
+      <condition property="amd.app.sdk.dir" value="C:/Program Files/AMD APP">
+         <and>
+            <os family="windows" />
+            <isset property="win32.amd.app.sdk.exists" />
+            <not>
+               <isset property="amd.app.sdk.dir" />
+            </not>
+         </and>
+      </condition>
+
+      <available property="win64.amd.app.sdk.exists" file="C:/Program Files (x86)/AMD APP" type="dir"/>
+      <condition property="amd.app.sdk.dir" value="C:/Program Files (x86)/AMD APP">
+         <and>
+            <os family="windows" />
+            <isset property="win64.amd.app.sdk.exists" />
+            <not>
+               <isset property="win32.amd.app.sdk.exists" />
+            </not>
+         </and>
+      </condition>
+
+      <!-- !!! oren change -> detect Altera OpenCL SDK -->
+      <available property="linux.amd.app.sdk.exists" file="${env.ALTERAOCLSDKROOT}" type="dir"/>
+      <condition property="amd.app.sdk.dir" value="${env.ALTERAOCLSDKROOT}">
+         <and>
+            <os family="unix" />
+            <not>
+               <os family="mac" />
+            </not>
+            <isset property="linux.amd.app.sdk.exists" />
+            <not>
+               <isset property="win32.amd.app.sdk.exists" />
+            </not>
+            <not>
+               <isset property="win64.amd.app.sdk.exists" />
+            </not>
+         </and>
+      </condition>
+
+      <echo message=" amd.app.sdk.dir ${amd.app.sdk.dir}"/>
+   	
+   	  <!-- !!! wagnerse add -> automatically get the gcc compile arguments for the Altera OpenCL -->
+   	  <exec executable="aocl" outputproperty="altera.opencl.sdk.compileconfig" failonerror="true">
+   	  	<arg line="compile-config"/>
+   	  </exec>
+   	
+   	  <echo message=" AOCL Compile configuration: ${altera.opencl.sdk.compileconfig}"/>
+
+ 	  <!-- !!! wagnerse add -> automatically get the gcc link arguments for the Altera OpenCL -->
+ 	  <exec executable="aocl" outputproperty="altera.opencl.sdk.linkconfig" failonerror="true">
+ 	  	<arg line="link-config"/>
+ 	  </exec>
+   	
+ 	  <echo message=" AOCL Link configuration: ${altera.opencl.sdk.linkconfig}"/>
+
+      <!-- !!! 11.11.14 oren change -> detect Altera OpenCL SDK Board Package root -->
+      <available property="linux.amd.app.bsp.exists" file="${env.AOCL_BOARD_PACKAGE_ROOT}" type="dir"/>
+      <condition property="amd.app.bsp.dir" value="${env.AOCL_BOARD_PACKAGE_ROOT}">
+         <and>
+            <os family="unix" />
+            <not>
+               <os family="mac" />
+            </not>
+            <isset property="linux.amd.app.bsp.exists" />
+            <not>
+               <isset property="win32.amd.app.sdk.exists" />
+            </not>
+            <not>
+               <isset property="win64.amd.app.sdk.exists" />
+            </not>
+         </and>
+      </condition>
+
+      <echo message=" amd.app.bsp.dir ${amd.app.bsp.dir}"/>
+
+	  <!-- Check for Visual Studio -->
+	  <!-- This needs to be in descending order to properly handle multiple installations -->
+	  
+      <available property="msvc.32.11.0.exists" file="c:/Program Files (x86)/Microsoft Visual Studio 11.0\VC\bin" type="dir"/>
+      <condition property="msvc.dir" value="c:/Program Files (x86)/Microsoft Visual Studio 11.0">
+         <and>
+            <not>
+               <or>
+                  <os arch="x86" />
+                  <os arch="i386" />
+               </or>
+            </not>
+            <os family="windows" />
+            <isset property="msvc.32.11.0.exists" />
+            <not>
+               <isset property="msvc.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+      
+      <available property="msvc.64.10.0.exists" file="c:/Program Files/Microsoft Visual Studio 10.0\vc\bin" type="dir"/>
+      <condition property="msvc.dir" value="c:/Program Files/Microsoft Visual Studio 10.0">
+         <and>
+            <or>
+               <os arch="x86" />
+               <os arch="i386" />
+            </or>
+            <os family="windows" />
+            <isset property="msvc.64.10.0.exists" />
+            <not>
+               <isset property="msvc.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+      
+      <available property="msvc.32.10.0.exists" file="c:/Program Files (x86)/Microsoft Visual Studio 10.0\vc\bin" type="dir"/>
+      <condition property="msvc.dir" value="c:/Program Files (x86)/Microsoft Visual Studio 10.0">
+         <and>
+            <not>
+               <or>
+                  <os arch="x86" />
+                  <os arch="i386" />
+               </or>
+            </not>
+            <os family="windows" />
+            <isset property="msvc.32.10.0.exists" />
+            <not>
+               <isset property="msvc.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+      
+      <available property="msvc.32.9.0.exists" file="c:/Program Files/Microsoft Visual Studio 9.0\vc\bin" type="dir"/>
+      <condition property="msvc.dir" value="c:/Program Files/Microsoft Visual Studio 9.0">
+         <and>
+            <or>
+               <os arch="x86" />
+               <os arch="i386" />
+            </or>
+            <os family="windows" />
+            <isset property="msvc.32.9.0.exists" />
+            <not>
+               <isset property="msvc.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+
+	  <!-- Check for SDKs -->
+	  <!-- This needs to be in descending order to properly handle multiple installations -->
+	  
+      <!-- <available property="msvc.sdk.8.0A.32.exists" file="C:/Program Files (x86)/Microsoft SDKs/Windows/v8.0A" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files (x86)/Microsoft SDKs/Windows/v8.0A">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.8.0A.32.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+      
+      <available property="msvc.sdk.8.0.32.exists" file="C:/Program Files (x86)/Microsoft SDKs/Windows/v8.0" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files (x86)/Microsoft SDKs/Windows/v8.0">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.8.0.32.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition> -->
+      
+      <available property="msvc.sdk.7.1A.exists" file="C:/Program Files/Microsoft SDKs/Windows/v7.1A" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files/Microsoft SDKs/Windows/v7.1A">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.7.1A.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+      
+      <available property="msvc.sdk.7.1A.32.exists" file="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.7.1A.32.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+      
+      <available property="msvc.sdk.7.1.exists" file="C:/Program Files/Microsoft SDKs/Windows/v7.1" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files/Microsoft SDKs/Windows/v7.1">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.7.1.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+
+	  <available property="msvc.sdk.7.1.32.exists" file="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.7.1.32.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+
+      <available property="msvc.sdk.7.0A.exists" file="C:/Program Files/Microsoft SDKs/Windows/v7.0A" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files/Microsoft SDKs/Windows/v7.0A">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.7.0A.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+
+      <available property="msvc.sdk.7.0A.32.exists" file="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.7.0A.32.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+      
+      <available property="msvc.sdk.7.0.exists" file="C:/Program Files/Microsoft SDKs/Windows/v7.0" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files/Microsoft SDKs/Windows/v7.0">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.7.0.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+
+      <available property="msvc.sdk.6.0A.exists" file="C:/Program Files/Microsoft SDKs/Windows/v6.0A" type="dir"/>
+      <condition property="msvc.sdk.dir" value="C:/Program Files/Microsoft SDKs/Windows/v6.0A">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.sdk.6.0A.exists" />
+            <not>
+               <isset property="msvc.sdk.dir" />
+            </not>
+            <not>
+               <isset property="mingw.dir" />
+            </not>
+         </and>
+      </condition>
+
+      <echo message=" msvc.dir ${msvc.dir}"/>
+      <echo message=" msvc.sdk.dir ${msvc.sdk.dir}"/>
+   </target>
+
+   <target name="check" depends="init">
+
+      <fail message="Error:">
+         <condition>
+            <and>
+               <os family="windows" />
+               <isset property="msvc.dir" />
+               <not>
+                  <isset property="msvc.sdk.dir" />
+               </not>
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         At present msvc.dir seems to be Configured but not msvc.sdk.dir
+         ]]>
+      </fail>
+
+      <fail message="Error:">
+         <condition>
+            <and>
+               <os family="windows" />
+               <not>
+                  <isset property="msvc.dir" />
+               </not>
+               <isset property="msvc.sdk.dir" />
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         At present msvc.sdk.dir seems to be Configured but not msvc.dir
+         ]]>
+      </fail>
+      <available file="${msvc.dir}" type="dir" property="msvc.dir.exists" />
+      <available file="${msvc.sdk.dir}" type="dir" property="msvc.sdk.dir.exists" />
+
+      <fail message="Error:">
+         <condition>
+            <and>
+               <os family="windows" />
+               <isset property="msvc.dir" />
+               <not>
+                  <isset property="msvc.dir.exists" />
+               </not>
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         At present msvc.dir is set (to ${msvc.dir}) but that dir does not exist
+         ]]>
+      </fail>
+      <fail message="Error:">
+         <condition>
+            <and>
+               <os family="windows" />
+               <isset property="msvc.sdk.dir" />
+               <not>
+                  <isset property="msvc.sdk.dir.exists" />
+               </not>
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         At present msvc.sdk.dir is set (to ${msvc.sdk.dir}) but that dir does not exist
+         ]]>
+      </fail>
+
+
+      <available file="${mingw.dir}" type="dir" property="mingw.dir.exists" />
+      <fail message="Error:">
+         <condition>
+            <and>
+               <os family="windows" />
+               <isset property="mingw.dir" />
+               <not>
+                  <isset property="mingw.dir.exists" />
+               </not>
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         At present mingw.dir is set (to ${mingw.dir}) but that dir does not exist
+         ]]>
+      </fail>
+      <!--<echo message="java.home ${java.home}"/>-->
+      <!--<echo message="msvc.dir.exists ${msvc.dir.exists}"/>-->
+      <!--<echo message="msvc.sdk.dir.exists ${msvc.sdk.dir.exists}"/>-->
+      <!--<echo message="mingw.dir.exists ${mingw.dir.exists}"/>-->
+      <condition property="use.msvc">
+         <and>
+            <os family="windows" />
+            <isset property="msvc.dir.exists" />
+            <isset property="msvc.sdk.dir.exists" />
+         </and>
+      </condition>
+      <!--<echo message="use.msvc ${use.msvc}"/>-->
+
+      <condition property="use.mingw">
+         <and>
+            <os family="windows" />
+            <isset property="mingw.dir.exists" />
+         </and>
+      </condition>
+      <!--<echo message="use.mingw ${use.mingw}"/>-->
+
+      <fail message="Error:">
+         <condition>
+            <and>
+               <isset property="use.mingw" />
+               <isset property="use.msvc" />
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         At present ant is Configured for both MinGW AND Microsoft Visual Studio. You need to pick one or the other :) !
+
+         Just comment out the properties for the compiler that you *do not* wish to use.
+         ]]>
+      </fail>
+
+      <fail message="Error:">
+         <condition>
+            <and>
+               <os family="windows" />
+               <not>
+                  <or>
+                     <isset property="use.mingw" />
+                     <isset property="use.msvc" />
+                  </or>
+               </not>
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         This looks like a windows machine so you probably need to Configure either:-
+
+         * msvc.dir and msvc.sdk.dir if you wish to use Microsoft Visual Studio compiler
+
+         * mingw.dir if you prefer if you prefer to use MinGW 
+         ]]>
+      </fail>
+
+      <condition property="use.gcc">
+         <and>
+            <os family="unix" />
+            <not>
+               <os family="mac" />
+            </not>
+         </and>
+      </condition>
+
+      <condition property="use.gcc_mac">
+         <os family="mac" />
+      </condition>
+
+      <condition property="x86_or_x86_64" value="x86" else="x86_64">
+         <or>
+            <os arch="x86" />
+            <os arch="i386" />
+         </or>
+      </condition>
+
+      <condition property="optional.amd64.subdir" value="" else="amd64\">
+         <or>
+            <os arch="x86" />
+            <os arch="i386" />
+         </or>
+      </condition>
+
+      <condition property="optional.x64.subdir" value="" else="x64\">
+         <or>
+            <os arch="x86" />
+            <os arch="i386" />
+         </or>
+      </condition>
+
+
+      <available file="${msvc.dir}\vc\bin\${optional.amd64.subdir}cl.exe" type="file" property="cl.exists" />
+
+      <fail message="Error:">
+         <condition>
+            <and>
+               <isset property="use.msvc" />
+               <not>
+                  <isset property="cl.exists" />
+               </not>
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         Could not find vc\bin\${optional.amd64.subdir}cl under Configured msvc.dir. Check if msvc.dir is pointing
+         to a valid visual studio installation
+         ]]>
+      </fail>
+
+      <fail message="Error:">
+         <condition>
+            <and>
+               <not>
+                  <os family="mac" />
+               </not>
+               <not>
+                  <isset property="amd.app.sdk.dir" />
+               </not>
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         You need to set amd.app.sdk.dir to point to the location where AMD APP SDK is installed
+         ]]>
+      </fail>
+      <available file="${amd.app.sdk.dir}" type="dir" property="amd.app.sdk.dir.exists" />
+
+      <fail message="Error:">
+         <condition>
+            <and>
+               <not>
+                  <os family="mac" />
+               </not>
+               <not>
+                  <isset property="amd.app.sdk.dir.exists" />
+               </not>
+            </and>
+         </condition>
+         <![CDATA[
+         You will need to edit com.amd.aparapi.jni/build.properties to compile aparapi JNI code
+
+         At present amd.app.sdk.dir is set (to ${amd.app.sdk.dir}) but that dir does not exist
+         ]]>
+      </fail>
+   </target>
+
+   <target name="clean" depends="check">
+      <delete dir="include" />
+      <delete dir="${basedir}/dist" />
+      <!-- Legacy cleanup -->
+      <delete file="libaparapi_${x86_or_x86_64}.dylib" />
+      <delete file="libaparapi_${x86_or_x86_64}.so" />
+      <delete file="aparapi_${x86_or_x86_64}.dll" />
+      <delete file="aparapi.dll" />
+      <delete file="aparapi.obj" />
+      <delete file="aparapi.o" />
+      <delete file="aparapi.lib" />
+      <delete file="aparapi.exp" />
+      <delete file="OpenCLJNI.obj" />
+      <delete file="OpenCLJNI.o" />
+      <delete file="Config.obj" />
+      <delete file="Config.o" />
+      <delete file="ProfileInfo.obj" />
+      <delete file="ProfileInfo.o" />
+      <delete file="ArrayBuffer.obj" />
+      <delete file="ArrayBuffer.o" />
+      <delete file="AparapiBuffer.obj" />
+      <delete file="AparapiBuffer.o" />
+      <delete file="JNIHelper.obj" />
+      <delete file="JNIHelper.o" />
+      <delete file="CLHelper.obj" />
+      <delete file="CLHelper.o" />
+      <delete file="JNIContext.obj" />
+      <delete file="JNIContext.o" />
+      <delete file="KernelArg.obj" />
+      <delete file="KernelArg.o" />
+      <delete file="Range.obj" />
+      <delete file="Range.o" />
+      <delete file="OpenCLArgDescriptor.obj" />
+      <delete file="OpenCLArgDescriptor.o" />
+      <delete file="agent.obj" />
+      <delete file="agent.o" />
+      <delete file="classtools.obj" />
+      <delete file="classtools.o" />
+      <delete file="OpenCLMem.obj" />
+      <delete file="OpenCLMem.o" />
+   </target>
+
+   <target name="javah">
+      <mkdir dir="include" />
+      <javah classpath="..\com.amd.aparapi\classes" destdir="include" force="true">
+         <class name="com.amd.aparapi.internal.jni.ConfigJNI" />
+         <class name="com.amd.aparapi.internal.jni.KernelArgJNI" />
+         <class name="com.amd.aparapi.internal.jni.KernelRunnerJNI" />
+         <class name="com.amd.aparapi.internal.jni.OpenCLJNI" />
+         <class name="com.amd.aparapi.internal.jni.RangeJNI" />
+         <!-- Non-Native Classes -->
+         <class name="com.amd.aparapi.Kernel"/>
+         <class name="com.amd.aparapi.Range"/>
+         <class name="com.amd.aparapi.Config" />
+         <class name="com.amd.aparapi.device.Device" />
+         <class name="com.amd.aparapi.device.OpenCLDevice" />
+         <class name="com.amd.aparapi.internal.kernel.KernelRunner"/>
+         <class name="com.amd.aparapi.internal.opencl.OpenCLArgDescriptor" />
+         <class name="com.amd.aparapi.internal.opencl.OpenCLMem" />
+      </javah>
+   </target>
+
+
+   <target name="gcc" if="use.gcc">
+      <mkdir dir="${basedir}/dist"/>
+      <echo message="linuxcc ${os.arch}" />
+      <exec executable="g++">
+        <!-- !!! oren change -> add debug info, no optimizations 
+         <arg value="-O3" />
+         <arg value="-O0" />
+        -->
+      	<!-- !!! oren change -> add support for ISO C++ 2011 (C++0x) requires GCC 4.3 and later -->      	
+      	<arg value="-std=c++0x" />
+         <arg value="-O3" />
+         <arg value="-g" />
+         <arg value="-fPIC" />
+         <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+         <arg value="-DALTERA_OPENCL"/>
+         <arg value="-DTEST_ALIGNED_MEM"/>
+         <arg value="-I${java.home}/../include" />
+         <arg value="-I${java.home}/../include/linux" />
+         <arg value="-Iinclude" />
+         <arg value="-I${amd.app.sdk.dir}/host/include" />
+         <arg value="-Isrc/cpp" />
+         <arg value="-Isrc/cpp/runKernel" />
+         <arg value="-Isrc/cpp/invoke" />
+         <arg value="-shared" />
+         <arg value="-o"/> 
+         <arg value="${basedir}/dist/libaparapi_${x86_or_x86_64}.so" />
+         <arg value="src/cpp/runKernel/Aparapi.cpp" />
+         <arg value="src/cpp/runKernel/ArrayBuffer.cpp" />
+         <arg value="src/cpp/runKernel/AparapiBuffer.cpp" />
+         <arg value="src/cpp/runKernel/Config.cpp" />
+         <arg value="src/cpp/runKernel/JNIContext.cpp" />
+         <arg value="src/cpp/runKernel/KernelArg.cpp" />
+         <arg value="src/cpp/runKernel/ProfileInfo.cpp" />
+         <arg value="src/cpp/runKernel/Range.cpp" />
+      	<!-- !!! oren change -> platform config settings -->
+         <arg value="src/cpp/runKernel/ConfigSettings.cpp" />
+         <arg value="src/cpp/invoke/OpenCLJNI.cpp" />
+         <arg value="src/cpp/invoke/OpenCLArgDescriptor.cpp" />
+         <arg value="src/cpp/invoke/OpenCLMem.cpp" />
+         <arg value="src/cpp/CLHelper.cpp" />
+         <arg value="src/cpp/classtools.cpp" />
+         <arg value="src/cpp/JNIHelper.cpp" />
+         <arg value="src/cpp/agent.cpp" />
+      	 <!-- !!! wagnerse -> Use compile and link configuration from aocl -->
+      	 <arg line="${altera.opencl.sdk.compileconfig}"/>
+         <arg value="-lOpenCL"/>
+      	 <arg line="${altera.opencl.sdk.linkconfig}"/> 
+      	 <arg line="-Wl,--export-dynamic"/>
+      </exec>
+   </target>
+
+   <target name="gcc_mac" if="use.gcc_mac">
+      <mkdir dir="${basedir}/dist"/>
+      <echo message="gcc ${os.arch}" />
+      <exec executable="g++">
+         <arg value="-O3" />
+         <arg value="-g" />
+         <arg value="-fPIC" />
+         <!-- <arg value="-fopenmp"/> -->
+         <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+         <arg value="-I/System/Library/Frameworks/JavaVM.framework/Headers" />
+         <arg value="-Iinclude" />
+         <arg value="-Isrc/cpp" />
+         <arg value="-Isrc/cpp/runKernel" />
+         <arg value="-Isrc/cpp/invoke" />
+         <arg value="-shared" />
+         <arg value="-o" />
+         <arg value="${basedir}/dist/libaparapi_${x86_or_x86_64}.dylib" />
+         <arg value="src/cpp/runKernel/Aparapi.cpp" />
+         <arg value="src/cpp/runKernel/ArrayBuffer.cpp" />
+         <arg value="src/cpp/runKernel/AparapiBuffer.cpp" />
+         <arg value="src/cpp/runKernel/Config.cpp" />
+         <arg value="src/cpp/runKernel/JNIContext.cpp" />
+         <arg value="src/cpp/runKernel/KernelArg.cpp" />
+         <arg value="src/cpp/runKernel/ProfileInfo.cpp" />
+         <arg value="src/cpp/runKernel/Range.cpp" />
+         <arg value="src/cpp/invoke/OpenCLJNI.cpp" />
+         <arg value="src/cpp/invoke/OpenCLArgDescriptor.cpp" />
+         <arg value="src/cpp/invoke/OpenCLMem.cpp" />
+         <arg value="src/cpp/CLHelper.cpp" />
+         <arg value="src/cpp/classtools.cpp" />
+         <arg value="src/cpp/JNIHelper.cpp" />
+         <arg value="src/cpp/agent.cpp" />
+         <arg value="-framework" />
+         <arg value="OpenCL" />
+         <arg value="-Wno-write-strings" />
+      </exec>
+   </target>
+
+   <target name="msvc" if="use.msvc">
+      <mkdir dir="${basedir}\dist"/>
+      <echo message="msvc ${os.arch}" />
+      <exec executable="${msvc.dir}\vc\bin\${optional.amd64.subdir}cl.exe">
+         <env key="PATH" path="${env.PATH};${msvc.dir}\\Common7\\IDE" />
+         <arg value="/nologo" />
+         <arg value="/TP" />
+         <arg value="/Ox" />
+         <!-- <arg value="/openmp" /> -->
+         <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+         <arg value="/EHsc" />
+         <arg value="/I${msvc.dir}\vc\include" />
+         <arg value="/I${msvc.sdk.dir}\include" />
+         <arg value="/I${java.home}\..\include" />
+         <arg value="/I${java.home}\..\include\win32" />
+         <arg value="/Iinclude" />
+         <arg value="/I${amd.app.sdk.dir}\include" />
+         <arg value="/Isrc/cpp" />
+         <arg value="/Isrc/cpp/runKernel" />
+         <arg value="/Isrc/cpp/invoke" />
+         <arg value="src/cpp/runKernel/Aparapi.cpp" />
+         <arg value="src/cpp/runKernel/ArrayBuffer.cpp" />
+         <arg value="src/cpp/runKernel/AparapiBuffer.cpp" />
+         <arg value="src/cpp/runKernel/Config.cpp" />
+         <arg value="src/cpp/runKernel/JNIContext.cpp" />
+         <arg value="src/cpp/runKernel/KernelArg.cpp" />
+         <arg value="src/cpp/runKernel/ProfileInfo.cpp" />
+         <arg value="src/cpp/runKernel/Range.cpp" />
+         <arg value="src/cpp/invoke/OpenCLJNI.cpp" />
+         <arg value="src/cpp/invoke/OpenCLArgDescriptor.cpp" />
+         <arg value="src/cpp/invoke/OpenCLMem.cpp" />
+         <arg value="src/cpp/CLHelper.cpp" />
+         <arg value="src/cpp/classtools.cpp" />
+         <arg value="src/cpp/JNIHelper.cpp" />
+         <arg value="src/cpp/agent.cpp" />
+         <arg value="/LD" />
+         <arg value="/link" />
+         <arg value="/libpath:${msvc.dir}\vc\lib\${optional.amd64.subdir}" />
+         <arg value="/libpath:${msvc.sdk.dir}\lib\${optional.x64.subdir}" />
+         <arg value="/libpath:${amd.app.sdk.dir}\lib\${x86_or_x86_64}" />
+         <arg value="OpenCL.lib" />
+         <arg value="/out:${basedir}\dist\aparapi_${x86_or_x86_64}.dll" />
+      </exec>
+   </target>
+
+   <target name="mingw" if="use.mingw">
+      <mkdir dir="${basedir}\dist"/>
+      <echo message="mingw ${os.arch}" /> 
+      <exec executable="${mingw.dir}/bin/g++">
+         <env key="PATH" path="${env.PATH};${mingw.dir}/bin" />
+         <arg value="-Wall" />
+         <arg value="-O3" />
+         <arg value="-Wl,--kill-at" />
+         <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+         <arg value="-I${java.home}\..\include" />
+         <arg value="-I${java.home}\..\include\win32" />
+         <arg value="-Iinclude" />
+         <arg value="-I${amd.app.sdk.dir}\include" />
+         <arg value="-Isrc/cpp" />
+         <arg value="-Isrc/cpp/runKernel" />
+         <arg value="-Isrc/cpp/invoke" />
+         <arg value="-shared" />
+         <arg value="-o" />
+         <arg value="${basedir}\dist\aparapi_${x86_or_x86_64}.dll" />
+         <arg value="src/cpp/runKernel/Aparapi.cpp" />
+         <arg value="src/cpp/runKernel/ArrayBuffer.cpp" />
+         <arg value="src/cpp/runKernel/AparapiBuffer.cpp" />
+         <arg value="src/cpp/runKernel/Config.cpp" />
+         <arg value="src/cpp/runKernel/JNIContext.cpp" />
+         <arg value="src/cpp/runKernel/KernelArg.cpp" />
+         <arg value="src/cpp/runKernel/ProfileInfo.cpp" />
+         <arg value="src/cpp/runKernel/Range.cpp" />
+         <arg value="src/cpp/invoke/OpenCLJNI.cpp" />
+         <arg value="src/cpp/invoke/OpenCLArgDescriptor.cpp" />
+         <arg value="src/cpp/invoke/OpenCLMem.cpp" />
+         <arg value="src/cpp/CLHelper.cpp" />
+         <arg value="src/cpp/classtools.cpp" />
+         <arg value="src/cpp/JNIHelper.cpp" />
+         <arg value="src/cpp/agent.cpp" />
+         <arg value="-L${amd.app.sdk.dir}\lib\${x86_or_x86_64}" />
+         <arg value="-lOpenCL" />
+      </exec>
+   </target>
+
+   <target name="build" depends="clean, javah, msvc, mingw, gcc, gcc_mac" />
+
+   <target name="msvc_cltest" if="use.msvc">
+      <mkdir dir="${basedir}\dist"/>
+      <echo message="msvc_cltest ${os.arch}" />
+      <exec executable="${msvc.dir}\vc\bin\${optional.amd64.subdir}cl.exe">
+         <env key="PATH" path="${env.PATH};${msvc.dir}\\Common7\\IDE" />
+         <arg value="/nologo" />
+         <arg value="/TP" />
+         <arg value="/Ox" />
+         <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+         <arg value="/I${msvc.dir}\vc\include" />
+         <arg value="/I${msvc.sdk.dir}\include" />
+         <arg value="/I${amd.app.sdk.dir}\include" />
+         <arg value="/Isrc/cpp" />
+         <arg value="/Isrc/cpp/runKernel" />
+         <arg value="/Isrc/cpp/invoke" />
+         <arg value="src\cpp\CLTest.cpp" />
+         <arg value="/link" />
+         <arg value="/libpath:${msvc.dir}\vc\lib\${optional.amd64.subdir}" />
+         <arg value="/libpath:${msvc.sdk.dir}\lib\${optional.x64.subdir}" />
+         <arg value="/libpath:${amd.app.sdk.dir}\lib\${x86_or_x86_64}" />
+         <arg value="OpenCL.lib" />
+         <arg value="/out:${basedir}/dist/cltest_${x86_or_x86_64}.exe" />
+      </exec>
+   </target>
+
+   <target name="mac_cltest" if="use.gcc_mac">
+      <mkdir dir="${basedir}/dist"/>
+      <echo message="gcc cltest ${os.arch}" />
+      <exec executable="g++">
+         <arg value="-O3" />
+         <arg value="-g" />
+         <arg value="-fPIC" />
+         <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+         <arg value="-I/System/Library/Frameworks/JavaVM.framework/Headers" />
+         <arg value="-Iinclude" />
+         <arg value="-Isrc/cpp" />
+         <arg value="-Isrc/cpp/runKernel" />
+         <arg value="-Isrc/cpp/invoke" />
+         <arg value="-o" />
+         <arg value="${basedir}/dist/cltest" />
+         <arg value="src/cpp/CLTest.cpp" />
+         <arg value="-framework" />
+         <arg value="OpenCL" />
+      </exec>
+   </target>
+
+   <target name="gcc_cltest" if="use.gcc">
+      <mkdir dir="${basedir}/dist"/>
+      <echo message="gcc cltest ${os.arch}" />
+      <exec executable="g++">
+         <arg value="-O3" />
+         <arg value="-g" />
+         <arg value="-fPIC" />
+         <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+         <arg value="-I${java.home}/../include" />
+         <arg value="-I${java.home}/../include/linux" />
+         <arg value="-I${amd.app.sdk.dir}/include" />
+         <arg value="src/cpp/cltest.cpp" />
+         <arg value="-L${amd.app.sdk.dir}/lib/${x86_or_x86_64}" />
+         <arg value="-lOpenCL" />
+         <arg value="-o" />
+         <arg value="${basedir}/cltest_${x86_or_x86_64}" />
+      </exec>
+  </target>
+
+   <target name="gcc_clt" if="use.gcc">
+      <mkdir dir="${basedir}/dist"/>
+      <echo message="gcc cltest ${os.arch}" />
+      <exec executable="g++">
+         <arg value="-O3" />
+         <arg value="-g" />
+         <arg value="-fPIC" />
+         <arg value="src/cpp/classtools.cpp" />
+         <arg value="src/cpp/classtoolstest.cpp" />
+         <arg value="-o" />
+         <arg value="${basedir}/clt" />
+      </exec>
+  </target>
+
+
+   <target name="mac_clt" if="use.gcc_mac">
+      <mkdir dir="${basedir}/dist"/>
+      <echo message="gcc clt ${os.arch}" />
+      <exec executable="g++">
+         <arg value="-O3" />
+         <arg value="-g" />
+         <arg value="-fPIC" />
+         <arg value="src/cpp/classtools.cpp" />
+         <arg value="src/cpp/classtoolstest.cpp" />
+         <arg value="-o" />
+         <arg value="${basedir}/clt" />
+      </exec>
+   </target>
+
+   <target name="cltest" depends="check,msvc_cltest,mac_cltest,gcc_cltest" />
+   <target name="clt" depends="check,gcc_clt,mac_clt" />
+</project>
diff --git a/src/aparapi/com.amd.aparapi.jni/dist/libaparapi_x86_64.so b/src/aparapi/com.amd.aparapi.jni/dist/libaparapi_x86_64.so
index 95d77cecc323704ccb9f71fdb6fdbb71b16fdbfe..6eeef4011b37bbb315295a495af7bf863c9267e8 100755
Binary files a/src/aparapi/com.amd.aparapi.jni/dist/libaparapi_x86_64.so and b/src/aparapi/com.amd.aparapi.jni/dist/libaparapi_x86_64.so differ
diff --git a/src/aparapi/com.amd.aparapi.jni/src/cpp/runKernel/ArrayBuffer.cpp b/src/aparapi/com.amd.aparapi.jni/src/cpp/runKernel/ArrayBuffer.cpp
index ce1ad9c8bd91b3b6dd94566cc396a99b498b9685..f8fac0b1268ef711f78c9a14b2c0b3afe206db35 100644
--- a/src/aparapi/com.amd.aparapi.jni/src/cpp/runKernel/ArrayBuffer.cpp
+++ b/src/aparapi/com.amd.aparapi.jni/src/cpp/runKernel/ArrayBuffer.cpp
@@ -49,6 +49,23 @@ ArrayBuffer::ArrayBuffer():
    isPinned(false){
    }
 
+#ifndef TEST_ALIGNED_MEM
+
+void ArrayBuffer::unpinAbort(JNIEnv *jenv){
+   jenv->ReleasePrimitiveArrayCritical((jarray)javaArray, addr,JNI_ABORT);
+   isPinned = JNI_FALSE;
+}
+void ArrayBuffer::unpinCommit(JNIEnv *jenv){
+   jenv->ReleasePrimitiveArrayCritical((jarray)javaArray, addr, 0);
+   isPinned = JNI_FALSE;
+}
+void ArrayBuffer::pin(JNIEnv *jenv){
+   void *ptr = addr;
+   addr = jenv->GetPrimitiveArrayCritical((jarray)javaArray,&isCopy);
+   isPinned = JNI_TRUE;
+}
+
+#else // defined TEST_ALIGNED_MEM
 ArrayBuffer::~ArrayBuffer()
 {
    // !!! oren fix mem leak
@@ -119,3 +136,4 @@ void ArrayBuffer::pin(JNIEnv *jenv){
    ////////////////////
    isPinned = JNI_TRUE;
 }
+#endif // TEST_ALIGNED_MEM
diff --git a/src/aparapi/com.amd.aparapi.jni/src/cpp/runKernel/ArrayBuffer.h b/src/aparapi/com.amd.aparapi.jni/src/cpp/runKernel/ArrayBuffer.h
index 87c9da6a9d3abd7bce26d43ae18a299a158d4291..fab4709e44ca3e43fc127fa9f0788b35d616694c 100644
--- a/src/aparapi/com.amd.aparapi.jni/src/cpp/runKernel/ArrayBuffer.h
+++ b/src/aparapi/com.amd.aparapi.jni/src/cpp/runKernel/ArrayBuffer.h
@@ -41,6 +41,31 @@
 #include "Common.h"
 #include "ProfileInfo.h"
 
+/////////////////////////////////
+// if not in memory alignment test mode
+#ifndef TEST_ALIGNED_MEM
+/////////////////////////////////
+class ArrayBuffer{
+   public:
+      jobject javaArray;        // The java array that this arg is mapped to
+      cl_uint length;           // the number of elements for arrays (used only when ARRAYLENGTH bit is set for this arg)
+      jint lengthInBytes;       // bytes in the array or directBuf
+      cl_mem mem;               // the opencl buffer
+      void *addr;               // the last address where we saw this java array object
+      cl_uint memMask;          // the mask used for createBuffer
+      jboolean isCopy;
+      jboolean isPinned;
+      char memSpec[128];        // The string form of the mask we used for create buffer. for debugging
+      ProfileInfo read;
+      ProfileInfo write;
+
+      ArrayBuffer();
+      void unpinAbort(JNIEnv *jenv);
+      void unpinCommit(JNIEnv *jenv);
+      void pin(JNIEnv *jenv);
+};
+
+#else // defined TEST_ALIGNED_MEM
 // !!! oren mem tests
 ////////////////
 // Need to align host data to 32 bytes to be able to use DMA
@@ -107,5 +132,6 @@ class ArrayBuffer{
       void unpinCommit(JNIEnv *jenv);
       void pin(JNIEnv *jenv);
 };
+#endif // eof TEST_ALIGNED_MEM
 
 #endif // ARRAYBUFFER_H
diff --git a/src/aparapi/com.amd.aparapi/dist/aparapi.jar b/src/aparapi/com.amd.aparapi/dist/aparapi.jar
index 44f2c68a53dacfb08499ef538b1d34bd10381558..e0eebe54ea37686caabe576c0732b220f5366792 100644
Binary files a/src/aparapi/com.amd.aparapi/dist/aparapi.jar and b/src/aparapi/com.amd.aparapi/dist/aparapi.jar differ
diff --git a/src/aparapi/com.amd.aparapi/src/java/com/amd/aparapi/Config.java b/src/aparapi/com.amd.aparapi/src/java/com/amd/aparapi/Config.java
index 004ee360bc5b44717009635a969994fdfd054722..ce9737954d1ef2e155cfccaaebecb7c521ebbb5c 100644
--- a/src/aparapi/com.amd.aparapi/src/java/com/amd/aparapi/Config.java
+++ b/src/aparapi/com.amd.aparapi/src/java/com/amd/aparapi/Config.java
@@ -230,4 +230,10 @@ public class Config extends ConfigJNI{
    public static String getLoggerName() {
       return logPropName;
    }
+  
+   // !!! oren change -> expose pkg name beyond inheritance
+   public static String getPkgName() {
+      return propPkgName;
+   }
+
 }
diff --git a/src/aparapi/com.amd.aparapi/src/java/com/amd/aparapi/internal/opencl/OpenCLLoader.java b/src/aparapi/com.amd.aparapi/src/java/com/amd/aparapi/internal/opencl/OpenCLLoader.java
index 3514c9d0211d1c90429a8f5a9d0dedb4151e790c..2829dea93e091e2f5d64b1d216e98eeaf1836d64 100644
--- a/src/aparapi/com.amd.aparapi/src/java/com/amd/aparapi/internal/opencl/OpenCLLoader.java
+++ b/src/aparapi/com.amd.aparapi/src/java/com/amd/aparapi/internal/opencl/OpenCLLoader.java
@@ -34,6 +34,28 @@ public class OpenCLLoader extends OpenCLJNI{
             logger.warning("Expected property os.arch to contain amd64, x86_64, x86 or i386 but instead found " + arch
                   + " as a result we don't know which aparapi to attempt to load.");
          }
+
+/*
+         // !!! oren change - load mem overide lib
+         String memOverideLib = System.getProperty(Config.getPkgName() + ".MemOverideLib");
+         if (memOverideLib != null) {
+            logger.fine("attempting to load mem overide lib " + memOverideLib);
+         
+         try {
+               // !!! note load needs complete path
+               Runtime.getRuntime().load(memOverideLib);
+               // alternatively load by lib name
+               // Runtime.getRuntime().loadLibrary(memOverideLib);
+            } catch (final UnsatisfiedLinkError e) {
+               logger.log(Level.SEVERE, "Check your environment. Failed to load memOverideLib native library " + memOverideLib);
+            }
+         }
+         else
+            logger.warning("Not loading mem overide lib!");
+
+         // !!! eof oren change
+*/
+
          if (aparapiLibraryName != null) {
             logger.fine("attempting to load aparapi shared lib " + aparapiLibraryName);
 
diff --git a/src/aparapi/samples/add/out.txt b/src/aparapi/samples/add/out.txt
index 829545e27f6c9b73f7d30ec4c633386a638c4cc5..3257802912b5376a174a67ccf02055276c43a728 100644
--- a/src/aparapi/samples/add/out.txt
+++ b/src/aparapi/samples/add/out.txt
@@ -1,540 +1,73 @@
-typedef struct This_s{
-   __global float *val$sum;
-   __global float *val$a;
-   __global float *val$b;
-   int passid;
-}This;
-int get_pass_id(This *this){
-   return this->passid;
+Running kernel..**** listPlatformsAndDevices ****
+Platform 0{
+   Name    : "Altera SDK for OpenCL"
+   Vendor  : "Altera Corporation"
+   Version : "OpenCL 1.0 Altera SDK for OpenCL, Version 15.0.1"
+   Platform contains 1 OpenCL devices
+   Device 0{
+       Type                  : ACC
+       GlobalMemSize         : 4294967296
+       LocalMemSize          : 16384
+       MaxComputeUnits       : 1
+       MaxWorkGroupSizes     : 2147483647
+       MaxWorkItemDimensions : 3
+   }
+}
+Platform 1{
+   Name    : "Intel(R) OpenCL"
+   Vendor  : "Intel(R) Corporation"
+   Version : "OpenCL 1.2 LINUX"
+   Platform contains 1 OpenCL devices
+   Device 0{
+       Type                  : CPU
+       GlobalMemSize         : 152265568256
+       LocalMemSize          : 32768
+       MaxComputeUnits       : 16
+       MaxWorkGroupSizes     : 8192
+       MaxWorkItemDimensions : 3
+   }
 }
-__kernel void run(
-   __global float *val$sum, 
-   __global float *val$a, 
-   __global float *val$b, 
-   int passid
-){
-   This thisStruct;
-   This* this=&thisStruct;
-   this->val$sum = val$sum;
-   this->val$a = val$a;
-   this->val$b = val$b;
-   this->passid = passid;
-   {
-      int gid = get_global_id(0);
-      this->val$sum[gid]  = this->val$a[gid] + this->val$b[gid];
-      return;
+****************
+**** getDevice ****
+Platform 0{
+   Name    : "Altera SDK for OpenCL"
+   Vendor  : "Altera Corporation"
+   Version : "OpenCL 1.0 Altera SDK for OpenCL, Version 15.0.1"
+   Platform contains 1 OpenCL devices
+   Device 0{
+       Type                  : ACC
+       GlobalMemSize         : 4294967296
+       LocalMemSize          : 16384
+       MaxComputeUnits       : 1
+       MaxWorkGroupSizes     : 2147483647
+       MaxWorkItemDimensions : 3
    }
 }
-
- 64.97 +  89.93 =   154.90
- 41.77 +  56.03 =    97.80
- 34.07 +  49.83 =    83.90
- 44.30 +  21.32 =    65.62
- 59.17 +   5.65 =    64.82
- 32.17 +  67.32 =    99.49
- 58.36 +  68.34 =   126.70
- 75.95 +  30.56 =   106.51
- 28.32 +  17.75 =    46.06
- 27.42 +  73.92 =   101.33
- 51.17 +  13.96 =    65.13
- 27.53 +  48.39 =    75.92
- 47.31 +  20.74 =    68.04
- 66.91 +  61.70 =   128.61
- 17.09 +  93.37 =   110.46
-  0.47 +   9.05 =     9.53
- 11.09 +  74.63 =    85.72
- 35.14 +  45.29 =    80.42
- 30.52 +  23.81 =    54.33
- 41.62 +  42.34 =    83.96
- 87.56 +  76.73 =   164.29
- 89.89 +  81.00 =   170.90
- 48.65 +  96.96 =   145.61
- 71.30 +  71.76 =   143.05
- 42.75 +  32.84 =    75.58
- 49.99 +  85.98 =   135.97
- 41.60 +  38.37 =    79.97
- 81.20 +   5.76 =    86.96
-  9.07 +  51.59 =    60.66
- 44.51 +  68.37 =   112.88
- 72.72 +  48.94 =   121.66
- 66.72 +  89.54 =   156.25
- 92.35 +  10.81 =   103.15
- 50.52 +  98.85 =   149.36
- 87.43 +  39.62 =   127.05
- 83.03 +   9.93 =    92.95
- 38.24 +  69.70 =   107.94
- 71.14 +  78.37 =   149.51
- 93.76 +  95.77 =   189.53
- 39.44 +  71.12 =   110.57
-  3.88 +  25.72 =    29.60
- 31.07 +  82.43 =   113.50
- 42.70 +  32.48 =    75.18
- 71.50 +  83.65 =   155.15
-  5.37 +  39.84 =    45.20
- 91.36 +  86.66 =   178.02
- 41.74 +  27.11 =    68.84
- 55.21 +  34.21 =    89.42
- 36.76 +  79.28 =   116.03
- 10.47 +   4.11 =    14.58
- 59.58 +  40.48 =   100.06
- 52.93 +  29.09 =    82.02
- 81.42 +  51.24 =   132.67
-  3.58 +  89.07 =    92.65
-  5.46 +  63.00 =    68.46
-  5.29 +  28.48 =    33.77
- 61.29 +  26.72 =    88.01
- 77.02 +  87.67 =   164.69
- 91.07 +  47.04 =   138.12
-  8.68 +  14.54 =    23.22
- 94.83 +  78.01 =   172.84
- 39.90 +  40.20 =    80.10
-  8.45 +  11.89 =    20.35
- 42.72 +  60.60 =   103.32
- 59.34 +  78.97 =   138.30
- 19.76 +  65.36 =    85.12
- 81.94 +  32.62 =   114.56
- 37.12 +  94.14 =   131.26
- 78.37 +  41.60 =   119.97
- 34.33 +  81.41 =   115.74
- 77.44 +  49.24 =   126.68
- 92.50 +  71.16 =   163.66
- 79.92 +  88.05 =   167.97
- 96.18 +  44.38 =   140.56
- 77.22 +  57.38 =   134.59
- 94.44 +   4.50 =    98.94
- 96.13 +  81.60 =   177.72
- 52.39 +   8.33 =    60.72
- 53.38 +  66.89 =   120.27
- 85.48 +  13.59 =    99.07
-  0.06 +  65.68 =    65.75
- 86.11 +  37.84 =   123.95
- 98.31 +  39.68 =   137.99
- 84.22 +  88.39 =   172.61
-  0.57 +  84.64 =    85.21
- 31.95 +  27.73 =    59.68
- 95.13 +  43.12 =   138.25
- 66.19 +  84.97 =   151.16
- 40.55 +  85.07 =   125.62
- 82.12 +  10.13 =    92.26
- 36.64 +  80.27 =   116.91
- 45.90 +  95.29 =   141.19
- 69.65 +  21.59 =    91.24
- 85.46 +  53.95 =   139.42
- 25.60 +  83.42 =   109.02
- 24.41 +  58.88 =    83.29
- 86.89 +  15.90 =   102.79
- 66.05 +  86.83 =   152.88
- 14.92 +  82.09 =    97.01
- 92.06 +   8.89 =   100.95
- 74.02 +  42.86 =   116.88
- 13.51 +  94.70 =   108.21
- 70.59 +  81.94 =   152.54
-  0.62 +  70.12 =    70.74
- 65.29 +  42.55 =   107.83
- 22.01 +  78.95 =   100.96
- 65.96 +  15.88 =    81.84
- 44.49 +  51.63 =    96.12
- 24.30 +  81.99 =   106.29
- 79.67 +  76.35 =   156.02
- 40.12 +  53.67 =    93.80
- 15.25 +   1.46 =    16.71
- 23.71 +  15.50 =    39.21
- 35.66 +  71.75 =   107.41
- 79.06 +  81.44 =   160.51
- 19.14 +  16.09 =    35.23
- 48.44 +  17.39 =    65.83
- 96.67 +  58.68 =   155.35
-  2.38 +  87.32 =    89.70
- 71.81 +  22.23 =    94.04
- 68.06 +  85.94 =   154.00
- 29.83 +  27.90 =    57.74
- 64.03 +  14.61 =    78.65
-  9.88 +  73.41 =    83.29
- 49.18 +  42.33 =    91.51
- 74.01 +  89.03 =   163.04
-  0.24 +  68.85 =    69.09
- 83.76 +  29.04 =   112.80
-  3.37 +  73.57 =    76.94
- 86.45 +  55.20 =   141.65
- 82.70 +  89.94 =   172.63
- 21.06 +   8.59 =    29.65
- 91.52 +  93.06 =   184.58
- 76.70 +  46.01 =   122.71
- 60.37 +  25.83 =    86.20
- 75.28 +  38.25 =   113.53
- 30.12 +  17.65 =    47.77
-  4.78 +  88.67 =    93.45
- 98.07 +  69.04 =   167.11
- 98.94 +  32.85 =   131.79
- 70.36 +  85.20 =   155.57
- 45.52 +  22.54 =    68.06
- 44.91 +  42.32 =    87.23
-  5.87 +  80.54 =    86.42
- 45.63 +  61.18 =   106.80
- 46.08 +  37.10 =    83.18
- 91.05 +  44.73 =   135.78
- 11.93 +  22.82 =    34.74
-  8.15 +   8.35 =    16.50
- 28.51 +  98.41 =   126.92
- 95.69 +  94.64 =   190.33
- 68.71 +  47.41 =   116.11
-  0.50 +  18.33 =    18.83
- 14.47 +  44.14 =    58.61
- 94.73 +  30.77 =   125.50
- 29.63 +  36.76 =    66.39
- 32.63 +  28.78 =    61.40
- 73.80 +  52.31 =   126.11
- 21.11 +  57.73 =    78.84
- 12.91 +  39.53 =    52.43
- 60.16 +  75.10 =   135.26
- 24.21 +  13.72 =    37.93
- 96.24 +  47.36 =   143.60
- 50.78 +  57.74 =   108.52
- 84.67 +  50.48 =   135.15
- 33.77 +  63.24 =    97.02
- 75.51 +  32.20 =   107.72
- 39.58 +  67.20 =   106.78
- 21.51 +  73.10 =    94.61
-  3.29 +  50.00 =    53.29
- 56.24 +  52.36 =   108.60
- 29.93 +  13.71 =    43.64
-  6.18 +  84.31 =    90.49
- 30.56 +  51.48 =    82.05
- 81.19 +  42.19 =   123.39
- 21.71 +  52.65 =    74.36
- 34.57 +  26.63 =    61.19
- 83.31 +  61.78 =   145.08
- 95.90 +  68.13 =   164.03
- 53.03 +  24.58 =    77.61
- 58.09 +  75.39 =   133.48
- 32.89 +   8.89 =    41.78
- 42.96 +  53.83 =    96.79
- 97.89 +  84.33 =   182.22
- 79.26 +  22.86 =   102.12
- 25.71 +  81.29 =   107.01
-  1.53 +  54.19 =    55.72
- 11.78 +  26.25 =    38.03
- 18.41 +  38.67 =    57.08
- 94.20 +  68.75 =   162.95
-  5.27 +  64.42 =    69.68
- 89.84 +  73.15 =   162.99
- 47.31 +  55.32 =   102.63
- 34.40 +  47.54 =    81.94
- 96.77 +  75.48 =   172.25
- 26.87 +  21.54 =    48.41
- 10.37 +  52.75 =    63.11
-  2.12 +  65.05 =    67.18
-  1.95 +  12.38 =    14.33
- 93.81 +  60.68 =   154.49
- 79.11 +  40.53 =   119.64
-  4.55 +   4.01 =     8.56
- 32.32 +  16.39 =    48.72
- 70.00 +   8.13 =    78.13
- 10.63 +  61.85 =    72.48
- 89.31 +  31.18 =   120.50
- 48.53 +  57.83 =   106.36
- 95.76 +  29.28 =   125.03
-  5.76 +  67.80 =    73.56
- 57.92 +  60.88 =   118.80
- 43.32 +  90.44 =   133.76
- 34.73 +  33.45 =    68.18
- 87.59 +  36.01 =   123.61
- 55.57 +  88.12 =   143.69
- 27.08 +  83.90 =   110.99
- 60.38 +  64.22 =   124.60
- 46.15 +  32.34 =    78.49
- 14.30 +  71.68 =    85.98
- 24.24 +  95.71 =   119.95
-  6.20 +  26.48 =    32.68
- 19.78 +  39.51 =    59.29
- 51.29 +  72.05 =   123.34
- 13.68 +  68.75 =    82.44
- 43.98 +  17.75 =    61.73
-  9.13 +   1.48 =    10.61
- 49.48 +  74.38 =   123.86
- 71.38 +  65.95 =   137.33
- 79.65 +  56.54 =   136.19
- 44.27 +  57.42 =   101.69
- 72.27 +  51.47 =   123.74
- 98.47 +  78.27 =   176.74
- 81.15 +  25.05 =   106.20
- 50.74 +  64.10 =   114.84
- 89.40 +  46.95 =   136.35
- 42.95 +  67.41 =   110.36
- 77.75 +  69.03 =   146.78
- 85.22 +  30.47 =   115.69
- 15.82 +  83.68 =    99.50
- 48.23 +  29.52 =    77.75
- 95.28 +  22.24 =   117.51
- 36.52 +  13.35 =    49.87
- 90.69 +  27.39 =   118.08
- 86.72 +  91.32 =   178.04
- 16.77 +  48.11 =    64.88
- 12.52 +  48.01 =    60.53
- 48.23 +  60.81 =   109.04
- 61.62 +  74.84 =   136.45
- 82.89 +  16.26 =    99.15
- 58.94 +  12.45 =    71.39
- 57.57 +  48.16 =   105.73
- 85.24 +  92.17 =   177.41
- 71.63 +  56.33 =   127.97
- 80.43 +  49.25 =   129.68
- 33.50 +  95.25 =   128.74
- 66.89 +  56.65 =   123.55
- 21.82 +  56.79 =    78.61
- 59.85 +  93.78 =   153.63
- 44.97 +  35.13 =    80.10
- 68.68 +  21.59 =    90.26
- 89.70 +   1.25 =    90.96
- 96.36 +  82.65 =   179.01
- 73.48 +  94.52 =   168.00
- 12.29 +  83.05 =    95.34
- 53.23 +  59.98 =   113.21
-  8.04 +  41.15 =    49.19
- 98.11 +  20.93 =   119.04
- 45.16 +   7.99 =    53.15
-  3.46 +  78.95 =    82.41
- 69.74 +  73.57 =   143.31
-  9.30 +  75.66 =    84.96
- 98.95 +  73.97 =   172.92
- 87.40 +  34.30 =   121.70
- 81.88 +   5.24 =    87.12
- 78.30 +  22.77 =   101.07
- 98.79 +  31.91 =   130.70
- 91.99 +  44.55 =   136.54
- 90.90 +  50.05 =   140.96
- 34.12 +  68.98 =   103.10
-  6.38 +  28.14 =    34.52
- 83.40 +  58.25 =   141.64
-  7.03 +   2.32 =     9.35
- 25.16 +  34.73 =    59.89
-  5.14 +  47.05 =    52.19
- 41.31 +  59.66 =   100.97
- 90.11 +  76.88 =   166.99
- 67.22 +  61.35 =   128.57
- 60.60 +  60.75 =   121.35
- 52.56 +  59.99 =   112.55
- 99.21 +  46.09 =   145.30
-  5.07 +  84.49 =    89.56
- 14.39 +  96.99 =   111.38
- 53.51 +  66.78 =   120.29
- 26.63 +  47.78 =    74.41
- 39.39 +  28.88 =    68.28
- 94.75 +  61.74 =   156.48
- 35.81 +  49.04 =    84.85
- 62.09 +  62.76 =   124.86
- 96.05 +   4.49 =   100.54
- 52.05 +  77.65 =   129.70
- 54.73 +  40.67 =    95.40
- 57.85 +  85.88 =   143.73
- 39.74 +   9.12 =    48.85
- 52.34 +  24.88 =    77.22
-  4.78 +  49.82 =    54.60
- 90.23 +  39.36 =   129.59
- 58.87 +  67.59 =   126.46
- 87.21 +  95.43 =   182.64
- 51.93 +  66.64 =   118.57
- 38.58 +   2.31 =    40.89
- 73.69 +  62.59 =   136.29
- 83.10 +  97.51 =   180.61
- 36.81 +  87.19 =   124.00
- 27.08 +  55.18 =    82.26
- 44.58 +  37.15 =    81.73
- 18.39 +  71.07 =    89.47
- 88.59 +  95.84 =   184.43
-  0.32 +  63.05 =    63.37
- 82.44 +  73.96 =   156.41
- 81.32 +   1.00 =    82.31
- 13.70 +  73.97 =    87.67
- 28.13 +  46.50 =    74.63
- 88.28 +  81.57 =   169.84
- 27.01 +  39.18 =    66.19
- 49.09 +  27.44 =    76.53
- 60.65 +  13.99 =    74.64
- 73.66 +  42.47 =   116.12
- 16.86 +  71.85 =    88.71
- 94.34 +  50.36 =   144.70
- 79.03 +  54.46 =   133.50
- 39.30 +   3.27 =    42.57
- 48.35 +  93.49 =   141.84
- 62.07 +  67.85 =   129.92
- 12.72 +  14.14 =    26.86
- 13.53 +  11.93 =    25.46
-  8.68 +  73.62 =    82.31
- 11.21 +  25.32 =    36.53
- 18.90 +   6.17 =    25.07
- 77.66 +  32.17 =   109.84
- 10.19 +  27.85 =    38.05
- 52.48 +  16.80 =    69.28
- 44.79 +  27.11 =    71.90
- 30.19 +  90.18 =   120.37
- 91.01 +  29.46 =   120.46
- 40.58 +  69.97 =   110.56
- 18.62 +  78.97 =    97.59
- 66.86 +  33.58 =   100.44
- 88.94 +  22.86 =   111.80
- 92.56 +  30.45 =   123.00
- 39.83 +  20.72 =    60.55
- 78.39 +   7.91 =    86.30
- 21.98 +  25.33 =    47.30
- 96.70 +  12.86 =   109.56
- 64.29 +  97.98 =   162.27
- 93.00 +  80.53 =   173.53
- 33.41 +  28.21 =    61.61
-  1.61 +  11.38 =    12.99
-  5.25 +  24.89 =    30.14
- 15.54 +  67.06 =    82.60
- 84.97 +  34.03 =   119.00
- 99.66 +  87.22 =   186.88
- 95.68 +  16.78 =   112.46
- 40.26 +  40.60 =    80.86
-  6.10 +  90.80 =    96.90
- 44.57 +  75.63 =   120.20
- 82.69 +  97.68 =   180.37
- 39.12 +  28.52 =    67.64
- 32.47 +   9.84 =    42.32
- 67.21 +  80.18 =   147.39
- 49.82 +  31.31 =    81.13
- 52.66 +  27.18 =    79.84
- 92.16 +  78.48 =   170.64
- 79.47 +  46.58 =   126.06
- 87.83 +  49.53 =   137.36
- 35.32 +  89.44 =   124.76
- 22.48 +   3.90 =    26.38
- 80.32 +  33.95 =   114.27
- 59.66 +  76.98 =   136.64
- 32.18 +  65.19 =    97.37
- 25.82 +  49.52 =    75.34
-  3.69 +  25.87 =    29.55
- 30.39 +  75.76 =   106.15
- 89.11 +  99.88 =   188.99
- 97.56 +  50.24 =   147.81
- 72.60 +  48.91 =   121.51
- 57.77 +  59.01 =   116.78
- 23.21 +  21.21 =    44.42
- 84.45 +  17.80 =   102.25
- 48.98 +  91.23 =   140.21
- 64.10 +  47.20 =   111.30
-  5.57 +  68.97 =    74.54
- 56.42 +  72.65 =   129.07
- 93.57 +  38.70 =   132.27
- 35.16 +  65.92 =   101.08
- 33.28 +  48.15 =    81.43
-  0.24 +  63.68 =    63.92
- 75.48 +  71.29 =   146.77
- 16.81 +   9.07 =    25.89
- 92.58 +  10.48 =   103.07
- 68.09 +  62.07 =   130.16
- 95.73 +  87.21 =   182.93
-  5.15 +  16.24 =    21.39
- 40.21 +  94.29 =   134.50
- 39.35 +  40.60 =    79.95
- 14.35 +  47.32 =    61.67
- 50.66 +  38.06 =    88.73
- 54.83 +  77.93 =   132.76
- 78.69 +  74.82 =   153.51
- 95.42 +  57.58 =   153.00
- 22.35 +  88.47 =   110.83
- 35.49 +  26.80 =    62.29
- 98.78 +  27.32 =   126.09
-  9.43 +  31.92 =    41.35
-  2.33 +   7.60 =     9.93
- 49.13 +  39.01 =    88.15
- 60.74 +   1.47 =    62.22
- 57.62 +   3.16 =    60.78
-  6.70 +  84.18 =    90.88
- 54.04 +  19.77 =    73.80
- 70.65 +  75.97 =   146.62
-  7.56 +  74.69 =    82.25
- 53.36 +  11.32 =    64.68
- 51.14 +  39.61 =    90.75
- 55.10 +  56.46 =   111.56
- 54.48 +  30.30 =    84.78
- 22.54 +  74.34 =    96.88
- 40.30 +  56.56 =    96.86
- 24.24 +   5.70 =    29.94
- 47.86 +  44.84 =    92.70
- 80.58 +  94.75 =   175.32
- 83.30 +   7.18 =    90.47
- 55.40 +  38.36 =    93.76
- 47.68 +  63.29 =   110.97
- 62.87 +  78.85 =   141.73
-  0.65 +  96.76 =    97.41
- 55.44 +  92.09 =   147.54
- 99.76 +  40.75 =   140.51
- 36.55 +  45.19 =    81.74
- 54.16 +  43.61 =    97.77
- 85.18 +  10.88 =    96.06
- 44.70 +  61.06 =   105.76
- 88.59 +  29.29 =   117.88
- 92.11 +  57.51 =   149.61
- 53.92 +   2.26 =    56.18
- 99.87 +  76.46 =   176.33
- 10.17 +  89.83 =   100.00
- 59.08 +  57.55 =   116.63
- 17.49 +  54.56 =    72.05
- 78.82 +  35.99 =   114.81
- 72.83 +  64.85 =   137.68
- 97.42 +  59.25 =   156.67
- 37.76 +  25.62 =    63.39
- 37.70 +  95.18 =   132.88
- 17.29 +  51.98 =    69.27
- 92.15 +  86.17 =   178.32
- 87.11 +  39.20 =   126.30
- 63.01 +  24.56 =    87.57
-  0.45 +  11.44 =    11.89
- 36.46 +  86.02 =   122.48
-  5.74 +  50.46 =    56.21
- 40.22 +  59.67 =    99.89
- 71.45 +  15.62 =    87.07
- 19.54 +  56.38 =    75.92
- 45.37 +  66.93 =   112.30
- 67.65 +  60.01 =   127.66
- 72.44 +  94.11 =   166.55
- 63.92 +  10.12 =    74.04
- 57.18 +  36.08 =    93.26
-  5.17 +  69.64 =    74.81
- 84.65 +  48.05 =   132.70
- 64.08 +  35.52 =    99.60
-  7.52 +  36.05 =    43.57
- 72.02 +  96.93 =   168.95
- 65.62 +  32.51 =    98.14
-  3.39 +  31.29 =    34.68
- 29.34 +  30.73 =    60.06
- 33.31 +  56.06 =    89.37
- 48.24 +  30.84 =    79.08
- 51.29 +  21.46 =    72.75
- 42.68 +  75.53 =   118.21
- 39.68 +  37.84 =    77.52
- 97.23 +  69.72 =   166.95
- 67.72 +  80.28 =   148.00
-  2.43 +  85.23 =    87.66
-  9.41 +   2.46 =    11.87
- 43.88 +  48.87 =    92.75
- 66.63 +  22.20 =    88.83
- 56.40 +   0.21 =    56.60
- 67.66 +  11.69 =    79.35
- 44.69 +  84.12 =   128.81
- 15.72 +  36.95 =    52.67
- 22.18 +  12.29 =    34.47
- 82.09 +  43.15 =   125.24
- 34.56 +  87.70 =   122.26
- 74.12 +  74.91 =   149.03
- 15.72 +  36.75 =    52.47
- 59.46 +  54.27 =   113.73
- 70.41 +  34.64 =   105.05
- 95.20 +  12.74 =   107.93
- 90.00 +  41.52 =   131.52
- 92.54 +  88.40 =   180.93
- 85.70 +  89.03 =   174.73
- 46.28 +  54.40 =   100.68
- 66.93 +  70.22 =   137.15
- 71.90 +  40.71 =   112.61
-  1.73 +  89.04 =    90.77
- 22.33 +  47.65 =    69.98
- 70.70 +  20.13 =    90.83
-  1.96 +  26.58 =    28.54
- 66.36 +  14.43 =    80.79
- 55.46 +  21.06 =    76.51
- 95.78 +  61.47 =   157.25
- 85.77 +  19.76 =   105.54
+Chosen Platform/Device: Altera SDK for OpenCL/ACC
+****************
+****************
+Elapsed time in milli: 3024
+Elapsed time in sec  : 3
+****************
+**************** Showing first 20 results ****************
+ 95.18 +  39.00 =   134.18
+ 30.58 +  54.20 =    84.78
+ 32.90 +  81.67 =   114.57
+ 32.05 +  39.04 =    71.10
+ 18.24 +  60.77 =    79.01
+ 38.14 +  95.92 =   134.07
+ 27.46 +  31.08 =    58.54
+ 53.22 +  29.84 =    83.06
+ 36.32 +   0.18 =    36.50
+ 85.25 +  96.90 =   182.15
+ 93.04 +  29.68 =   122.71
+ 47.08 +   2.61 =    49.69
+ 38.71 +  39.50 =    78.20
+ 68.20 +  14.97 =    83.16
+ 49.28 +  88.51 =   137.80
+ 73.48 +  29.64 =   103.12
+ 91.85 +  92.86 =   184.70
+ 74.12 +  95.34 =   169.46
+ 71.66 +  21.96 =    93.62
+ 20.19 +  18.91 =    39.10
+ allocate_common 1000000 500002 0x581b97430  allocate_common 1000000 500002 0x581f67d70  allocate_common 1000000 500002 0x582f852f0 findPlatformConfigFromFullName: Altera SDK for OpenCL
diff --git a/src/aparapi/samples/add/selectPlatform.sh b/src/aparapi/samples/add/selectPlatform.sh
index 386ea6e808ac110d0d514f39957587451f59291d..722869dc31d0c386a2c24b3c17b590212c335a8e 100644
--- a/src/aparapi/samples/add/selectPlatform.sh
+++ b/src/aparapi/samples/add/selectPlatform.sh
@@ -17,10 +17,10 @@
 # sh selectPlatform.sh AMD CPU 0 source std
 # sh selectPlatform.sh Altera ACC 0 binary fpga
 
-java \
- -Djava.library.path=../../com.amd.aparapi.jni/dist.$5 \
- -classpath ../../com.amd.aparapi/dist/aparapi.jar:add.jar \
- com.amd.aparapi.sample.add.MainSelectPlatform $1 $2 $3 $4
+#java \
+# -Djava.library.path=../../com.amd.aparapi.jni/dist.$5 \
+# -classpath ../../com.amd.aparapi/dist/aparapi.jar:add.jar \
+# com.amd.aparapi.sample.add.MainSelectPlatform $1 $2 $3 $4
 
 #
 # other script variants uncomment to use ->
@@ -39,4 +39,13 @@ java \
 # -classpath ../../com.amd.aparapi/dist/aparapi.jar:add.jar \
 # com.amd.aparapi.sample.add.MainSelectPlatform $1 $2 $3
 
+# to inc logging level
+#-Dcom.amd.aparapi.logLevel=FINE \
+#-Dcom.amd.aparapi.MemOverideLib=[abs path to MemOverideLib.so] \
+
+java \
+ -Djava.library.path=../../com.amd.aparapi.jni/dist.$5 \
+ -classpath ../../com.amd.aparapi/dist/aparapi.jar:add.jar \
+ com.amd.aparapi.sample.add.MainSelectPlatform $1 $2 $3 $4
+