---
title: "imToCol(_:descriptor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/imtocol(_:descriptor:name:)"
---

# imToCol(_:descriptor:name:)

Creates an imToCol operation and returns the result tensor.

## Declaration

```swift
func imToCol(_ source: MPSGraphTensor, descriptor: MPSGraphImToColOpDescriptor, name: String?) -> MPSGraphTensor
```

## Parameters

- `source`: The tensor containing the source data. Must be of rank 4. The layout is defined by descriptor.dataLayout.
- `descriptor`: The descriptor object that specifies the parameters of the operation.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object
