@@ -446,7 +446,7 @@ pi_result piextGetDeviceFunctionPointer(
446
446
//
447
447
// Context
448
448
//
449
- pi_context piContextCreate ( // TODO: change interface to return error code instead
449
+ pi_result piContextCreate (
450
450
const cl_context_properties * properties, // TODO: untie from OpenCL
451
451
pi_uint32 num_devices,
452
452
const pi_device * devices,
@@ -456,7 +456,7 @@ pi_context piContextCreate( // TODO: change interface to return error code inste
456
456
size_t cb,
457
457
void * user_data),
458
458
void * user_data,
459
- pi_result * result );
459
+ pi_context * retcontext );
460
460
461
461
pi_result piContextGetInfo (
462
462
pi_context context,
@@ -494,20 +494,20 @@ pi_result piQueueFinish(pi_queue command_queue);
494
494
//
495
495
// Memory
496
496
//
497
- pi_mem piMemBufferCreate ( // TODO: change interface to return error code
497
+ pi_result piMemBufferCreate (
498
498
pi_context context,
499
499
pi_mem_flags flags,
500
500
size_t size,
501
501
void * host_ptr,
502
- pi_result * errcode_ret );
502
+ pi_mem * ret_mem );
503
503
504
- pi_mem piMemImageCreate ( // TODO: change interface to return error code
504
+ pi_result piMemImageCreate (
505
505
pi_context context,
506
506
pi_mem_flags flags,
507
507
const pi_image_format * image_format,
508
508
const pi_image_desc * image_desc,
509
509
void * host_ptr,
510
- pi_result * errcode_ret );
510
+ pi_mem * ret_mem );
511
511
512
512
pi_result piMemGetInfo (
513
513
pi_mem mem,
@@ -529,10 +529,12 @@ pi_result piMemRetain(
529
529
pi_result piMemRelease (
530
530
pi_mem mem);
531
531
532
- pi_mem piMemBufferPartition ( // TODO: change interface to return error code
533
- pi_mem context, pi_mem_flags flags,
534
- pi_buffer_create_type buffer_create_type, void *buffer_create_info,
535
- pi_result *errcode_ret);
532
+ pi_result piMemBufferPartition (
533
+ pi_mem buffer,
534
+ pi_mem_flags flags,
535
+ pi_buffer_create_type buffer_create_type,
536
+ void * buffer_create_info,
537
+ pi_mem * ret_mem);
536
538
//
537
539
// Program
538
540
//
@@ -542,21 +544,21 @@ pi_result piProgramCreate(
542
544
size_t length,
543
545
pi_program * res_program);
544
546
545
- pi_program piclProgramCreateWithBinary ( // TODO: change to return pi_result
547
+ pi_result piclProgramCreateWithSource (
548
+ pi_context context,
549
+ pi_uint32 count,
550
+ const char ** strings,
551
+ const size_t * lengths,
552
+ pi_program * ret_program);
553
+
554
+ pi_result piclProgramCreateWithBinary (
546
555
pi_context context,
547
556
pi_uint32 num_devices,
548
557
const pi_device * device_list,
549
558
const size_t * lengths,
550
559
const unsigned char ** binaries,
551
560
pi_int32 * binary_status,
552
- pi_result * errcode_ret);
553
-
554
- pi_program piclProgramCreateWithSource ( // TODO: change to return pi_result
555
- pi_context context,
556
- pi_uint32 count,
557
- const char ** strings,
558
- const size_t * lengths,
559
- pi_result * errcode);
561
+ pi_program * ret_program);
560
562
561
563
pi_result piProgramGetInfo (
562
564
pi_program program,
@@ -565,7 +567,7 @@ pi_result piProgramGetInfo(
565
567
void * param_value,
566
568
size_t * param_value_size_ret);
567
569
568
- pi_program piProgramLink ( // TODO: change interface to return error code
570
+ pi_result piProgramLink (
569
571
pi_context context,
570
572
pi_uint32 num_devices,
571
573
const pi_device * device_list,
@@ -575,7 +577,7 @@ pi_program piProgramLink( // TODO: change interface to return error code
575
577
void (* pfn_notify)(pi_program program,
576
578
void * user_data),
577
579
void * user_data,
578
- pi_result * errcode_ret );
580
+ pi_program * ret_program );
579
581
580
582
pi_result piProgramCompile (
581
583
pi_program program,
@@ -611,10 +613,10 @@ pi_result piProgramRelease(pi_program program);
611
613
//
612
614
// Kernel
613
615
//
614
- pi_kernel piKernelCreate ( // TODO: change interface to return error code
616
+ pi_result piKernelCreate (
615
617
pi_program program,
616
618
const char * kernel_name,
617
- pi_result * errcode_ret );
619
+ pi_kernel * ret_kernel );
618
620
619
621
pi_result piKernelSetArg (
620
622
pi_kernel kernel,
@@ -654,9 +656,9 @@ pi_result piKernelRelease(pi_kernel kernel);
654
656
//
655
657
// Events
656
658
//
657
- pi_event piEventCreate ( // TODO: change to return pi_result
659
+ pi_result piEventCreate (
658
660
pi_context context,
659
- pi_result * errcode_ret );
661
+ pi_event * ret_event );
660
662
661
663
pi_result piEventGetInfo (
662
664
pi_event event,
@@ -860,7 +862,7 @@ pi_result piEnqueueMemImageWrite(
860
862
const pi_event * event_wait_list,
861
863
pi_event * event);
862
864
863
- pi_result piEnqueueMemImageCopy (
865
+ pi_result piEnqueueMemImageCopy (
864
866
pi_queue command_queue,
865
867
pi_mem src_image,
866
868
pi_mem dst_image,
@@ -881,7 +883,7 @@ pi_result piEnqueueMemImageFill(
881
883
const pi_event * event_wait_list,
882
884
pi_event * event);
883
885
884
- void * piEnqueueMemBufferMap ( // TODO: change to return pi_result
886
+ pi_result piEnqueueMemBufferMap (
885
887
pi_queue command_queue,
886
888
pi_mem buffer,
887
889
pi_bool blocking_map,
@@ -891,7 +893,7 @@ void * piEnqueueMemBufferMap( // TODO: change to return pi_result
891
893
pi_uint32 num_events_in_wait_list,
892
894
const pi_event * event_wait_list,
893
895
pi_event * event,
894
- pi_result * errcode_ret );
896
+ void * * ret_map );
895
897
896
898
pi_result piEnqueueMemUnmap (
897
899
pi_queue command_queue,
0 commit comments