2015-04-29 15:50:57 -04:00
|
|
|
#include "isaac/backend/binder.h"
|
2015-01-12 13:20:53 -05:00
|
|
|
|
2015-04-29 15:50:57 -04:00
|
|
|
namespace isaac
|
2015-01-12 13:20:53 -05:00
|
|
|
{
|
|
|
|
|
|
|
|
symbolic_binder::~symbolic_binder(){ }
|
|
|
|
|
2015-04-29 15:50:57 -04:00
|
|
|
symbolic_binder::symbolic_binder() : current_arg_(0)
|
|
|
|
{}
|
|
|
|
|
|
|
|
unsigned int symbolic_binder::get()
|
|
|
|
{ return current_arg_++; }
|
|
|
|
|
|
|
|
bind_to_handle::bind_to_handle()
|
2015-01-12 13:20:53 -05:00
|
|
|
{ }
|
|
|
|
|
|
|
|
//
|
2015-04-29 15:50:57 -04:00
|
|
|
bool bind_to_handle::bind(driver::Buffer const & ph)
|
|
|
|
{ return memory.insert(std::make_pair(ph, current_arg_)).second; }
|
2015-01-12 13:20:53 -05:00
|
|
|
|
2015-04-29 15:50:57 -04:00
|
|
|
unsigned int bind_to_handle::get(driver::Buffer const & ph)
|
2015-01-18 14:52:45 -05:00
|
|
|
{ return bind(ph)?current_arg_++:memory.at(ph); }
|
2015-01-12 13:20:53 -05:00
|
|
|
|
|
|
|
//
|
2015-04-29 15:50:57 -04:00
|
|
|
bind_all_unique::bind_all_unique()
|
2015-01-12 13:20:53 -05:00
|
|
|
{ }
|
|
|
|
|
2015-04-29 15:50:57 -04:00
|
|
|
bool bind_all_unique::bind(driver::Buffer const &)
|
2015-01-12 13:20:53 -05:00
|
|
|
{return true;}
|
|
|
|
|
2015-04-29 15:50:57 -04:00
|
|
|
unsigned int bind_all_unique::get(driver::Buffer const &)
|
2015-01-12 13:20:53 -05:00
|
|
|
{ return current_arg_++;}
|
|
|
|
|
|
|
|
}
|