---
title: "ORACLE_GPU_STUB_NAMES: TypeShade API의 CPU 오라클 분류 상수 참조 문서"
description: "ORACLE_GPU_STUB_NAMES, TypeShade API의 CPU 오라클 분류에 속하는 상수입니다. CPU 백엔드가 실제로 계산할 수 없는 GPU 전용 내장 함수의 이름을 모두 담은 읽기 전용 집합입니다."
url: https://typeshade.dev/ko/api/oraclegpustubnames/
language: ko
---

# `ORACLE_GPU_STUB_NAMES`

상수, CPU 오라클 분류

CPU 백엔드가 실제로 계산할 수 없는 GPU 전용 내장 함수의 이름을 모두 담은 읽기 전용 집합입니다. `textureSample`, `textureSampleLevel`, `textureSampleBias`, `textureSampleGrad`, `textureLoad`, 이들의 2d-array 형태, 깊이 비교 함수들, `textureDimensions`, `textureNumLayers`, 그리고 도함수인 fwidth, dpdx, dpdy가 포함됩니다.

`import { ORACLE_GPU_STUB_NAMES } from 'typeshade'`

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

```ts
const ORACLE_GPU_STUB_NAMES: ReadonlySet<string>
```

## 설명

텍스처를 읽으려면 GPU의 샘플러와 텍스처 메모리가 필요하고, 도함수를 구하려면 이웃 프래그먼트가 필요합니다. CPU에서 호출 하나만 실행하는 경우에는 이 둘이 모두 없습니다. [`compileModule`](https://typeshade.dev/ko/api/compilemodule/)이나 [`compileModuleJs`](https://typeshade.dev/ko/api/compilemodulejs/)로 컴파일한 모듈에서 이 함수 중 하나를 부르면 오류가 발생합니다. 단, 모듈을 `{ gpuStubs: true }`로 컴파일한 경우에는 예외입니다. 이때는 플레이스홀더를 반환합니다. 텍스처 읽기는 `[0, 0, 0, 1]`, `textureDimensions`는 `[1, 1]`, `textureNumLayers`는 `1`, 도함수는 `0`을 반환합니다. 이 집합은 테스트를 위한 것입니다. 이 집합과 [`ORACLE_BUILTIN_NAMES`](https://typeshade.dev/ko/api/oraclebuiltinnames/)의 합집합은 [`INTRINSICS`](https://typeshade.dev/ko/api/intrinsics/)와 [`PORTABLE_INTRINSICS`](https://typeshade.dev/ko/api/portableintrinsics/)의 모든 내장 함수를 포함해야 합니다. 그래야 테스트에서 셰이더가 내보낼 수 있는 각 내장 함수에 CPU 구현이나 문서화된 플레이스홀더가 있는지 확인할 수 있습니다.

## 관련 가이드

- [CPU 오라클 안내서](https://typeshade.dev/ko/guide/internals/the-cpu-oracle/)

## 함께 보기

- [`compileModule`](https://typeshade.dev/ko/api/compilemodule/)
- [`compileModuleJs`](https://typeshade.dev/ko/api/compilemodulejs/)
- [`ORACLE_BUILTIN_NAMES`](https://typeshade.dev/ko/api/oraclebuiltinnames/)
- [`INTRINSICS`](https://typeshade.dev/ko/api/intrinsics/)
- [`PORTABLE_INTRINSICS`](https://typeshade.dev/ko/api/portableintrinsics/)

## 소스

[`src/core/cpu-runtime/oracle-names.ts`, 34행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/cpu-runtime/oracle-names.ts#L34), 커밋 af54ddad5 기준
