plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | microsoft/ADBench-master | computeSize.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/computeSize.m | 458 | utf_8 | 7c9bd306075e5c533be8e3c9bf936a60 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function [sz] = computeSize(obj)
szd = size(obj.m_derivs);
if obj.m_ndd == 1
sz = szd;
else
sz = szd(1:end-1);
end
if length(sz) < 2
if sz(1) == 0
sz = [sz 0];
else
sz = [sz 1];
e... |
github | microsoft/ADBench-master | min.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/min.m | 292 | utf_8 | 7d96e7900a784ca463f34abc66b82192 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function [obj, mi] = min(obj)
[mv, mi] = min(obj.m_derivs{1});
for i=1:obj.m_ndd
obj.m_derivs{i} = obj.m_derivs{i}(mi);
end
end
% $Id: min.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | timesdv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/timesdv.m | 228 | utf_8 | a29167631e2f88162aab1fcab78b8afc | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = timesdv(obj, right)
obj = binopFlatdv(obj, right, @times);
end
% $Id: timesdv.m 4392 2014-06-03 07:41:31Z willkomm $
|
github | microsoft/ADBench-master | horzcat.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/horzcat.m | 234 | utf_8 | 295ec037f23dc61804fd46fa73fbd32c | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = horzcat(obj, varargin)
obj = cat(2, obj, varargin{:});
end
% $Id: horzcat.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | calln.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/calln.m | 780 | utf_8 | 2f6122659ffe741addc6355089576871 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = calln(handle, varargin)
if ismember(func2str(handle), methods(varargin{1}))
obj = handle(varargin{:});
else
nparm = nargin-1;
tmpc = cell(nparm, 1);
obj = arrdercont(varargin{1});
% ... |
github | microsoft/ADBench-master | minus.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/minus.m | 232 | utf_8 | 6023c53c06ecbee4ee2c5d11d8a36cd5 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function obj = minus(obj, right)
obj = binopFlat(obj, right, @minus);
end
% $Id: minus.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | arrdercont.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/arrdercont.m | 1,040 | utf_8 | 46bcfbf54f0efd30120500732c63bfff | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = arrdercont(val, ndd, method)
if nargin < 1
val = 0;
end
if isstruct(val)
obj = struct('m_ndd', val.m_ndd, 'm_size', val.m_size, 'm_derivs', val.m_derivs);
elseif isa(val, 'arrdercont')
o... |
github | microsoft/ADBench-master | ipermute.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/ipermute.m | 383 | utf_8 | 42c95bfd3f40943eaab8297c8eb8c60b | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = ipermute(obj, order)
obj.m_derivs = ipermute(reshape(obj.m_derivs, [obj.m_size obj.m_ndd]), [order 1]);
obj.m_size(order) = obj.m_size;
obj.m_derivs = reshape(obj.m_derivs, [prod(obj.m_size) obj.m_ndd... |
github | microsoft/ADBench-master | gt.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/gt.m | 211 | utf_8 | a2e2185536492cb620053c79fdbd9946 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = gt(obj, v)
res = cmpop(obj, v, @gt);
end
% $Id: gt.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | cat.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/cat.m | 577 | utf_8 | 1b124f494c8cef1ad91e8df4621a8cf4 | % This file is part of the ADiMat runtime environment
%
% Copyright 2014 Johannes Willkomm
%
function obj = cat(dim, obj, varargin)
objs = [{obj} varargin];
areempty = cellfun(@isempty, objs);
nempty = objs(~areempty);
if isempty(nempty)
obj = arrdercont([]);
else
obj = nempty{1};
dds = cellfun(@... |
github | microsoft/ADBench-master | sign.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/sign.m | 218 | utf_8 | 7f4e2773b7786968db798534cf1742e5 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = sign(obj)
[res] = sign(admGetDD(obj, 1));
end
% $Id: sign.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | diff.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/diff.m | 428 | utf_8 | 9d3f04e0106e93f406e974f47f41fc17 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = diff(obj, n, k)
if nargin < 2
n = 1;
end
if nargin < 3
k = adimat_first_nonsingleton(obj);
end
obj.m_derivs = diff(getder(obj, k), n, k);
obj.m_size = computeSize(obj);
obj.m_derivs = ... |
github | microsoft/ADBench-master | permute.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/permute.m | 380 | utf_8 | bb8452df3b03c1fc4296ca0428a629a9 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011-2014 Johannes Willkomm
%
function obj = permute(obj, order)
obj.m_derivs = permute(reshape(obj.m_derivs, [obj.m_size obj.m_ndd]), [order 1]);
obj.m_size = obj.m_size(order);
obj.m_derivs = reshape(obj.m_derivs, [prod(obj.m_size) obj.m_ndd])... |
github | microsoft/ADBench-master | ne.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/arrderivclassvxdd/@arrdercont/ne.m | 211 | utf_8 | 10bdf32461862e9dac1a017ff0429f74 | % This file is part of the ADiMat runtime environment
%
% Copyright 2011,2012,2013 Johannes Willkomm
%
function res = ne(obj, v)
res = cmpop(obj, v, @ne);
end
% $Id: ne.m 3862 2013-09-19 10:50:56Z willkomm $
|
github | microsoft/ADBench-master | adimat_repind.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_repind.m | 303 | utf_8 | cb7412fc313e0966b097cc62856ea433 | %
% function r = adimat_repind(nd, dim, len)
% generate vector of ones of size [1 nd] and set r(dim) = len
%
% This file is part of the ADiMat runtime environment
%
function r = adimat_repind(nd, dim, len)
r = ones(1, nd);
r(dim) = len;
% $Id: adimat_repind.m 1764 2010-02-25 19:05:10Z willkomm $
|
github | microsoft/ADBench-master | adimat_sumcell.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_sumcell.m | 592 | utf_8 | 4da6bc307ca26eecd1b88ca8cac80ac6 | % function res = adimat_sumscell(a, b)
% This computes the sum of cells a and b.
%
% see also admDiffRev, adimat_adjsum
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2009-2011 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University.
% Copyright 2003-2008 Andre ... |
github | microsoft/ADBench-master | g_sort.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_sort.m | 589 | utf_8 | 6349e012ff81353d088c531f2ba2abc4 | % function [g_s s P] = g_sort(g_s, s, varargin)
%
% Compute derivative of sort(s) given derivative of s, g_s.
%
% This file is part of the ADiMat runtime environment
%
% Copyright (C) 2015 Johannes Willkomm
function [g_s s P] = g_sort(g_s, s, varargin)
if nargin < 3 || ischar(varargin{1})
dim = adimat_first_nonsi... |
github | microsoft/ADBench-master | admMatMultV3TTc.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admMatMultV3TTc.m | 402 | utf_8 | ea0912132a2562cb23af4d9a65ff961e | % function Z = admMatMultV3TTa(A, B)
%
% see also admMatMultV3
%
% Copyright (C) 2014 Johannes Willkomm
%
function Z = admMatMultV3TTc(A, B)
% A is (m x n x k) tensor
% B is (n x p x k) matrix
szA = size(A);
szB = size(B);
Z = zeros(szA(1), szB(2), size(A,3));
for k=1:size(A,3)
Z(:,:,k) = A(:,:,k)... |
github | microsoft/ADBench-master | adimat_stack_async_io_type.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_stack_async_io_type.m | 1,536 | utf_8 | b5ce564a71230c754b347072cd7197b7 | % function r = adimat_stack_async_io_type(name?)
%
% get/set name of the stream type underlying the stacks
% "matlab-abuffered-file" and "octave-abuffered-file". This
% functionality is implemented by setting the environment variable
% ADIMAT_ASYNC_IO_TYPE.
%
% Available stream names are:
% - fstream: plain std::fstr... |
github | microsoft/ADBench-master | dpartial_log.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_log.m | 546 | utf_8 | 61c874081cc1e8c96236cdc282dc7dd6 | % function [dpartial y] = partial_log(x)
%
% Compute partial derivative diagonal of y = log(x).
%
% This returns the diagonal of the partial derivative. The partial
% derivative matrix can be obtained by using diag(partial).
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, F... |
github | microsoft/ADBench-master | adimat_adjsum.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_adjsum.m | 840 | utf_8 | c9b6b65f213244170a766050df832478 | % function r = adimat_adjsum(a, b)
% This computes the sum of to adjoints. This is needed as long as
% there is no plsu operator for structs, to handle recursive
% structs, adimat_sumstruct.
%
% see also admDiffRev, adimat_sumstruct, adimat_sumcell
%
% This file is part of the ADiMat runtime environment
%
% Copyr... |
github | microsoft/ADBench-master | admClassSupport.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admClassSupport.m | 538 | utf_8 | b4f4eddcf0e161330bc95d732ef3db0c | % function res = admClassSupport()
%
% This function returns true if run either
%
% - in the Matlab interpreter
% - in the Octave interpreter version 3.6 or higher
%
% Copyright 2013 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
%
% This file is part of the ADiMat runtime... |
github | microsoft/ADBench-master | adimat_g_svd.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_g_svd.m | 2,490 | utf_8 | bc3617847e0414508896e432bf023a99 | % function [g_U U g_S S g_V V] = adimat_g_svd(g_A, A)
%
% When called with 2 output arguments, compute derivatives of s in s =
% svd(A).
%
% When called with 6 output arguments, compute derivatives of U, S,
% and V in [ U S V ] = svd(A).
%
% Also return the function result.
%
% Using the method from Mike Giles, "An ext... |
github | microsoft/ADBench-master | adimat_max1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_max1.m | 939 | utf_8 | cf5b2b33d8a48150a4500935572e950f | %
% function r = adimat_max1(val, adj)
% this determines the adjoint value of max(val),
% where the adjoint of val is given as parameter adj
%
% see also adimat_allsum, adimat_adjmultl, adimat_adjmultr
%
% This file is part of the ADiMat runtime environment
%
function r = adimat_max1(val, adj)
[mv, mi] = max(val... |
github | microsoft/ADBench-master | a_diff.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_diff.m | 778 | utf_8 | cc12a62595e07c8e1b430a2da5731c4d | % function a_x = a_diff(a_z, x, n?, i?)
%
% Compute adjoint x in z = diff(x, n, i) from a_z.
%
% see also a_zeros, a_sum
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function a_x = a_diff(a_z, x, n, di... |
github | microsoft/ADBench-master | adimat_push_field.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_push_field.m | 568 | utf_8 | e57c44b49591dfb5dca49ae29eab6ff3 | % function r = adimat_push_field(structVar, fieldName)
% Store values given by structVar.(fieldName) on the stack, if this
% field exists, and pushes a scalar 0, otherwise pushes 1.
%
% see also adimat_pop_field, adimat_push_index, adimat_push,
% adimat_store
%
% This file is part of the ADiMat runtime environment
... |
github | microsoft/ADBench-master | a_adimat_chol2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_chol2.m | 13,011 | utf_8 | e33b83ed84c7c7f8de575d68ae62873a | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | g_eigs2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_eigs2.m | 658 | utf_8 | a9a4fbaa8b0ff1f02fc07795cde75d0a | % function [g_V, V, g_D, D]= g_eigs2(g_A, A, k?, sigma?, opts?)
%
% This file is part of the ADiMat runtime environment
%
% Copyright (C) 2015 Johannes Willkomm
function [g_U, U, g_D, D] = g_eigs2(g_A, A, varargin)
[V D U] = adimat_lreigs(A, varargin{:});
k = size(U, 2);
I = eye(size(A));
g_U = g_zeros(size... |
github | microsoft/ADBench-master | a_adimat_norm2_p2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_norm2_p2.m | 15,827 | utf_8 | 8bdfcc91644aaea825ef3ebc7830c788 | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | admTransformParameters.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admTransformParameters.m | 3,170 | utf_8 | 46c9cd8bb75ecfeaea7590df93deea1a | % function r = admTransformParameters(name1, value1, name2, value2, ...)
%
% see also admOptions
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2009-2011 Johannes Willkomm, Institute for Scientific Computing
% Copyright 2001-2009 Andre Vehreschild, Institute for Scientific Computing
% ... |
github | microsoft/ADBench-master | admMergeArgs.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admMergeArgs.m | 863 | utf_8 | 6aa2644df25ba7ec553392c094d10c28 | % function [dfargs] = admMergeArgs(derivArgs, funcArgs, independents)
%
% see also admDiffRev, admDiffVFor, admTransform, createFullGradients,
% createSeededGradients, admJacFor, admOptions, adimat_derivclass.
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2010,2011 Johannes Willkomm, Institute ... |
github | microsoft/ADBench-master | a_funm.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_funm.m | 590 | utf_8 | 54b18c37acf35d60e5794c46a73a3e3c | % function [a_x] = a_funm(a_z, x)
%
% Compute adjoint of x in z = funm(x), matrix exponential, given the
% adjoint of z.
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2012 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function [a_x] = a_funm(a_z, x, ha... |
github | microsoft/ADBench-master | a_adimat_pinv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_pinv.m | 85,795 | utf_8 | 8ee1e1f766f64eef50f23100335dc818 | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | adimat_diff.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_diff.m | 647 | utf_8 | 0497937fd78e44eeb73b5a55de7e4435 | % function [r] = adimat_diff2(x, n, dim)
%
% ADiMat replacement function for diff
%
% see also diff
%
% Copyright (C) 2014,2015 Johannes Willkomm <johannes@johannes.willkomm.de>
function [z] = adimat_diff(x, n, dim)
if nargin < 2
n = 1;
end
if nargin < 3
dim = adimat_first_nonsingleton(x);
end
a... |
github | microsoft/ADBench-master | admMatMultV1MT.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admMatMultV1MT.m | 463 | utf_8 | d47268b5559e2e29f60f14cc7688ecd0 | % function Z = admMatMultV1MT(A, B)
%
% see also admMatMultV1
%
% Copyright (C) 2014 Johannes Willkomm
%
function Z = admMatMultV1MT(A, B)
% A is (m x n) matrix
% B is (k x n x p) tensor
szA = size(A);
szB = size(B);
if szB(2) == 1
Z = admMatMultV1MTp(A, B);
elseif szB(1) < szB(3)
Z ... |
github | microsoft/ADBench-master | d_adimat_cumtrapz.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/d_adimat_cumtrapz.m | 8,246 | utf_8 | ce65022157e0eeac54592b2fed1fd05e | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | adimat_derivclass.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_derivclass.m | 5,421 | utf_8 | 38a45ef3ead52ff5de94660e8f6b2c15 | % function r = adimat_derivclass(name)
% get/set name of ADiMat's derivative class implementation.
% This functionality is implemented by modifying the path() such
% that different versions of the function adimat_store are used.
%
% Since version 3.6, Octave does also support classes, so these can
% now also ... |
github | microsoft/ADBench-master | g_adimat_chol.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_adimat_chol.m | 4,162 | utf_8 | 8320034b7d75b3709fd22348c7ee3187 | % Generated by ADiMat 0.6.0-4867
% Copyright 2009-2013 Johannes Willkomm, Fachgebiet Scientific Computing,
% TU Darmstadt, 64289 Darmstadt, Germany
% Copyright 2001-2008 Andre Vehreschild, Institute for Scientific Computing,
% RWTH Aachen University, 52056 Aachen, Germany.
% Visit us on the web at http://www.adimat.de
... |
github | microsoft/ADBench-master | dpartial_sech.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_sech.m | 432 | utf_8 | 9ef86cef04fe83edf3135d505d5e31a4 | % function [dpartial y] = dpartial_sech(x)
%
% Compute partial derivative diagonal of y = sech(x).
%
% see also dpartial_exp.
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Fachgebiet Scientific Computing
% TU Darmstadt
function [dpartial y] = dpartial_... |
github | microsoft/ADBench-master | adimat_adjreshape.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_adjreshape.m | 659 | utf_8 | 7a0e24b1c5529bc638e08fb5f5efc11f | %
% function r = adimat_adjreshape(val, adj)
% This determines the adjoint value of val, given as parameter adj.
%
% If val is a scalar return adj,
% otherwise return adj, reshaped to size(val), if necessary.
%
% see also adimat_adjred
%
% This file is part of the ADiMat runtime environment
%
function adj = adima... |
github | microsoft/ADBench-master | a_zeros1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_zeros1.m | 644 | utf_8 | 52d8c194a3bd74accd554787398394bf | % function adj = a_zeros1(v)
%
% Create zero adjoints. This function creates zero derivatives of
% class double, by calling the function zeros. These adjoints are used
% in scalar reverse mode.
%
% see also zeros, adimat_adjoint
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2011 Johannes Willkom... |
github | microsoft/ADBench-master | adimat_adjsol.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_adjsol.m | 1,355 | utf_8 | faf0940574613713eecf281079dae1c2 | % function [a_a, a_b, z] = adimat_a_mldivide(a, b, a_z)
%
% Compute adjoints a_a and a_b of z = a \ b, matrix left
% division. Also return the function result z.
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2012-2014 Johannes Willkomm
%
function [a_a, a_b, z] = adimat_a_mldivide(a, b, a_z)
[... |
github | microsoft/ADBench-master | adimat_stack_num_buffers.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_stack_num_buffers.m | 1,381 | utf_8 | 478e8697a34a0b8fde16f820e7672052 | % function r = adimat_stack_num_buffers(num?)
%
% get/set the number sub buffers to split the stack memory buffer
% into. This functionality is implemented by setting the environment
% variable ADIMAT_STACK_NUM_BUFFERS. This setting applies to all stack
% implementations with "abuffered" in their name. There will be
% ... |
github | microsoft/ADBench-master | a_adimat_fftconv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_fftconv.m | 14,410 | utf_8 | 7844a1d2b999f712c1ead433b16ba7d2 | % Generated by ADiMat 0.6.2-5249 (10432437)
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2015 Johannes Willkomm <johannes@johannes-willkomm.de>
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to johannes@johannes-willkomm.de
%
% ... |
github | microsoft/ADBench-master | admCreateCompressedSeed.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admCreateCompressedSeed.m | 560 | utf_8 | d44e355bc54f901f8fcfa4e7e7571ef2 | %
% function [seed] = admCreateCompressedSeed(coloring)
%
% Create a sparse seed matrix from color vector.
%
% Copyright 2011 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
%
% This file is part of the ADiMat runtime environment
%
function [seed] = admCreateCompr... |
github | microsoft/ADBench-master | mk_householder_elim.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/mk_householder_elim.m | 312 | utf_8 | 0a60cbe6431142b4d63fa55f42092e9a | % function Pk = mk_householder_elim(A, i, j)
%
% Compute Pk such that the column under A(i, j), u = A(i:end, j), is
% eliminated, replaced by [norm(u); 0; ...], in Pk'*A*Pk.
%
function Pk = mk_householder_elim(A, i, j)
n = size(A,1);
uk = A(i:n,j);
Pk = mk_householder_elim_vec_lapack(uk, n);
end
% $Id%
|
github | microsoft/ADBench-master | g_adimat_pinv2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_adimat_pinv2.m | 2,732 | utf_8 | 19934e701646ba23682f6fd394896d2f | % Generated by ADiMat 0.6.0-4867
% Copyright 2009-2013 Johannes Willkomm, Fachgebiet Scientific Computing,
% TU Darmstadt, 64289 Darmstadt, Germany
% Copyright 2001-2008 Andre Vehreschild, Institute for Scientific Computing,
% RWTH Aachen University, 52056 Aachen, Germany.
% Visit us on the web at http://www.adimat.de
... |
github | microsoft/ADBench-master | a_interp1_1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_interp1_1.m | 538 | utf_8 | ac8b7e472d3717211c00c828661a7f8c | % function adj = a_interp1_1(adj, xs, ys, xis, varargin)
% compute adjoint of xs in interp1(xs, ys, xis, ...)
%
% see also a_zeros, a_sum
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function adj = a... |
github | microsoft/ADBench-master | adimat_sqrtm_triu.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_sqrtm_triu.m | 864 | utf_8 | c75e6cb72c0a3334c8c3cdff2931eb32 | % function [R] = adimat_sqrtm_triu(T)
%
% Compute R = sqrtm(T) of an upper triangular matrix T, as described
% in "A Schur method for the Square Root of a Matrix", Åke Björck,
% 1982.
%
% This function is used by adimat_sqrtm and adimat_logm.
%
% see also adimat_sqrtm, adimat_logm.
%
% This file is part of the ADiMat ... |
github | microsoft/ADBench-master | d_adimat_sol_ata.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/d_adimat_sol_ata.m | 3,372 | utf_8 | d4ae4c60699d493c9b0aa402ab5fb950 | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | adimat_pop1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_pop1.m | 302 | utf_8 | 2bafc7b6f811ae65cbecc5ab43f80d3b | % function r = adimat_pop1()
% pop value from stack
%
% see also adimat_push, adimat_store, adimat_clear_stack, adimat_stack_size
%
% This file is part of the ADiMat runtime environment
%
function obj = adimat_pop1()
obj = adimat_store(0);
% $Id: adimat_pop1.m 4220 2014-05-16 12:57:30Z willkomm $
|
github | microsoft/ADBench-master | adimat_safediag.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_safediag.m | 369 | utf_8 | 18c016ffff1d2ca68b48e77bd633662f | % function v = adimat_safediag(M)
%
% Save diag: assuming input is a matrix, return diagonal.
%
% Copyright 2012,2013 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function v = adimat_safediag(M)
if isvector(M)
v = M(1);
else
v = diag(M);
end
end
% $Id: adimat... |
github | microsoft/ADBench-master | a_eigs_01_31.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_eigs_01_31.m | 415 | utf_8 | 1469ecdae1fcd243ae8e9e2d09510f6e | % function a_A = a_eigs_01_31(a_U, a_D, A, k?, sigma?)
%
% Compute adjoint of A in [V D] = eig(A), given adjoint of D.
%
% This file is part of the ADiMat runtime environment
%
% Copyright (C) 2015 Johannes Willkomm
function a_A = a_eigs_01_31(a_D, A, varargin)
[V D U] = adimat_lreigs(A, varargin{:});
a_A = V.' * c... |
github | microsoft/ADBench-master | admHessian.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admHessian.m | 4,166 | utf_8 | 5af282992a0e10dd3b24009e7f3a939b | % function [Hessian, Jac, varargout] = admHessian(handle, seedMatrix, ...
% arg1, arg2, ..., argN, admOptions?)
%
% Compute second order derivatives of function given by handle,
% evaluated at the arguments arg1, arg2, ..., argN and return the
% Hessian matrix. Options can be passed as ... |
github | microsoft/ADBench-master | adimat_g_mrdivide1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_g_mrdivide1.m | 698 | utf_8 | b45796fc12decffc92b7e7b3dc5f8ae0 | % function [g_z z] = adimat_g_mrdivide1(g_a, a, b)
%
% Compute derivative of z = a / b, matrix right division, with b
% constant. Also return the function result z.
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2013 Johannes Willkomm, Institute for Scientific Computing
% TU ... |
github | microsoft/ADBench-master | adimat_ppder.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_ppder.m | 662 | utf_8 | 442af5ad03e81a09f9f453ea47cba0d0 | % function [dpp] = adimat_pder(pp)
%
% Create struct of differentiated piecewise polynomials, given struct
% describing piecewise differentiated polynomials, as generated for
% example by interp1(..., 'pp').
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Institute for S... |
github | microsoft/ADBench-master | adimat_g_linsolve.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_g_linsolve.m | 1,172 | utf_8 | e70876787e9f34cb9ac400d3c91c8c7a | % function [g_z z] = adimat_g_linsolve(g_a, a, g_b, b, ops)
%
% Compute derivative of z = linsolve(a, b, opts), linear system
% solving, similar to matrix left division. Also return the function
% result z.
%
% see also adimat_g_mldivide
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2013 Johann... |
github | microsoft/ADBench-master | adimat_d_linsolve.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_d_linsolve.m | 1,453 | utf_8 | 8544f88797b0081def09d30e8b469679 | % function d_res = adimat_d_linsolve(d_val1, val1, d_val2, val2, varargin)
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function [d_res res r] = adimat_d_linsolve(d_val1, val1, d_val2, val2, varargi... |
github | microsoft/ADBench-master | a_mean.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_mean.m | 542 | utf_8 | dbc1884ee2a85429f1459c9ccf480468 | % function adj = a_mean(val, adj, dimind?)
% compute adjoint of mean(val, dimind?)
%
% see also a_zeros, a_sum
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2010,2011 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
function adj = a_mean(adj, v... |
github | microsoft/ADBench-master | dpartial_log2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_log2.m | 563 | utf_8 | fcf5dbbd0558a65714e9346d0e5f0827 | % function [dpartial y] = partial_log2(x)
%
% Compute partial derivative diagonal of y = log2(x).
%
% This returns the diagonal of the partial derivative. The partial
% derivative matrix can be obtained by using diag(partial).
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm,... |
github | microsoft/ADBench-master | dpartial_atand.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_atand.m | 482 | utf_8 | f8d7df44b11ff506c81bd206fc3744c9 | % function [dpartial y] = dpartial_atand(x)
%
% Compute partial derivative diagonal of y = atand(x).
%
% see also dpartial_exp.
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Fachgebiet Scientific Computing
% TU Darmstadt
function [dpartial y] = dpartia... |
github | microsoft/ADBench-master | a_adimat_sol_tril.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_sol_tril.m | 6,507 | utf_8 | e99d2958491591ad928fab9ea48b006d | % Generated by ADiMat 0.6.0-4788
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | a_interp1_3.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_interp1_3.m | 540 | utf_8 | 2ce1b9af8d9d8a3b2eb917163eeb4277 | % function adj = a_interp1_3(adj, xs, ys, xis, varargin)
% compute adjoint of xis in interp1(xs, ys, xis, ...)
%
% see also a_zeros, a_sum
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function adj = ... |
github | microsoft/ADBench-master | dpartial_acscd.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_acscd.m | 480 | utf_8 | b7993248079c74a52fe5519a764379d2 | % function [dpartial y] = dpartial_acscd(x)
%
% Compute partial derivative diagonal of y = acscd(x).
%
% see also dpartial_exp.
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Fachgebiet Scientific Computing
% TU Darmstadt
function [dpartial y] = dpartia... |
github | microsoft/ADBench-master | dpartial_besselj.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_besselj.m | 508 | utf_8 | 7dedd03cd4052cd0a6337896e35a51c5 | % function [dz, z] = dpartial_besselj(nu, x, opt?)
%
% Compute partial derivative diagonal of z = besselj(nu, x, opt)
% w.r.t. x.
%
% see also dpartial_bessel, dpartial_exp.
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Fachgebiet Scientific Computing
% ... |
github | microsoft/ADBench-master | a_linsolve1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_linsolve1.m | 1,579 | utf_8 | ef1442fe1b9f0d0699ad8ff1235b77bd | % function [a_a] = a_linsolve1(a_z, a, b, opts?)
%
% Compute adjoint of a in z = linsolve(a, b, opts), linear system
% solving.
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2013,2014 Johannes Willkomm
%
function [a_a] = a_linsolve1(a_z, a, b, varargin)
[m n] = size(a);
opts = struct;
if... |
github | microsoft/ADBench-master | a_adimat_fftconv2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_fftconv2.m | 15,176 | utf_8 | 2f6227dcb93fa4135e072a564e9c422a | % Generated by ADiMat 0.6.2-5249 (10432437)
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2015 Johannes Willkomm <johannes@johannes-willkomm.de>
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to johannes@johannes-willkomm.de
%
% ... |
github | microsoft/ADBench-master | a_eigs_1_31.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_eigs_1_31.m | 619 | utf_8 | a1e5cbd7945e496304e69978dda80ae3 | % function a_A = a_eig_1_11(a_l, A)
%
% Compute adjoint of A in l = eig(A), given adjoint of l.
%
% see also a_eig_10_11, a_eig_01_11, a_eig_11_11
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function ... |
github | microsoft/ADBench-master | adimat_stack_prefetch.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_stack_prefetch.m | 1,025 | utf_8 | a8f8021fc4047f297c4055095ca676a1 | %
% function r = adimat_stack_prefetch(n?)
%
% get/set number of buffer items to prefetch asynchronously.
% This functionality is implemented by setting the environment
% variable ADIMAT_STACK_PREFETCH. This setting applies only to those
% stack implementations with "abuffered" in their name.
%
% adimat_stack_prefetch(... |
github | microsoft/ADBench-master | admCheckTransformedFileExists.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admCheckTransformedFileExists.m | 927 | utf_8 | 8b84e08cc170eb21d3559b5a5112f673 | % function [r, newerList] = admCheckTransformedFileExists(functionName)
%
% Copyright 2011 Johannes Willkomm, Institute for Scientific Computing
% RWTH Aachen University
% Copyright 2017 Johannes Willkomm
%
% This file is part of the ADiMat runtime environment.
%
function [r, newerList] = admCheckTr... |
github | microsoft/ADBench-master | d_eig_F.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/d_eig_F.m | 537 | utf_8 | a3f43bfaf36d64afabbc1d034146fdca | % function F = d_eig_F(d)
%
% Compute matrix F needed in differentitation of eig.
%
% see also a_eig11, a_eig21, a_eig22
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function F = d_eig_F(d)
n = le... |
github | microsoft/ADBench-master | partial_funm.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/partial_funm.m | 1,284 | utf_8 | 2a2ae57d87d81aebf5207699b2bb188d | % function [partial z exitflag output] = partial_funm(x, handle, base, options)
%
% [partial z] = partial_funm(x, handle, base) computes partial
% derivative of z = funm(x, handle). Also returns the function result
% z.
%
% [partial z] = partial_funm(x, handle, base, options) compute partial
% derivative of z = funm(x,... |
github | microsoft/ADBench-master | a_eig_11_11.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_eig_11_11.m | 690 | utf_8 | 38be94e64df347bc9a0f782e0f0ba2fa | % function a_A = a_eig11(a_V, a_D, A)
%
% Compute adjoint of A in [V D] = eig(A), given adjoints of V and D.
%
% see also a_eig_01_11, a_eig_10_11, a_eig_1_11
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Institute for Scientific Computing
% TU Darmsta... |
github | microsoft/ADBench-master | adimat_trapz.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_trapz.m | 1,595 | utf_8 | 00e0ebc6cee574ce89ffadeefc614cfc | % function z = adimat_trapz(varargin)
%
% ADiMat replacement function for trapz
%
% Copyright (C) 2015 Johannes Willkomm
function z = adimat_trapz(a, b, c)
if nargin == 1
% trapz(Y)
z = adimat_trapz_uni1(a);
elseif nargin == 2
if isscalar(b)
% trapz(Y, dim)
z = adimat_trapz_uni2(a, b);
e... |
github | microsoft/ADBench-master | d_adimat_pinv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/d_adimat_pinv.m | 18,220 | utf_8 | fc0bed04df8ed942eb18256138993479 | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | admMatMultV3TTb.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admMatMultV3TTb.m | 457 | utf_8 | 8896d7c832117512393252317037d5b7 | % function Z = admMatMultV3TTb(A, B)
%
% see also admMatMultV3
%
% Copyright (C) 2014 Johannes Willkomm
%
function Z = admMatMultV3TTb(A, B)
% A is (m x n x k) tensor
% B is (n x p x k) matrix
szA = size(A);
szB = size(B);
Z = zeros(szA(1), szB(2), size(A,3));
for k=1:szB(2)
T = bsxfun(@times, A, ... |
github | microsoft/ADBench-master | a_svd_100.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_svd_100.m | 1,680 | utf_8 | 1451f007ed9a659d7e252177851c8b44 | % function [a_A U S V] = a_svd_100(a_U, A)
%
% Compute adjoint of A in [ U S V ] = svd(A), where a_U is the
% adjoints of U.
%
% Using the method from Mike Giles, "An extended collection of matrix
% derivative results for forward and reverse mode algorithmic
% differentiation", 2008, adding in the homework that was lef... |
github | microsoft/ADBench-master | a_adimat_fftconv_1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_fftconv_1.m | 13,829 | utf_8 | 71dbfc368f1f2baca801ccc2d1c7384e | % Generated by ADiMat 0.6.2-5249 (10432437)
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2015 Johannes Willkomm <johannes@johannes-willkomm.de>
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to johannes@johannes-willkomm.de
%
% ... |
github | microsoft/ADBench-master | a_permute.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_permute.m | 228 | utf_8 | aad95869432f3eafd3f1bb2ea50ab2f7 | % function adj = a_permute(adj, ind, a, b)
%
% Copyright (C) 2015 Johannes Willkomm
function adj = a_permute(adj, ind, a, b)
switch ind
case 1
adj = ipermute(adj, b);
otherwise
adj = a_zeros(0);
end
end
% $Id$
|
github | microsoft/ADBench-master | admMatMultV1TTc.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admMatMultV1TTc.m | 420 | utf_8 | 7f9248688fc6dd66a2df4d8c7cf0743f | % function Z = admMatMultV1TTc(A, B)
%
% see also admMatMultV1
%
% Copyright (C) 2014 Johannes Willkomm
%
function Z = admMatMultV1TTc(A, B)
% A is (k x m x n) tensor
% B is (k x n x p) tensor
szA = size(A);
szB = size(B);
Z = zeros(szA(1), szA(2), szB(3));
for k=1:szA(1)
Z(k,:,:) = shiftdim(A(k,:... |
github | microsoft/ADBench-master | g_besseli.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/g_besseli.m | 612 | utf_8 | 1ab44fa7ada2c043799534ca7da6a852 | % function [z, g_z] = g_besseli(nu, g_x, x, opt?)
%
% compute the derivative of z in z = besseli(nu, x, opt?), where g_x
% is the derivative of x.
%
% see also dpartial_besseli
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Fachgebiet Scientific Computing
% ... |
github | microsoft/ADBench-master | a_zeros_index.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_zeros_index.m | 974 | utf_8 | 26bc0631970825896a608392b6e39397 | % function r = a_zeros_index(adjArrayVar, arrayVar, index1, ...)
% Zero adjoint of index expression after assignment. If the forward
% assignment changed the size of the array variable, then maybe
% resize the adjoint here, undoing the size change. If the size did
% not change then fill the indexed adjoint wit... |
github | microsoft/ADBench-master | a_polyval1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_polyval1.m | 546 | utf_8 | a611eceb85c56451074508c98826aed2 | % function [a_p] = a_polyval(a_z, p, x)
%
% Compute adjoint of p in z = polyval(p, x), polynomial p(x), given
% the adjoint of z.
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2012 Johannes Willkomm, Institute for Scientific Computing
% TU Darmstadt
function [a_p z] = a_poly... |
github | microsoft/ADBench-master | dpartial_acsc.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_acsc.m | 483 | utf_8 | 72b0537e2795bb4dc2b024c6f6a3e9b3 | % function [dpartial y] = dpartial_acsc(x)
%
% Compute partial derivative diagonal of y = acsc(x).
%
% see also dpartial_exp.
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Fachgebiet Scientific Computing
% TU Darmstadt
function [dpartial y] = dpartial_... |
github | microsoft/ADBench-master | a_adimat_trapz_i1.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_trapz_i1.m | 22,244 | utf_8 | 831523de0cb613bee8dc6c5ec137366e | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | admStackOptions.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/admStackOptions.m | 2,279 | utf_8 | 82e7c1641eb9a09df49207a3be1a1288 | % function r = admStackOptions(name1, val1, name2, val2, ...)
%
% Create structure with fields determining stack options. This is the
% field 'stack' of admOptions. It is given to the function
% adimat_setup_stack. The arguments are alternating names and values
% and are used to set initially fields of the structure.
%... |
github | microsoft/ADBench-master | a_adimat_pinv2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_adimat_pinv2.m | 85,089 | utf_8 | 2cbe18972795b29186541e3459a30fcd | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | adimat_stack_mpi_file_info.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_stack_mpi_file_info.m | 843 | utf_8 | 4bf58c04654bd9933eedf6f807569f3d | % function r = adimat_stack_mpi_file_info(s)
%
% Set the MPI_Info fields used for opening the MPI_File.
%
% see also admMPIFileInfo, admStackOptions, admOptions
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% Copyright 2001-2009 An... |
github | microsoft/ADBench-master | adimat_g_pow_left.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_g_pow_left.m | 1,255 | utf_8 | 867a4c5fff18fa3a80999e5567f68876 | % function [g_z z] = adimat_g_pow_left(g_a, a, b)
%
% Compute derivative of z = a^b, matrix exponentiation. Also return
% the function result z. This a special version for constant b.
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
%... |
github | microsoft/ADBench-master | addiff.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/addiff.m | 620 | utf_8 | 90aff1c4307d25a5fbfb348f9ad158c7 | % function [success, msg]=addiff(fname, indeps, deps, flags, debug)
%
% Differentiate function fname using ADiMat. This function is
% deprecated, please use admTransform instead.
%
% see also admTransform, admDiffFor, admDiffRev
%
% This file is part of the ADiMat runtime environment
%
function [success, msg] = addiff(... |
github | microsoft/ADBench-master | adimat_push.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_push.m | 429 | utf_8 | fd474a718c3b6b752b435e377a2cf4e8 | % function r = adimat_push(v)
% store values on stack, return new size of stack
%
% see also adimat_store, adimat_pop, adimat_clear_stack, adimat_stack_size
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2010-2014 Johannes Willkomm
%
function r = adimat_push(varargin)
for i=1:nargin
obj =... |
github | microsoft/ADBench-master | a_svd_111.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/a_svd_111.m | 3,027 | utf_8 | 7113d9865ec90ed68b4e654bf4ffc358 | % function [a_A U S V] = a_svd_111(a_U, a_S, a_V, A)
%
% Compute adjoint of A in [ U S V ] = svd(A), where a_U, a_S, and a_V
% are the adjoints of U, S, and V, resp.
%
% Using the method from Mike Giles, "An extended collection of matrix
% derivative results for forward and reverse mode algorithmic
% differentiation", ... |
github | microsoft/ADBench-master | adimat_missing_derivative_value.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_missing_derivative_value.m | 839 | utf_8 | b66d3349172d9329127d52bfaaceb247 | % function res = adimat_missing_derivative_value()
%
% Return a number that represents the derivative at a point where it
% is not defined. This function returns 0.
%
% Typically, when the runtime functions detect a case where a
% derivative is to be evaluated at a point where no derivative exists,
% a zero derivativ... |
github | microsoft/ADBench-master | adimat_init.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_init.m | 336 | utf_8 | 27c9a1f061b26535c6f06e6ae8c05cdc | % function obj = adimat_init(template, value)
%
% Create object with value of the same type as template.
%
% Copyright (C) 2014 Johannes Willkomm
%
function obj = adimat_init(template, value)
if isa(template, 'tseries')
obj = tseries(value);
else
obj = value;
end
% $Id: adimat_init.m 4007 2014-01-13 10:14... |
github | microsoft/ADBench-master | d_adimat_norm2_i2.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/d_adimat_norm2_i2.m | 5,486 | utf_8 | 92a0f01615a13f38467b7eb659c70e25 | % Generated by ADiMat 0.6.0-4867
% © 2001-2008 Andre Vehreschild <vehreschild@sc.rwth-aachen.de>
% © 2009-2013 Johannes Willkomm <johannes.willkomm@sc.tu-darmstadt.de>
% RWTH Aachen University, 52056 Aachen, Germany
% TU Darmstadt, 64289 Darmstadt, Germany
% Visit us on the web at http://www.adimat.de/
% Report bugs to... |
github | microsoft/ADBench-master | dpartial_acos.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_acos.m | 464 | utf_8 | b2a2281e1ed133f0543a27f5cc08537e | % function [dpartial y] = dpartial_acos(x)
%
% Compute partial derivative diagonal of y = acos(x).
%
% see also dpartial_exp.
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Fachgebiet Scientific Computing
% TU Darmstadt
function [dpartial y] = dpartial_... |
github | microsoft/ADBench-master | dpartial_asind.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/dpartial_asind.m | 482 | utf_8 | 815c0d5ec61003e2b88a52bfb42fb690 | % function [dpartial y] = dpartial_asind(x)
%
% Compute partial derivative diagonal of y = asind(x).
%
% see also dpartial_exp.
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2012 Johannes Willkomm, Fachgebiet Scientific Computing
% TU Darmstadt
function [dpartial y] = dpartia... |
github | microsoft/ADBench-master | adimat_stack_verbosity.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_stack_verbosity.m | 1,378 | utf_8 | 116fdb83665edd5069fd2ec8a1b8c318 | % function r = adimat_stack_verbosity(level?)
%
% get/set name stack implementations verbosity level. This
% functionality is implemented by setting the environment variable
% ADIMAT_STACK_VERBOSITY. This setting applies to all stack
% implementations written in C/C++, i.e. with either "matlab" or
% "octave" in their n... |
github | microsoft/ADBench-master | adimat_adjdivl.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/adimat_adjdivl.m | 574 | utf_8 | 5e180c4b3db016e448dbb63939228355 | % function adj = adimat_a_mrdividel(divident, divisor, adj)
%
% This determines the adjoint of divident in expr = divident / divisor
% where adj is the adjoint of expr.
%
% see also adimat_a_mldivider
%
% This file is part of the ADiMat runtime environment.
%
% Copyright 2010-2014 Johannes Willkomm
%
function adj = adi... |
github | microsoft/ADBench-master | tay_zerosv.m | .m | ADBench-master/submodules/adimat-0.6.2-5288/runtime/tay_zerosv.m | 761 | utf_8 | 2fee964295a620f719fbf2d763f0a03e | % function varargout = a_zeros(varargin)
%
% Create zero adjoints. This function creates zero derivative objects
% of the current derivative class selected with adimat_derivclass, by
% calling the function g_zeros. These adjoints are used in vector
% reverse mode.
%
% see also g_zeros, adimat_derivclass, adimat_adjoint... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.