Column-oriented GPU-accelerated Database Management System
CoGaDB
|
00001 /*********************************************************************************************************** 00002 Copyright (c) 2012, Sebastian Breß, Otto-von-Guericke University of Magdeburg, Germany. All rights reserved. 00003 00004 This program and accompanying materials are made available under the terms of the 00005 GNU LESSER GENERAL PUBLIC LICENSE - Version 3, http://www.gnu.org/licenses/lgpl-3.0.txt 00006 ***********************************************************************************************************/ 00007 #pragma once 00008 #include <vector> 00009 00010 namespace hype{ 00011 namespace util{ 00012 00013 template <class T, class TAl> 00014 inline T* begin_ptr(std::vector<T,TAl>& v) 00015 {return v.empty() ? NULL : &v[0];} 00016 00017 template <class T, class TAl> 00018 inline const T* begin_ptr(const std::vector<T,TAl>& v) 00019 {return v.empty() ? NULL : &v[0];} 00020 00021 }; //end namespace util 00022 }; //end namespace hype 00023