* PChar -> PAnsichar

This commit is contained in:
Michaël Van Canneyt 2023-01-13 22:23:58 +01:00
parent 145388cbc0
commit 574ddada39
3 changed files with 8 additions and 8 deletions

View File

@ -57,7 +57,7 @@ const
// Simple compute kernel which computes the square of an input array
const
KernelSource : PChar =
KernelSource : PAnsiChar =
'__kernel void square( '#10+
' __global float* input, '#10+
' __global float* output, '#10+
@ -147,7 +147,7 @@ begin
end;
// Create the compute program from the source buffer
prog:= clCreateProgramWithSource(context, 1, PPChar(@KernelSource), nil, err);
prog:= clCreateProgramWithSource(context, 1, PPAnsiChar(@KernelSource), nil, err);
writeln('clCreateProgramWithSource ', err);
if prog=nil then begin
writeln('Error: Failed to create compute program! ');

View File

@ -3,7 +3,7 @@ uses
ctypes, cl;
const
device_str_info : array[1..5] of record id : dword; name : pchar end =
device_str_info : array[1..5] of record id : dword; name : PAnsiChar end =
((id: CL_DEVICE_NAME; name : 'CL_DEVICE_NAME'),
(id: CL_DEVICE_VENDOR; name : 'CL_DEVICE_VENDOR'),
(id: CL_DEVICE_VERSION; name : 'CL_DEVICE_VERSION'),
@ -19,7 +19,7 @@ var
devices : cl_uint;
deviceids : pcl_device_id;
i,j,k : Integer;
buf : array[0..99999] of char;
buf : array[0..99999] of AnsiChar;
bufwritten : csize_t;

View File

@ -644,7 +644,7 @@ function clGetDeviceInfo(
// Context APIs
type
TContextNotify = procedure (name: Pchar; data: Pointer; size: csize_t; data2: Pointer); extdecl;
TContextNotify = procedure (name: PAnsiChar; data: Pointer; size: csize_t; data2: Pointer); extdecl;
function clCreateContext(
@ -812,7 +812,7 @@ function clGetSamplerInfo(
function clCreateProgramWithSource(
context : cl_context;
count : cl_uint;
strings : PPChar;
strings : PPAnsiChar;
lengths : Pcsize_t;
var errcode_ret : cl_int
): cl_program; extdecl;
@ -847,7 +847,7 @@ function clBuildProgram(
_program : cl_program;
num_devices : cl_uint;
device_list : Pcl_device_id;
options : PChar;
options : PAnsiChar;
notify : TProgramNotify;
user_data : Pointer
): cl_int; extdecl;
@ -878,7 +878,7 @@ function clGetProgramBuildInfo(
// Kernel Object APIs
function clCreateKernel(
_program : cl_program;
kernel_name : PChar;
kernel_name : PAnsiChar;
var errcode_ret : cl_int
): cl_kernel; extdecl;
external {$ifdef DYNLINK}opencllib{$endif} name 'clCreateKernel';