]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/llvm/lib/Target/R600/AMDIL7XXDevice.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / llvm / lib / Target / R600 / AMDIL7XXDevice.h
1 //==-- AMDIL7XXDevice.h - Define 7XX Device Device for AMDIL ---*- C++ -*--===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //==-----------------------------------------------------------------------===//
9 /// \file
10 /// \brief Interface for the subtarget data classes.
11 ///
12 /// This file will define the interface that each generation needs to
13 /// implement in order to correctly answer queries on the capabilities of the
14 /// specific hardware.
15 //===----------------------------------------------------------------------===//
16 #ifndef AMDIL7XXDEVICEIMPL_H
17 #define AMDIL7XXDEVICEIMPL_H
18 #include "AMDILDevice.h"
19
20 namespace llvm {
21 class AMDGPUSubtarget;
22
23 //===----------------------------------------------------------------------===//
24 // 7XX generation of devices and their respective sub classes
25 //===----------------------------------------------------------------------===//
26
27 /// \brief The AMDGPU7XXDevice class represents the generic 7XX device.
28 ///
29 /// All 7XX devices are derived from this class. The AMDGPU7XX device will only
30 /// support the minimal features that are required to be considered OpenCL 1.0
31 /// compliant and nothing more.
32 class AMDGPU7XXDevice : public AMDGPUDevice {
33 public:
34   AMDGPU7XXDevice(AMDGPUSubtarget *ST);
35   virtual ~AMDGPU7XXDevice();
36   virtual size_t getMaxLDSSize() const;
37   virtual size_t getWavefrontSize() const;
38   virtual uint32_t getGeneration() const;
39   virtual uint32_t getResourceID(uint32_t DeviceID) const;
40   virtual uint32_t getMaxNumUAVs() const;
41
42 protected:
43   virtual void setCaps();
44 };
45
46 /// \brief The AMDGPU770Device class represents the RV770 chip and it's
47 /// derivative cards.
48 ///
49 /// The difference between this device and the base class is this device device
50 /// adds support for double precision and has a larger wavefront size.
51 class AMDGPU770Device : public AMDGPU7XXDevice {
52 public:
53   AMDGPU770Device(AMDGPUSubtarget *ST);
54   virtual ~AMDGPU770Device();
55   virtual size_t getWavefrontSize() const;
56 private:
57   virtual void setCaps();
58 };
59
60 /// \brief The AMDGPU710Device class derives from the 7XX base class.
61 ///
62 /// This class is a smaller derivative, so we need to overload some of the
63 /// functions in order to correctly specify this information.
64 class AMDGPU710Device : public AMDGPU7XXDevice {
65 public:
66   AMDGPU710Device(AMDGPUSubtarget *ST);
67   virtual ~AMDGPU710Device();
68   virtual size_t getWavefrontSize() const;
69 };
70
71 } // namespace llvm
72 #endif // AMDILDEVICEIMPL_H