亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? blas2.cpp

?? 圖像分割算法
?? CPP
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
//Copyright (c) 2004-2005, Baris Sumengen
//All rights reserved.
//
// CIMPL Matrix Performance Library
//
//Redistribution and use in source and binary
//forms, with or without modification, are
//permitted provided that the following
//conditions are met:
//
//    * No commercial use is allowed. 
//    This software can only be used
//    for non-commercial purposes. This 
//    distribution is mainly intended for
//    academic research and teaching.
//    * Redistributions of source code must
//    retain the above copyright notice, this
//    list of conditions and the following
//    disclaimer.
//    * Redistributions of binary form must
//    mention the above copyright notice, this
//    list of conditions and the following
//    disclaimer in a clearly visible part 
//    in associated product manual, 
//    readme, and web site of the redistributed 
//    software.
//    * Redistributions in binary form must
//    reproduce the above copyright notice,
//    this list of conditions and the
//    following disclaimer in the
//    documentation and/or other materials
//    provided with the distribution.
//    * The name of Baris Sumengen may not be
//    used to endorse or promote products
//    derived from this software without
//    specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
//HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
//EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
//NOT LIMITED TO, THE IMPLIED WARRANTIES OF
//MERCHANTABILITY AND FITNESS FOR A PARTICULAR
//PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//CONTRIBUTORS BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
//EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
//OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
//DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
//HOWEVER CAUSED AND ON ANY THEORY OF
//LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
//OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
//OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.



#include "./Blas.h"
#include "mkl.h"


namespace Blas
{


