/dəˈrɛkt-kəmˈpjuːt/

n. “A Microsoft API for performing general-purpose computing on GPUs.”

DirectCompute is part of the Microsoft DirectX family and provides an API that allows developers to leverage GPU computing for tasks beyond graphics rendering. It enables general-purpose parallel computations on compatible GPUs using the same hardware acceleration that powers 3D graphics.

DirectCompute allows developers to run compute shaders, which are programs executed on the GPU, for tasks such as physics simulations, image and video processing, scientific calculations, and AI inference. Unlike traditional graphics APIs, it focuses specifically on computation rather than rendering visuals.

Key characteristics of DirectCompute include:

  • GPU Acceleration: Offloads compute-intensive tasks from the CPU to the GPU.
  • Compute Shaders: Enables parallel execution of tasks across GPU cores.
  • Integration with DirectX: Works alongside Direct3D, making it ideal for game development and multimedia applications.
  • Cross-Device Compatibility: Supports multiple GPU vendors that comply with DirectX standards.
  • High Performance: Exploits GPU parallelism to accelerate data processing and calculations.

Conceptual example of DirectCompute usage:

// DirectCompute pseudocode
Initialize Direct3D device
Create compute shader program
Allocate GPU buffers for input and output
Dispatch shader to execute computation across GPU threads
Read results back to CPU memory

Conceptually, DirectCompute turns the GPU into a highly parallel math engine, allowing developers to accelerate complex calculations and simulations while freeing up the CPU for other tasks.