comparison src/share/vm/runtime/gpu.hpp @ 9430:147162b27799

GRAAL-234 - PTX code loading
author Morris Meyer <morris.meyer@oracle.com>
date Tue, 30 Apr 2013 08:17:55 -0400
parents
children a6632ef9c84d
comparison
equal deleted inserted replaced
9429:aaf8798b0969 9430:147162b27799
1 /*
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_GPU_HPP
26 #define SHARE_VM_RUNTIME_GPU_HPP
27
28 #include "runtime/atomic.hpp"
29
30 // gpu defines the interface to the graphics processor; this includes traditional
31 // GPU services such as graphics kernel load and execute.
32
33
34 class gpu: AllStatic {
35 public:
36 static void init(void);
37
38 static void probe_gpu();
39
40 static void probe_linkage();
41
42 static void initialize_gpu();
43
44 static void generate_kernel(unsigned char *code, int code_len, const char *name);
45
46 static void set_available(bool value) {
47 _available = value;
48 }
49
50 static bool is_available() { return _available; }
51
52 static void set_initialized(bool value) {
53 _initialized = value;
54 }
55
56 static bool is_initialized() { return _initialized; }
57
58 static void set_gpu_linkage(bool value) {
59 _gpu_linkage = value;
60 }
61
62 static bool has_gpu_linkage() { return _gpu_linkage; }
63
64 protected:
65 static bool _available;
66 static bool _gpu_linkage;
67 static bool _initialized;
68
69 // Platform dependent stuff
70 #ifdef TARGET_OS_FAMILY_linux
71 #endif
72 #ifdef TARGET_OS_FAMILY_solaris
73 #endif
74 #ifdef TARGET_OS_FAMILY_windows
75 #endif
76 #ifdef TARGET_OS_FAMILY_bsd
77 # include "gpu_bsd.hpp"
78 #endif
79
80 # include "ptx/gpu_ptx.hpp"
81
82 };
83
84
85 #endif // SHARE_VM_RUNTIME_GPU_HPP