# GPUQuerySet

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/GPUQuerySet.kt+class:androidx.webgpu.GPUQuerySet) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
class GPUQuerySet : AutoCloseable
```

<br />

*** ** * ** ***

A set of queries for occlusion or timestamp measurements.

## Summary

| ### Public functions |
|---|---|
| `open external https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#close()()` Decrements the reference count of the object and frees resources when the count reaches zero. |
| `external https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#destroy()()` Destroys the query set and releases its resources. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `external https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#getCount()()` Gets the number of queries in the set. |
| `external https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#getType()()` Gets the type of queries in the set. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#hashCode()()` |
| `external https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#setLabel(kotlin.String)(label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Sets a human-readable label for debugging. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#count()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#handle()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQuerySet#type()` |

## Public functions

### close

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
open external fun close(): Unit
```

Decrements the reference count of the object and frees resources when the count reaches zero.

This is the standard way to manage object lifetimes and should be used in `use` blocks. After calling this, the object is no longer usable.

### destroy

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
external fun destroy(): Unit
```

Destroys the query set and releases its resources.

### equals

```
open operator fun equals(other: Any?): Boolean
```

### getCount

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
external fun getCount(): Int
```

Gets the number of queries in the set.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The query count. |

### getType

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
external fun getType(): Int
```

Gets the type of queries in the set.

Value is one of the following:

- `1`
- `2`

<br />

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The query type. |

### hashCode

```
open fun hashCode(): Int
```

### setLabel

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
external fun setLabel(label: String): Unit
```

Sets a human-readable label for debugging.

| Parameters |
|---|---|
| `label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The label string. |

## Public properties

### count

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
val count: Int
```

### handle

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
val handle: Long
```

### type

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
val type: Int
```