/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 2003-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Phong Vo <[email protected]> *17* Glenn Fowler <[email protected]> *18* *19***********************************************************************/20#include "vctest.h"2122#define NCOLS 160023#define NROWS 20002425int main()26{27int i, j;28Vcchar_t matrix[NROWS][NCOLS], trans[NCOLS][NROWS], *tr;29Vcodex_t *vc;3031for(i = 0; i < NROWS; ++i)32for(j = 0; j < NCOLS; ++j)33{ matrix[i][j] = 'a' + (i+j)%26;34trans[j][i] = 'a' + (i+j)%26;35}3637if(!(vc = vcopen(0, Vctranspose, "0", 0, VC_ENCODE)) )38terror("Cannot open Vctranspose handle");3940vcsetmtarg(vc, "columns", (Void_t*)1600, 2);41if((i = vcapply(vc, matrix, sizeof(matrix), &tr)) != sizeof(matrix) )42terror("Vctranspose failed");4344if(memcmp(&trans[0][0], tr, sizeof(trans)) != 0)45terror("Bad data");4647exit(0);48}495051