示例#1
0
vector_t::vector_t(size_t _len)
:
	data(static_cast<double*>(mkl_calloc(_len , sizeof(double), 64)), std::ptr_fun(mkl_free)),
	len(_len), inc(1)
{
	stack_assert(data.get() != nullptr);
	stack_assert(len > 0);
}
示例#2
0
文件: Memory.cpp 项目: AtwooTM/FCor
int create_zero_array(const MKL_INT length, T*& x)
{
	if (x == nullptr)
	{
		x = (T*)mkl_calloc(length, sizeof(T), 64);
		if (x == nullptr)
		{
			return OUTOFMEMORY;
		}
	}
	return 0;
}