您好,欢迎访问三七文档
当前位置:首页 > 办公文档 > 其它办公文档 > opencl-quick-reference-card
See©2009KhronosGroup-Rev.1109OpenCLTMAPI1.0QuickReferenceCardTheOpenCLRuntimeCommandQueues[5.1]cl_command_queueclCreateCommandQueue(cl_contextcontext,cl_device_iddevice,cl_command_queue_propertiesproperties,cl_int*errcode_ret)properties:CL_QUEUE_PROFILING_ENABLE,CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLEcl_intclRetainCommandQueue(cl_command_queuecommand_queue)cl_intclReleaseCommandQueue(cl_command_queuecommand_queue)cl_intclGetCommandQueueInfo(cl_command_queuecommand_queue,cl_command_queue_infoparam_name,size_tparam_value_size,void*param_value,size_t*param_value_size_ret)param_name:CL_QUEUE_CONTEXT,CL_QUEUE_DEVICE,CL_QUEUE_REFERENCE_COUNT,CL_QUEUE_PROPERTIEScl_intclSetCommandQueueProperty(cl_command_queuecommand_queue,cl_command_queue_propertiesproperties,cl_boolenable,cl_command_queue_properties*old_properties)properties:CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE,CL_QUEUE_PROFILING_ENABLEOpenCL(OpenComputingLanguage)isamulti-vendoropenstandardforgeneral-purposeparallelprogrammingofheterogeneoussystemsthatincludeCPUs,GPUsandotherprocessors.OpenCLprovidesauniformprogrammingenvironmentforsoftwaredeveloperstowriteefficient,portablecodeforhigh-performancecomputeservers,desktopcomputersystemsandhandhelddevices.[n.n.n]referstothesectionintheAPISpecificationavailableat(suchanint,float),vectordatatype,orauser-definedstructure,andarestoredinsequentialfashionandcanbeaccessedusingapointerbyakernelexecutingonadevice.Thedataisstoredinthesameformatasitisaccessedbythekernel.CreateBufferObjects[5.2.1]cl_memclCreateBuffer(cl_contextcontext,cl_mem_flagsflags,size_tsize,void*host_ptr,cl_int*errcode_ret)flags:CL_MEM_READ_WRITE,CL_MEM_WRITE_ONLY,CL_MEM_READ_ONLY,CL_MEM_USE_HOST_PTR,CL_MEM_ALLOC_HOST_PTR,CL_MEM_COPY_HOST_PTRRead,Write,CopyBufferObjects[5.2.2-5.2.3]cl_intclEnqueueReadBuffer(cl_command_queuecommand_queue,cl_membuffer,cl_boolblocking_read,size_toffset,size_tcb,void*ptr,cl_uintnum_events_in_wait_list,constcl_event*event_wait_list,cl_event*event)cl_intclEnqueueWriteBuffer(cl_command_queuecommand_queue,cl_membuffer,cl_boolblocking_write,size_toffset,size_tcb,constvoid*ptr,cl_uintnum_events_in_wait_list,constcl_event*event_wait_list,cl_event*event)cl_intclEnqueueCopyBuffer(cl_command_queuecommand_queue,cl_memsrc_buffer,cl_memdst_buffer,size_tsrc_offset,size_tdst_offset,size_tcb,cl_uintnum_events_in_wait_list,constcl_event*event_wait_list,cl_event*event)cl_intclRetainMemObject(cl_memmemobj)cl_intclReleaseMemObject(cl_memmemobj)MapandUnmapMemoryObjects[5.2.8]void*clEnqueueMapBuffer(cl_command_queuecommand_queue,cl_membuffer,cl_boolblocking_map,cl_map_flagsmap_flags,size_toffset,size_tcb,cl_uintnum_events_in_wait_list,constcl_event*event_wait_list,cl_event*event,cl_int*errcode_ret)cl_intclEnqueueUnmapMemObject(cl_command_queuecommand_queue,cl_memmemobj,void*mapped_ptr,cl_uintnum_events_in_wait_list,constcl_event*event_wait_list,cl_event*event)QueryBufferObject[5.2.9]cl_intclGetMemObjectInfo(cl_memmemobj,cl_mem_infoparam_name,size_tparam_value_size,void*param_value,size_t*param_value_size_ret)param_name:CL_MEM_TYPE,CL_MEM_FLAGS,CL_MEM_SIZE,CL_MEM_HOST_PTR,CL_MEM_MAP_COUNT,CL_MEM_REFERENCE_COUNT,CL_MEM_CONTEXTProgramObjectsCreateProgramObjects[5.4.1]cl_programclCreateProgramWithSource(cl_contextcontext,cl_uintcount,constchar**strings,constsize_t*lengths,cl_int*errcode_ret)cl_programclCreateProgramWithBinary(cl_contextcontext,cl_uintnum_devices,constcl_device_id*device_list,constsize_t*lengths,constunsignedchar**binaries,cl_int*binary_status,cl_int*errcode_ret)cl_intclRetainProgram(cl_programprogram)cl_intclReleaseProgram(cl_programprogram)BuildProgramExecutable[5.4.2]cl_intclBuildProgram(cl_programprogram,cl_uintnum_devices,constcl_device_id*device_list,constchar*options,void(*pfn_notify)(cl_program,void*user_data),void*user_data)BuildOptions[5.4.3]Preprocessoroptions:(-DoptionsprocessedinorderlistedinclBuildProgram)-Dname,-Dname=definition,-IdirMathIntrinsicsoptions:-cl-single-precision-constant,-cl-denorms-are-zero,Optimizationoptions:-cl-opt-disable,-cl-strict-aliasing,-cl-mad-enable,-cl-no-signed-zeros,-cl-finite-math-only,-cl-fast-relaxed-math,-cl-unsafe-math-optimizationsWarningrequest/suppressoptions:-w,-WerrorUnloadtheOpenCLCompiler[5.4.4]cl_intclUnloadCompiler(void)QueryProgramObjects[5.4.5]cl_intclGetProgramInfo(cl_programprogram,cl_program_infoparam_name,size_tparam_value_size,void*param_value,size_t*param_value_size_ret)param_name:CL_PROGRAM_REFERENCE_COUNT,CL_PROGRAM_CONTEXT,CL_PROGRAM_NUM_DEVICES,CL_PROGRAM_DEVICES,CL_PROGRAM_SOURCE,CL_PROGRAM_BINARY_SIZES,CL_PROGRAM_BINARIES,CL_PROGRAM_SOURCEcl_intclGetProgramBuildInfo(cl_programprogram,cl_device_iddevice,cl_program_build_infoparam_name,size_tparam_value_size,void*param_value,size_t*param
本文标题:opencl-quick-reference-card
链接地址:https://www.777doc.com/doc-5857168 .html