- Much cleaner and more concise source - Better exceptions handling - Checks local minima to see if retuning is needed. Resolved conflicts: bench/blas.cpp include/isaac/backend/templates/mproduct.h include/isaac/driver/buffer.h lib/array.cpp lib/backend/templates/mproduct.cpp lib/driver/buffer.cpp python/setup.py tune/pysrc/autotune.py tune/pysrc/dataset.py tune/pysrc/misc_tools.py
40 lines
747 B
C++
40 lines
747 B
C++
#ifndef ISAAC_DRIVER_BUFFER_H
|
|
#define ISAAC_DRIVER_BUFFER_H
|
|
|
|
#include "isaac/types.h"
|
|
|
|
#include "isaac/driver/common.h"
|
|
#include "isaac/driver/context.h"
|
|
#include "isaac/driver/handle.h"
|
|
|
|
namespace isaac
|
|
{
|
|
|
|
namespace driver
|
|
{
|
|
|
|
// Buffer
|
|
class Buffer
|
|
{
|
|
friend class CommandQueue;
|
|
friend class Kernel;
|
|
public:
|
|
Buffer(cl::Buffer const & Buffer);
|
|
Buffer(Context const & context, std::size_t size);
|
|
Context const & context() const;
|
|
bool operator<(Buffer const &) const;
|
|
bool operator==(Buffer const &) const;
|
|
HANDLE_TYPE(cl::Buffer, CUdeviceptr)& handle();
|
|
HANDLE_TYPE(cl::Buffer, CUdeviceptr) const & handle() const;
|
|
private:
|
|
backend_type backend_;
|
|
Context context_;
|
|
HANDLE_TYPE(cl::Buffer, CUdeviceptr) h_;
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|