Home | History | Annotate | Download | only in radeon
      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 //
     10 // Interface for the subtarget data classes.
     11 //
     12 //===----------------------------------------------------------------------===//
     13 // This file will define the interface that each generation needs to
     14 // implement in order to correctly answer queries on the capabilities of the
     15 // specific hardware.
     16 //===----------------------------------------------------------------------===//
     17 #ifndef _AMDIL7XXDEVICEIMPL_H_
     18 #define _AMDIL7XXDEVICEIMPL_H_
     19 #include "AMDILDevice.h"
     20 
     21 namespace llvm {
     22 class AMDGPUSubtarget;
     23 
     24 //===----------------------------------------------------------------------===//
     25 // 7XX generation of devices and their respective sub classes
     26 //===----------------------------------------------------------------------===//
     27 
     28 // The AMDGPU7XXDevice class represents the generic 7XX device. All 7XX
     29 // 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 }; // AMDGPU7XXDevice
     45 
     46 // The AMDGPU770Device class represents the RV770 chip and it's
     47 // derivative cards. The difference between this device and the base
     48 // class is this device device adds support for double precision
     49 // and has a larger wavefront size.
     50 class AMDGPU770Device : public AMDGPU7XXDevice {
     51 public:
     52   AMDGPU770Device(AMDGPUSubtarget *ST);
     53   virtual ~AMDGPU770Device();
     54   virtual size_t getWavefrontSize() const;
     55 private:
     56   virtual void setCaps();
     57 }; // AMDGPU770Device
     58 
     59 // The AMDGPU710Device class derives from the 7XX base class, but this
     60 // class is a smaller derivative, so we need to overload some of the
     61 // functions in order to correctly specify this information.
     62 class AMDGPU710Device : public AMDGPU7XXDevice {
     63 public:
     64   AMDGPU710Device(AMDGPUSubtarget *ST);
     65   virtual ~AMDGPU710Device();
     66   virtual size_t getWavefrontSize() const;
     67 }; // AMDGPU710Device
     68 
     69 } // namespace llvm
     70 #endif // _AMDILDEVICEIMPL_H_
     71