	/// m*v for general matrix
	Vector<float> Gemv(Matrix<float>& A, Vector<float>& x)
	{
		if(A.Columns() != x.Length())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix columns and Vector length are not the same!");
		}
		Vector<float> y(A.Rows(), 0);
		cblas_sgemv(CblasColMajor, CblasNoTrans, A.Rows(), A.Columns(), 1, A.Data(), A.Rows(), x.Data(), 1, 1, y.Data(), 1);
		return y;
	}

	Vector<double> Gemv(Matrix<double>& A, Vector<double>& x)
	{
		if(A.Columns() != x.Length())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix columns and Vector length are not the same!");
		}
 		Vector<double> y(A.Rows(), 0);
		cblas_dgemv(CblasColMajor, CblasNoTrans, A.Rows(), A.Columns(), 1, A.Data(), A.Rows(), x.Data(), 1, 1, y.Data(), 1);
		return y;
	}

	Vector<ComplexFloat> Gemv(Matrix<ComplexFloat>& A, Vector<ComplexFloat>& x)
	{
		if(A.Columns() != x.Length())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix columns and Vector length are not the same!");
		}
		ComplexFloat temp(1,0);
		Vector<ComplexFloat> y(A.Rows(), ComplexFloat(0,0));
		cblas_cgemv(CblasColMajor, CblasNoTrans, A.Rows(), A.Columns(), &temp, A.Data(), A.Rows(), x.Data(), 1, &temp, y.Data(), 1);
		return y;
	}

	Vector<ComplexDouble> Gemv(Matrix<ComplexDouble>& A, Vector<ComplexDouble>& x)
	{
		if(A.Columns() != x.Length())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix columns and Vector length are not the same!");
		}
		ComplexDouble temp(1,0);
		Vector<ComplexDouble> y(A.Rows(), ComplexDouble(0,0));
		cblas_zgemv(CblasColMajor, CblasNoTrans, A.Rows(), A.Columns(), &temp, A.Data(), A.Rows(), x.Data(), 1, &temp, y.Data(), 1);
		return y;
	}


	/// Rank one update, general matrix
	/// A += alpha*x*transp(y)
	/// A += alpha*x*conjug_transp(y) if conjugate == true
	void Ger(float alpha, Vector<float>& x, Vector<float>& y, Matrix<float>& A)
	{
		if(x.Length() != A.Rows() || y.Length() != A.Columns())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Some of the Vector lengths does not match matrix dimensions!");
		}
		cblas_sger(CblasColMajor, A.Rows(), A.Columns(), alpha, x.Data(), 1, y.Data(), 1, A.Data(), A.Rows());
	}

	void Ger(double alpha, Vector<double>& x, Vector<double>& y, Matrix<double>& A)
	{
		if(x.Length() != A.Rows() || y.Length() != A.Columns())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Some of the Vector lengths does not match matrix dimensions!");
		}
		cblas_dger(CblasColMajor, A.Rows(), A.Columns(), alpha, x.Data(), 1, y.Data(), 1, A.Data(), A.Rows());
	}

	void Ger(ComplexFloat alpha, Vector<ComplexFloat>& x, Vector<ComplexFloat>& y, Matrix<ComplexFloat>& A)
	{
		if(x.Length() != A.Rows() || y.Length() != A.Columns())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Some of the Vector lengths does not match matrix dimensions!");
		}

		cblas_cgeru(CblasColMajor, A.Rows(), A.Columns(), &alpha, x.Data(), 1, y.Data(), 1, A.Data(), A.Rows());
	}

	void Ger(ComplexDouble alpha, Vector<ComplexDouble>& x, Vector<ComplexDouble>& y, Matrix<ComplexDouble>& A)
	{
		if(x.Length() != A.Rows() || y.Length() != A.Columns())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Some of the Vector lengths does not match matrix dimensions!");
		}

		cblas_zgeru(CblasColMajor, A.Rows(), A.Columns(), &alpha, x.Data(), 1, y.Data(), 1, A.Data(), A.Rows());
	}

	void Ger(ComplexFloat alpha, Vector<ComplexFloat> x, Vector<ComplexFloat> y, Matrix<ComplexFloat>& A, bool conjugated)
	{
		if(x.Length() != A.Rows() || y.Length() != A.Columns())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Some of the Vector lengths does not match matrix dimensions!");
		}

		if(conjugated)
		{
			cblas_cgerc(CblasColMajor, A.Rows(), A.Columns(), &alpha, x.Data(), 1, y.Data(), 1, A.Data(), A.Rows());
		}
		else
		{
			cblas_cgeru(CblasColMajor, A.Rows(), A.Columns(), &alpha, x.Data(), 1, y.Data(), 1, A.Data(), A.Rows());
		}
	}

	void Ger(ComplexDouble alpha, Vector<ComplexDouble>& x, Vector<ComplexDouble>& y, Matrix<ComplexDouble>& A, bool conjugated)
	{
		if(x.Length() != A.Rows() || y.Length() != A.Columns())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Some of the Vector lengths does not match matrix dimensions!");
		}

		if(conjugated)
		{
			cblas_zgerc(CblasColMajor, A.Rows(), A.Columns(), &alpha, x.Data(), 1, y.Data(), 1, A.Data(), A.Rows());
		}
		else
		{
			cblas_zgeru(CblasColMajor, A.Rows(), A.Columns(), &alpha, x.Data(), 1, y.Data(), 1, A.Data(), A.Rows());
		}
	}



	/// Symv, Hemv: m*v for symmetric or hermitian matrix
	Vector<float> Symv(Matrix<float>& A, Vector<float> x)
	{
		if(A.Columns() != A.Rows())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix is not square!");
		}
		if(A.Columns() != x.Length())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix columns and Vector length are not the same!");
		}
		Vector<float> y(A.Rows(), 0);
		cblas_ssymv(CblasColMajor, CblasUpper, A.Rows(), 1, A.Data(), A.Rows(), x.Data(), 1, 1, y.Data(), 1);
		return y;
	}

	Vector<double> Symv(Matrix<double>& A, Vector<double> x)
	{
		if(A.Columns() != A.Rows())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix is not square!");
		}
		if(A.Columns() != x.Length())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix columns and Vector length are not the same!");
		}
		Vector<double> y(A.Rows(), 0);
		cblas_dsymv(CblasColMajor, CblasUpper, A.Rows(), 1, A.Data(), A.Rows(), x.Data(), 1, 1, y.Data(), 1);
		return y;
	}

	Vector<ComplexFloat> Hemv(Matrix<ComplexFloat>& A, Vector<ComplexFloat>& x)
	{
		if(A.Columns() != A.Rows())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix is not square!");
		}
		if(A.Columns() != x.Length())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix columns and Vector length are not the same!");
		}
		ComplexFloat temp(1,0);
		Vector<ComplexFloat> y(A.Rows(), ComplexFloat(0,0));
		cblas_chemv(CblasColMajor, CblasUpper, A.Rows(), &temp, A.Data(), A.Rows(), x.Data(), 1, &temp, y.Data(), 1);
		return y;
	}

	Vector<ComplexDouble> Hemv(Matrix<ComplexDouble>& A, Vector<ComplexDouble>& x)
	{
		if(A.Columns() != A.Rows())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix is not square!");
		}
		if(A.Columns() != x.Length())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix columns and Vector length are not the same!");
		}
		ComplexDouble temp(1,0);
		Vector<ComplexDouble> y(A.Rows(), ComplexDouble(0,0));
		cblas_zhemv(CblasColMajor, CblasUpper, A.Rows(), &temp, A.Data(), A.Rows(), x.Data(), 1, &temp, y.Data(), 1);
		return y;
	}





	/// Rank-one update of a symmetric or hermitian matrix
	/// A += alpha*x*transp(x)
	/// A += alpha*x*conjug_transp(x)
	void Syr(float alpha, Vector<float>& x, Matrix<float>& A)
	{
		if(A.Columns() != A.Rows())
		{
			cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
			Utility::RunTimeError("Matrix is not square!");

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品三级| 中文字幕一区二区三区蜜月| 五月婷婷久久丁香| 欧美日韩一区成人| 亚洲国产精品久久久久婷婷884 | 日韩欧美电影一区| 欧美aaa在线| 久久理论电影网| 成人黄色在线视频| 亚洲私人影院在线观看| 欧美中文字幕不卡| 日本欧美肥老太交大片| 26uuu久久天堂性欧美| 国产精品18久久久久久vr| 国产日产精品1区| 99精品视频在线观看| 亚洲国产精品欧美一二99| 日韩一区二区视频在线观看| 国产精品一二三四五| 亚洲欧美日韩久久| 91精品欧美久久久久久动漫| 国模娜娜一区二区三区| 国产精品国产自产拍高清av| 欧美性猛交xxxx乱大交退制版| 免费三级欧美电影| 国产亚洲一区二区三区在线观看| 97久久精品人人做人人爽| 亚洲va中文字幕| 久久久精品国产99久久精品芒果 | 国产精品久久久久久亚洲伦| 91行情网站电视在线观看高清版| 蜜臀av性久久久久蜜臀av麻豆| 国产视频一区二区在线| 欧美天堂亚洲电影院在线播放| 久久超级碰视频| 国产精品影视在线观看| 亚洲色图20p| 亚洲精品一区二区三区香蕉| 色综合久久88色综合天天| 美女精品一区二区| 玉足女爽爽91| 国产亚洲欧美色| 在线电影欧美成精品| 波多野结衣在线一区| 蜜臀精品一区二区三区在线观看| 成人欧美一区二区三区1314| 欧美一二三四在线| 在线观看视频一区二区欧美日韩| 国内精品不卡在线| 日韩国产成人精品| 亚洲午夜视频在线| 国产精品免费看片| 精品国产乱码久久久久久1区2区| 在线看国产一区| 丁香婷婷综合色啪| 精品写真视频在线观看| 亚洲成人av在线电影| 亚洲人成精品久久久久| 国产日韩精品一区二区浪潮av| 日韩亚洲欧美成人一区| 欧美日韩你懂得| 在线观看亚洲精品| 一本一道综合狠狠老| 国产成人精品亚洲777人妖| 国产在线一区二区| 看电视剧不卡顿的网站| 天使萌一区二区三区免费观看| 伊人色综合久久天天| 中文字幕一区二区三区精华液| 久久精品一区二区三区不卡牛牛| 日韩免费高清视频| 欧美一区2区视频在线观看| 欧美日韩在线不卡| 在线观看日韩高清av| 日本韩国一区二区三区视频| 97久久久精品综合88久久| 成人高清免费观看| av激情综合网| 97精品国产露脸对白| 99精品视频中文字幕| 色综合久久久久综合体| 91视频com| 在线视频国产一区| 欧美中文字幕不卡| 欧美日韩成人综合| 91精品国产91久久久久久最新毛片 | 成人av资源在线观看| 成人免费看视频| 99久久精品免费精品国产| 成人久久18免费网站麻豆| 99精品欧美一区二区三区小说| 99在线精品视频| 色婷婷综合久久久久中文| 欧美中文字幕一区二区三区| 6080亚洲精品一区二区| 日韩视频免费观看高清在线视频| 亚洲精品在线电影| 国产精品乱码人人做人人爱| 依依成人精品视频| 日韩在线卡一卡二| 国产伦精品一区二区三区在线观看| 国产一区二区在线观看免费| av亚洲产国偷v产偷v自拍| 欧美在线高清视频| 日韩欧美激情四射| 国产女主播视频一区二区| 亚洲欧美日韩国产一区二区三区 | 国产精品正在播放| 99综合电影在线视频| 欧美在线观看视频一区二区三区 | 日本道色综合久久| 欧美精品18+| 久久精品男人的天堂| 中文字幕一区二区三区不卡在线| 亚洲成人av福利| 国产中文字幕一区| 91成人在线观看喷潮| 欧美v日韩v国产v| 国产精品久久久久久福利一牛影视| 亚洲在线视频网站| 国产精品香蕉一区二区三区| 一本大道av伊人久久综合| 精品精品国产高清一毛片一天堂| 国产精品美女久久久久久| 日韩一区欧美二区| 成人av影院在线| 日韩欧美电影一区| 一区二区欧美视频| 国产成人精品免费| 欧美精品自拍偷拍| 国产精品成人一区二区三区夜夜夜| 五月天婷婷综合| 91亚洲精品一区二区乱码| 欧美videos中文字幕| 亚洲影视在线观看| 国产成人在线视频网址| 制服丝袜一区二区三区| 亚洲视频免费观看| 国产成人亚洲综合色影视| 欧美高清你懂得| 亚洲精品日韩一| 粉嫩13p一区二区三区| 日韩精品中文字幕一区二区三区 | 日本道精品一区二区三区| 久久久精品免费免费| 强制捆绑调教一区二区| 色妞www精品视频| 国产精品入口麻豆九色| 国产自产v一区二区三区c| 3atv一区二区三区| 香蕉成人伊视频在线观看| 91小视频在线免费看| 中文字幕va一区二区三区| 国内欧美视频一区二区| 日韩三级中文字幕| 午夜亚洲国产au精品一区二区| 91麻豆精品在线观看| 国产精品乱码人人做人人爱| 国产精品888| 久久无码av三级| 激情综合网av| 欧美精品一区二区三区很污很色的 | 丝袜亚洲精品中文字幕一区| 色综合天天性综合| 亚洲天堂久久久久久久| 成人激情动漫在线观看| 国产精品无码永久免费888| 国产麻豆日韩欧美久久| 久久丝袜美腿综合| 国产精品一区在线| 亚洲国产精品二十页| 丁香一区二区三区| 亚洲色图一区二区| 色久综合一二码| 亚洲国产综合在线| 在线播放91灌醉迷j高跟美女 | 欧美亚洲高清一区二区三区不卡| 亚洲欧美欧美一区二区三区| 94色蜜桃网一区二区三区| 亚洲男人的天堂一区二区| 欧美亚洲国产一区在线观看网站| 亚洲国产wwwccc36天堂| 欧美一区日韩一区| 国产一区二区三区高清播放| 国产欧美综合在线观看第十页| 成人精品免费网站| 亚洲精品中文字幕乱码三区| 欧美揉bbbbb揉bbbbb| 日韩和欧美一区二区| 26uuu色噜噜精品一区二区| 国产乱码字幕精品高清av | 91精品免费观看| 免费成人在线视频观看| 久久午夜色播影院免费高清| aaa欧美大片| 午夜精品一区二区三区免费视频| 日韩欧美国产综合一区 | 久久国产精品免费| 中文字幕欧美三区| 欧美日韩在线亚洲一区蜜芽|