… | |
… | |
9 | way to create a 2D image in OpenCL 1.1 is clCreateImage2D, which is not |
9 | way to create a 2D image in OpenCL 1.1 is clCreateImage2D, which is not |
10 | available anymore with OpenCL 1.2. |
10 | available anymore with OpenCL 1.2. |
11 | |
11 | |
12 | The OpenCL module can often emulate OpenCL 1.1 functions using OpenCL 1.2 |
12 | The OpenCL module can often emulate OpenCL 1.1 functions using OpenCL 1.2 |
13 | functions, but even though your OpenCL library might contain the OpenCL |
13 | functions, but even though your OpenCL library might contain the OpenCL |
14 | 1.2 functions, they might be nonfunctional and crash. On the other hand, |
14 | 1.2 functions, they might be nonfunctional and crash. |
15 | some methods, such as enqueue_barrier, have more options when using the |
|
|
16 | OpenCL 1.2 API. |
|
|
17 | |
15 | |
18 | Do you want to prefer the OpenCL 1.1 API over the 1.2 API where possible? |
16 | Do you want to prefer the OpenCL 1.1 API over the 1.2 API where possible? |
19 | |
17 | |
20 | EOF |
18 | EOF |
21 | |
19 | |
22 | my $DEFINE .= " -DPREFER_1_1=" . (0 + (prompt ("Prefer OpenCL 1.1 over 1.2 functions (y/n)?", "y") =~ /[yY]/)); |
20 | my $DEFINE = " -DPREFER_1_1=" . (0 + (prompt ("Prefer OpenCL 1.1 over 1.2 functions (y/n)?", "y") =~ /[yY]/)); |
|
|
21 | |
|
|
22 | print <<EOF; |
|
|
23 | |
|
|
24 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
|
|
25 | |
|
|
26 | |
|
|
27 | This module needs to link against both the OpenCL and pthread libraries |
|
|
28 | (even on windows). If you wish you can override the LIBS argument now. If |
|
|
29 | not, just press enter to accept the default. |
|
|
30 | |
|
|
31 | EOF |
|
|
32 | |
|
|
33 | my $LIBS = prompt "Value for LIBS?", "-lOpenCL -lpthread"; |
|
|
34 | |
|
|
35 | print <<EOF; |
|
|
36 | |
|
|
37 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
|
|
38 | |
|
|
39 | |
|
|
40 | Sometimes you need to define extra compilation options (for example, the |
|
|
41 | hypothetical OpenCL 1.3 header files might require you to define something |
|
|
42 | like CL_USE_DEPRECATED_OPENCL_1_2_APIS). You can do this here, or simply |
|
|
43 | press enter. |
|
|
44 | |
|
|
45 | EOF |
|
|
46 | |
|
|
47 | my $EXTRADEFS = prompt "Any extra -D options?", ""; |
23 | |
48 | |
24 | WriteMakefile( |
49 | WriteMakefile( |
25 | dist => { |
50 | dist => { |
26 | PREOP => 'pod2text OpenCL.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
51 | PREOP => 'pod2text OpenCL.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
27 | COMPRESS => 'gzip -9v', |
52 | COMPRESS => 'gzip -9v', |
28 | SUFFIX => '.gz', |
53 | SUFFIX => '.gz', |
29 | }, |
54 | }, |
30 | PREREQ_PM => { |
55 | PREREQ_PM => { |
31 | common::sense => 0, |
56 | common::sense => 3, |
|
|
57 | Async::Interrupt => 1.1, |
32 | }, |
58 | }, |
33 | DEFINE => $DEFINE, |
59 | DEFINE => "$DEFINE $EXTRADEFS", |
34 | NAME => "OpenCL", |
60 | NAME => "OpenCL", |
35 | VERSION_FROM => "OpenCL.pm", |
61 | VERSION_FROM => "OpenCL.pm", |
36 | LIBS => ["-lOpenCL"], |
62 | LIBS => [$LIBS], |
37 | ); |
63 | ); |
38 | |
64 | |