diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-29 14:49:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 14:49:26 +0800 |
| commit | f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch) | |
| tree | ea1d61342cd29368e19135000ec2948813096205 /source/slang/slang-ir-specialize-function-call.h | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'source/slang/slang-ir-specialize-function-call.h')
| -rw-r--r-- | source/slang/slang-ir-specialize-function-call.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/source/slang/slang-ir-specialize-function-call.h b/source/slang/slang-ir-specialize-function-call.h index 092a5158d..bab4ce2f4 100644 --- a/source/slang/slang-ir-specialize-function-call.h +++ b/source/slang/slang-ir-specialize-function-call.h @@ -3,34 +3,34 @@ namespace Slang { - struct CodeGenContext; - struct IRInst; - struct IRModule; - struct IRParam; - class Module; +struct CodeGenContext; +struct IRInst; +struct IRModule; +struct IRParam; +class Module; - class FunctionCallSpecializeCondition - { - public: - virtual bool doesParamWantSpecialization(IRParam* param, IRInst* arg) = 0; +class FunctionCallSpecializeCondition +{ +public: + virtual bool doesParamWantSpecialization(IRParam* param, IRInst* arg) = 0; - virtual bool isParamSuitableForSpecialization(IRParam* param, IRInst* arg); + virtual bool isParamSuitableForSpecialization(IRParam* param, IRInst* arg); - virtual bool doesParamTypeWantSpecialization(IRParam* param, IRInst* arg); - }; + virtual bool doesParamTypeWantSpecialization(IRParam* param, IRInst* arg); +}; - /// Specialize calls to functions with certain type of parameters. - /// - /// For any function that has a specific type of input parameters - /// this pass will rewrite its call sites that pass suitable arguments - /// (e.g., direct references to global shader parameters) to instead call - /// a specialized variant of the function that does not have - /// those resource parameters (and instead, e.g, refers to the - /// global shader parameters directly). - /// Returns true if any changes are made. - bool specializeFunctionCalls( - CodeGenContext* codeGenContext, - IRModule* module, - FunctionCallSpecializeCondition* condition); -} +/// Specialize calls to functions with certain type of parameters. +/// +/// For any function that has a specific type of input parameters +/// this pass will rewrite its call sites that pass suitable arguments +/// (e.g., direct references to global shader parameters) to instead call +/// a specialized variant of the function that does not have +/// those resource parameters (and instead, e.g, refers to the +/// global shader parameters directly). +/// Returns true if any changes are made. +bool specializeFunctionCalls( + CodeGenContext* codeGenContext, + IRModule* module, + FunctionCallSpecializeCondition* condition); +} // namespace Slang |
