CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
42 lines
1.3 KiB
MLIR
42 lines
1.3 KiB
MLIR
// RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s --match-full-lines
|
|
// RUN: mlir-translate -mlir-to-cpp -declare-variables-at-top %s | FileCheck %s --match-full-lines
|
|
|
|
|
|
emitc.verbatim "#ifdef __cplusplus"
|
|
// CHECK: #ifdef __cplusplus
|
|
emitc.verbatim "extern \"C\" {"
|
|
// CHECK-NEXT: extern "C" {
|
|
emitc.verbatim "#endif // __cplusplus"
|
|
// CHECK-NEXT: #endif // __cplusplus
|
|
emitc.verbatim "#ifdef __cplusplus"
|
|
// CHECK-NEXT: #ifdef __cplusplus
|
|
emitc.verbatim "} // extern \"C\""
|
|
// CHECK-NEXT: } // extern "C"
|
|
emitc.verbatim "#endif // __cplusplus"
|
|
// CHECK-NEXT: #endif // __cplusplus
|
|
|
|
emitc.verbatim "typedef int32_t i32;"
|
|
// CHECK-NEXT: typedef int32_t i32;
|
|
emitc.verbatim "typedef float f32;"
|
|
// CHECK-NEXT: typedef float f32;
|
|
|
|
emitc.func @func(%arg: f32) {
|
|
// CHECK: void func(float [[V0:[^ ]*]]) {
|
|
%a = "emitc.variable"(){value = #emitc.opaque<"">} : () -> !emitc.array<3x7xi32>
|
|
// CHECK: int32_t [[A:[^ ]*]][3][7];
|
|
|
|
emitc.verbatim "{}" args %arg : f32
|
|
// CHECK: [[V0]]
|
|
|
|
emitc.verbatim "{} {{a" args %arg : f32
|
|
// CHECK-NEXT: [[V0]] {a
|
|
|
|
emitc.verbatim "#pragma my var={} property" args %arg : f32
|
|
// CHECK-NEXT: #pragma my var=[[V0]] property
|
|
|
|
emitc.verbatim "#pragma my2 var={} property" args %a : !emitc.array<3x7xi32>
|
|
// CHECK-NEXT: #pragma my2 var=[[A]] property
|
|
|
|
emitc.return
|
|
}
|