Skip to content

Commit

Permalink
Formatting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Feb 9, 2015
1 parent 2f2b6cc commit 9b407a5
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions pyopencl/__init__.py
Expand Up @@ -285,26 +285,16 @@ def link_program(context, programs, options=[], devices=None):

def _add_functionality():
cls_to_info_cls = {
_cl.Platform:
(_cl.Platform.get_info, _cl.platform_info),
_cl.Device:
(_cl.Device.get_info, _cl.device_info),
_cl.Context:
(_cl.Context.get_info, _cl.context_info),
_cl.CommandQueue:
(_cl.CommandQueue.get_info, _cl.command_queue_info),
_cl.Event:
(_cl.Event.get_info, _cl.event_info),
_cl.MemoryObjectHolder:
(MemoryObjectHolder.get_info, _cl.mem_info),
Image:
(_cl.Image.get_image_info, _cl.image_info),
Program:
(Program.get_info, _cl.program_info),
Kernel:
(Kernel.get_info, _cl.kernel_info),
_cl.Sampler:
(Sampler.get_info, _cl.sampler_info),
_cl.Platform: (_cl.Platform.get_info, _cl.platform_info),
_cl.Device: (_cl.Device.get_info, _cl.device_info),
_cl.Context: (_cl.Context.get_info, _cl.context_info),
_cl.CommandQueue: (_cl.CommandQueue.get_info, _cl.command_queue_info),
_cl.Event: (_cl.Event.get_info, _cl.event_info),
_cl.MemoryObjectHolder: (MemoryObjectHolder.get_info, _cl.mem_info),
Image: (_cl.Image.get_image_info, _cl.image_info),
Program: (Program.get_info, _cl.program_info),
Kernel: (Kernel.get_info, _cl.kernel_info),
_cl.Sampler: (Sampler.get_info, _cl.sampler_info),
}

def to_string(cls, value, default_format=None):
Expand Down Expand Up @@ -355,7 +345,6 @@ def platform_get_cl_version(self):

return int(match.group(1)), int(match.group(2))


Platform.__repr__ = platform_repr
Platform._get_cl_version = platform_get_cl_version

Expand Down Expand Up @@ -1225,8 +1214,6 @@ def enqueue_fill_buffer(queue, mem, pattern, offset, size, wait_for=None):
"the next thing you might see is a crash")
return _cl._enqueue_fill_buffer(queue, mem, pattern, offset, size, wait_for)



# }}}


Expand Down

0 comments on commit 9b407a5

Please sign in to comment.