Skip to content

Jdk10/issue12 #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Aparapi Changelog

## v1.10.1
* Fixed the header genaration for JDK8 and above.

## 1.10.0

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Toon Baeyens <[email protected]>
* Luis Mendes <[email protected]>
* Saurabh Rawat <[email protected]>
* Sven Guenther <[email protected]>

# Details

Expand Down Expand Up @@ -58,4 +59,4 @@ Below are some of the specific details of various contributions.
* Luis Mendes submited PR to Fix Java execution mode to fail-fast when Kernel execution fails
* Luis Mendes submited PR to Java execution mode now provides detailed backtraces of failed Kernel threads including passId, groupIds, globalIds and localIds
* Saurabh Rawat contributed apache BCEL bytecode parsing and Scala support.
* Luis Mendes submited PR #139 to Fix arrays of AtomicInteger stored on local variables no longer fail with type cast exception - Partial fix for #138
* Luis Mendes submited PR #139 to Fix arrays of AtomicInteger stored on local variables no longer fail with type cast exception - Partial fix for #138
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>-h</arg>
<arg>../include/</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/aparapi/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ to national security controls as identified on the Commerce Control List (curren

import java.util.logging.*;

import java.lang.annotation.Native;

/**
* A central location for holding all runtime configurable properties as well as logging configuration.
*
Expand Down Expand Up @@ -151,6 +153,7 @@ public class Config extends ConfigJNI{
public static final boolean enablePUTSTATIC = Boolean.getBoolean(propPkgName + ".enable.PUTSTATIC");

// Allow static array accesses
@Native
public static final boolean enableGETSTATIC = true; //Boolean.getBoolean(propPkgName + ".enable.GETSTATIC");

public static final boolean enableINVOKEINTERFACE = Boolean.getBoolean(propPkgName + ".enable.INVOKEINTERFACE");
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/aparapi/Kernel.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ to national security controls as identified on the Commerce Control List (curren

import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Native;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
Expand Down Expand Up @@ -1946,6 +1947,7 @@ protected double tan(double _d) {
}

private static final double LOG_2_RECIPROCAL = 1.0D / Math.log(2.0D);
@Native
private static final double PI_RECIPROCAL = 1.0D / Math.PI;

@OpenCLMapping(mapTo = "acospi")
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/aparapi/Range.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.aparapi.internal.jni.*;

import java.util.*;
import java.lang.annotation.Native;

/**
*
Expand Down Expand Up @@ -64,8 +65,10 @@
*/
public class Range extends RangeJNI{

@Native
public static final int THREADS_PER_CORE = 16;

@Native
public static final int MAX_OPENCL_GROUP_SIZE = 256;

public static final int MAX_GROUP_SIZE = Math.max(Runtime.getRuntime().availableProcessors() * THREADS_PER_CORE,
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/com/aparapi/internal/opencl/OpenCLArgDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,53 @@
*/
package com.aparapi.internal.opencl;

import java.lang.annotation.Native;

public class OpenCLArgDescriptor{

@Native
public final static int ARG_BYTE_BIT = 1 << 0x000;

@Native
public final static int ARG_SHORT_BIT = 1 << 0x001;

@Native
public final static int ARG_INT_BIT = 1 << 0x002;

@Native
public final static int ARG_FLOAT_BIT = 1 << 0x003;

@Native
public final static int ARG_LONG_BIT = 1 << 0x004;

@Native
public final static int ARG_DOUBLE_BIT = 1 << 0x005;

@Native
public final static int ARG_ARRAY_BIT = 1 << 0x006;

@Native
public final static int ARG_PRIMITIVE_BIT = 1 << 0x007;

@Native
public final static int ARG_GLOBAL_BIT = 1 << 0x008;

@Native
public final static int ARG_LOCAL_BIT = 1 << 0x009;

@Native
public final static int ARG_CONST_BIT = 1 << 0x00A;

@Native
public final static int ARG_READONLY_BIT = 1 << 0x00B;

@Native
public final static int ARG_WRITEONLY_BIT = 1 << 0x00C;

@Native
public final static int ARG_READWRITE_BIT = 1 << 0x00D;

@Native
public final static int ARG_ISARG_BIT = 1 << 0x00E;

public OpenCLMem memVal;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/aparapi/internal/opencl/OpenCLMem.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
*/
package com.aparapi.internal.opencl;

import java.lang.annotation.Native;


public class OpenCLMem{

@Native
public final static int MEM_DIRTY_BIT = 1 << 0x00F;

@Native
public final static int MEM_COPY_BIT = 1 << 0x010;

@Native
public final static int MEM_ENQUEUED_BIT = 1 << 0x011;

public long bits; // dirty, copy, enqueued
Expand Down