自分用にカスタマイズしたshared-mime-infoのソース
Revision | 4ab969c398671c519a10a601ad3eeb46f04361de (tree) |
---|---|
Time | 2017-03-09 22:12:37 |
Author | Kevin Funk <kfunk@kde....> |
Commiter | Bastien Nocera |
Add OpenCL mime-type
@@ -5939,6 +5939,13 @@ command to generate the output files. | ||
5939 | 5939 | <glob pattern="*.ml"/> |
5940 | 5940 | <glob pattern="*.mli"/> |
5941 | 5941 | </mime-type> |
5942 | + <mime-type type="text/x-opencl-src"> | |
5943 | + <_comment>OpenCL source code</_comment> | |
5944 | + <acronym>OpenCL</acronym> | |
5945 | + <expanded-acronym>Open Computing Language</expanded-acronym> | |
5946 | + <sub-class-of type="text/x-csrc"/> | |
5947 | + <glob pattern="*.cl"/> | |
5948 | + </mime-type> | |
5942 | 5949 | <mime-type type="text/x-matlab"> |
5943 | 5950 | <_comment>MATLAB script/function</_comment> |
5944 | 5951 | <sub-class-of type="text/plain"/> |
@@ -285,6 +285,9 @@ test.mo text/x-modelica xoo | ||
285 | 285 | bibtex.bib text/x-bibtex |
286 | 286 | # hand-made |
287 | 287 | simple-obj-c.m text/x-objcsrc |
288 | +# Copied from LLVM project test suite | |
289 | +test.cl text/x-opencl-src ox | |
290 | + | |
288 | 291 | # http://www.apps.ietf.org/rfc/rfc4716.html#sec-3.6 |
289 | 292 | ssh-public-key.txt text/plain |
290 | 293 | # http://tools.ietf.org/html/draft-ietf-vcarddav-vcardrev-22 |
@@ -0,0 +1,24 @@ | ||
1 | +// RUN: c-index-test -test-print-type %s | FileCheck %s | |
2 | + | |
3 | +#pragma OPENCL EXTENSION cl_khr_fp16 : enable | |
4 | +#pragma OPENCL EXTENSION cl_khr_fp64 : enable | |
5 | + | |
6 | +typedef half half4 __attribute__((ext_vector_type(4))); | |
7 | +typedef float float4 __attribute__((ext_vector_type(4))); | |
8 | +typedef double double4 __attribute__((ext_vector_type(4))); | |
9 | + | |
10 | +void kernel testFloatTypes() { | |
11 | + half scalarHalf; | |
12 | + half4 vectorHalf; | |
13 | + float scalarFloat; | |
14 | + float4 vectorFloat; | |
15 | + double scalarDouble; | |
16 | + double4 vectorDouble; | |
17 | +} | |
18 | + | |
19 | +// CHECK: VarDecl=scalarHalf:11:8 (Definition) [type=half] [typekind=Half] [isPOD=1] | |
20 | +// CHECK: VarDecl=vectorHalf:12:9 (Definition) [type=half4] [typekind=Typedef] [canonicaltype=half __attribute__((ext_vector_type(4)))] [canonicaltypekind=Unexposed] [isPOD=1] | |
21 | +// CHECK: VarDecl=scalarFloat:13:9 (Definition) [type=float] [typekind=Float] [isPOD=1] | |
22 | +// CHECK: VarDecl=vectorFloat:14:10 (Definition) [type=float4] [typekind=Typedef] [canonicaltype=float __attribute__((ext_vector_type(4)))] [canonicaltypekind=Unexposed] [isPOD=1] | |
23 | +// CHECK: VarDecl=scalarDouble:15:10 (Definition) [type=double] [typekind=Double] [isPOD=1] | |
24 | +// CHECK: VarDecl=vectorDouble:16:11 (Definition) [type=double4] [typekind=Typedef] [canonicaltype=double __attribute__((ext_vector_type(4)))] [canonicaltypekind=Unexposed] [isPOD=1] |