mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-07 11:20:32 +01:00
* PChar -> PAnsichar
This commit is contained in:
parent
145388cbc0
commit
574ddada39
@ -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! ');
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user