All Projects → mateuszbuda → GPUExample

mateuszbuda / GPUExample

Licence: other
GPUExample

Programming Languages

swift
15916 projects
Metal
113 projects

GPUExample

GPGPU Example with Apple's Metal API

Project overview

KernelSelectionController.swift

Table View with available kernels to compare CPU and GPU performance

ViewController.swift

Performs CPU and GPU computations. Shows execution times.

kernel.metal

Kernels that are executed on GPU with Metal API.

map

Simple map that applies cosine function to each element of input array.

reduce1

Naive parallel reduction (computes sum of cosine of each input array element). reduce1

reduce2

Changed threads performing reduction. reduce2

reduce3

Accessing connected memory space. reduce3

reduce4

The same as in reduce3 but first reduction step is performed when copying data to shared memory, so we need half the number of threads that we needed in the previous reduce versions.

NOTICE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].