Skip to content
Browse files

Prepare to convert between PHP types and OpenCL C types.

  • Loading branch information...
1 parent c0a68c8 commit eba8b43987f6bb63102a337e8f538ad3da81510b @rsky committed Sep 2, 2012
Showing with 27 additions and 2 deletions.
  1. +19 −0 params.c
  2. +7 −1 params.h
  3. +1 −1 php_opencl.h
View
19 params.c
@@ -58,6 +58,25 @@ cl_device_id *phpcl_get_devicecs(zval *zv, int argno, cl_uint *num_devices_ret T
}
/* }}} */
+/* {{{ phpcl_convert_zval_to_c() */
+
+zend_bool phpcl_convert_zval_to_c(zval *zv, phpcl_c_type_t type,
+ void **value_ptr_ret, size_t *size_ret TSRMLS_DC)
+{
+ /* not yet implemented */
+ return 0;
+}
+
+/* }}} */
+/* {{{ phpcl_convert_c_to_zval() */
+
+zval *phpcl_convert_c_to_zval(void *value_ptr, phpcl_c_type_t type TSRMLS_DC)
+{
+ /* not yet implemented */
+ return NULL;
+}
+
+/* }}} */
/*
* Local variables:
View
8 params.h
@@ -14,7 +14,13 @@
zend_bool phpcl_is_callable(zval *zv, int argno TSRMLS_DC);
-cl_device_id *phpcl_get_devicecs(zval *zv, int argno, cl_uint *num_devices_ret TSRMLS_DC);
+cl_device_id *phpcl_get_devicecs(zval *zv, int argno,
+ cl_uint *num_devices_ret TSRMLS_DC);
+
+zend_bool phpcl_convert_zval_to_c(zval *zv, phpcl_c_type_t type,
+ void **value_ptr_ret, size_t *size_ret TSRMLS_DC);
+
+zval *phpcl_convert_c_to_zval(void *value_ptr, phpcl_c_type_t type TSRMLS_DC);
#endif
View
2 php_opencl.h
@@ -101,7 +101,7 @@ typedef enum {
/* pointer */
C_TYPE_MEM_PTR,
C_TYPE_NULL_PTR
-} phpcl_opencl_c_type_t;
+} phpcl_c_type_t;
typedef struct {
cl_context context;

0 comments on commit eba8b43

Please sign in to comment.
Something went wrong with that request. Please try again.