Skip to content
Snippets Groups Projects
Commit 9afd2d1a authored by Gary Frost's avatar Gary Frost
Browse files

No commit message

No commit message
parent a272d8e7
No related branches found
No related tags found
No related merge requests found
package com.amd.aparapi.test;
import com.amd.aparapi.Kernel;
public class CharArrayField extends Kernel{
@Override public void run() {
public class CharArrayField {
public void run() {
out[0] = 0;
}
char out[] = new char[1];
}
/**{Throws{ClassParseException}Throws}**/
/**{OpenCL{
typedef struct This_s{
__global unsigned short *out;
int passid;
}This;
int get_pass_id(This *this){
return this->passid;
}
__kernel void run(
__global unsigned short *out,
int passid
){
This thisStruct;
This* this=&thisStruct;
this->out = out;
this->passid = passid;
{
this->out[0] = 0;
return;
}
}
}OpenCL}**/
package com.amd.aparapi.test;
import com.amd.aparapi.Kernel;
public class CharAsParameter extends Kernel{
public class CharAsParameter {
public char doIt(char x) {
return x;
}
@Override public void run() {
public void run() {
byte b = 0x1;
doIt('A');
doIt((char) b);
}
}
/**{Throws{ClassParseException}Throws}**/
/**{OpenCL{
typedef struct This_s{
int passid;
}This;
int get_pass_id(This *this){
return this->passid;
}
unsigned short com_amd_aparapi_test_CharAsParameter__doIt(This *this, unsigned short x){
return(x);
}
__kernel void run(
int passid
){
This thisStruct;
This* this=&thisStruct;
this->passid = passid;
{
char b = 1;
com_amd_aparapi_test_CharAsParameter__doIt(this, 65);
com_amd_aparapi_test_CharAsParameter__doIt(this, (unsigned short )b);
return;
}
}
}OpenCL}**/
......@@ -2,13 +2,36 @@ package com.amd.aparapi.test;
import com.amd.aparapi.Kernel;
public class CharType extends Kernel{
@Override public void run() {
char c = Character.MAX_VALUE;
out[0] = c;
}
public class CharType extends Kernel {
@Override
public void run() {
final char c = Character.MAX_VALUE;
this.out[0] = c;
}
int out[] = new int[1];
int out[] = new int[1];
}
/**{Throws{ClassParseException}Throws}**/
/**{OpenCL{
typedef struct This_s{
__global int *out;
int passid;
}This;
int get_pass_id(This *this){
return this->passid;
}
__kernel void run(
__global int *out,
int passid
){
This thisStruct;
This* this=&thisStruct;
this->out = out;
this->passid = passid;
{
unsigned short c = 65535;
this->out[0] = 65535;
return;
}
}
}OpenCL}**/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment