doublereal dzasum_(integer *n, doublecomplex *zx, integer *incx) { /* System generated locals */ integer i__1; doublereal ret_val; /* Local variables */ static integer i; static doublereal stemp; extern doublereal dcabs1_(doublecomplex *); static integer ix; /* takes the sum of the absolute values. jack dongarra, 3/11/78. modified 3/93 to return if incx .le. 0. modified 12/3/93, array(1) declarations changed to array(*) Parameter adjustments Function Body */ #define ZX(I) zx[(I)-1] ret_val = 0.; stemp = 0.; if (*n <= 0 || *incx <= 0) { return ret_val; } if (*incx == 1) { goto L20; } /* code for increment not equal to 1 */ ix = 1; i__1 = *n; for (i = 1; i <= *n; ++i) { stemp += dcabs1_(&ZX(ix)); ix += *incx; /* L10: */ } ret_val = stemp; return ret_val; /* code for increment equal to 1 */ L20: i__1 = *n; for (i = 1; i <= *n; ++i) { stemp += dcabs1_(&ZX(i)); /* L30: */ } ret_val = stemp; return ret_val; } /* dzasum_ */
static int bloch_jacobian(long int N, realtype t, N_Vector M, N_Vector fM, DlsMat J, void *user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { struct bloch_sim *bs = (struct bloch_sim*)user_data; int i; for (i=0; i < bs->num_cells; ++i) { realtype dw = bs->cell_frequencies[i] - bs->w_avg; realtype w_1 = bs->rf_on ? bs->w_1 : 0.0; XX(J,i) = -1 / bs->T_2; XY(J,i) = dw; XZ(J,i) = 0.0; YX(J,i) = -dw; YY(J,i) = -1 / bs->T_2; YZ(J,i) = w_1; ZX(J,i) = 0.0; ZY(J,i) = -w_1; ZZ(J,i) = -1 / bs->T_1; } return 0; }
std::string Ioss::Asym_Tensor_03::label(int which, const char) const { assert(which > 0 && which <= component_count()); switch(which) { case 1: return XY(); case 2: return YZ(); case 3: return ZX(); default: return ""; } }
std::string Ioss::Full_Tensor_16::label(int which, const char) const { assert(which > 0 && which <= component_count()); switch(which) { case 1: return XX(); case 2: return XY(); case 3: return YZ(); case 4: return ZX(); case 5: return YX(); case 6: return ZY(); case 7: return XZ(); default: return ""; } }
#if NOUVEAU_DRIVER == 0xc0 const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] = #else const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] = #endif { C4(A, B8G8R8A8_UNORM, BGRA8_UNORM, B, G, R, A, UNORM, A8B8G8R8, ID), F3(A, B8G8R8X8_UNORM, BGRX8_UNORM, B, G, R, xx, UNORM, A8B8G8R8, TD), C4(A, B8G8R8A8_SRGB, BGRA8_SRGB, B, G, R, A, UNORM, A8B8G8R8, TD), F3(A, B8G8R8X8_SRGB, BGRX8_SRGB, B, G, R, xx, UNORM, A8B8G8R8, TD), C4(A, R8G8B8A8_UNORM, RGBA8_UNORM, R, G, B, A, UNORM, A8B8G8R8, IB), F3(A, R8G8B8X8_UNORM, RGBX8_UNORM, R, G, B, xx, UNORM, A8B8G8R8, TB), C4(A, R8G8B8A8_SRGB, RGBA8_SRGB, R, G, B, A, UNORM, A8B8G8R8, TB), F3(A, R8G8B8X8_SRGB, RGBX8_SRGB, R, G, B, xx, UNORM, A8B8G8R8, TB), ZX(B, Z16_UNORM, Z16_UNORM, R, R, R, xx, UNORM, Z16, TZ), ZX(A, Z32_FLOAT, Z32_FLOAT, R, R, R, xx, FLOAT, ZF32, TZ), ZX(A, Z24X8_UNORM, Z24_X8_UNORM, R, R, R, xx, UNORM, X8Z24, TZ), SZ(A, X8Z24_UNORM, S8_Z24_UNORM, G, G, G, xx, UNORM, Z24S8, TZ), ZS(A, Z24_UNORM_S8_UINT, Z24_S8_UNORM, R, R, R, xx, UNORM, S8Z24, TZ), SZ(A, S8_UINT_Z24_UNORM, S8_Z24_UNORM, G, G, G, xx, UNORM, Z24S8, TZ), ZS(A, Z32_FLOAT_S8X24_UINT, Z32_S8_X24_FLOAT, R, R, R, xx, FLOAT, ZF32_X24S8, TZ), SX(A, S8_UINT, R, R8, T), SX(A, X24S8_UINT, G, S8Z24, T), SX(A, S8X24_UINT, R, Z24S8, T), SX(A, X32_S8X24_UINT, G, ZF32_X24S8, T), F3(A, B5G6R5_UNORM, B5G6R5_UNORM, B, G, R, xx, UNORM, B5G6R5, TD), C4(A, B5G5R5A1_UNORM, BGR5_A1_UNORM, B, G, R, A, UNORM, A1B5G5R5, TD), F3(A, B5G5R5X1_UNORM, BGR5_X1_UNORM, B, G, R, xx, UNORM, A1B5G5R5, TD),
/* Subroutine */ int zswap_(integer *n, doublecomplex *zx, integer *incx, doublecomplex *zy, integer *incy) { /* System generated locals */ integer i__1, i__2, i__3; /* Local variables */ static integer i; static doublecomplex ztemp; static integer ix, iy; /* interchanges two vectors. jack dongarra, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*) Parameter adjustments Function Body */ #define ZY(I) zy[(I)-1] #define ZX(I) zx[(I)-1] if (*n <= 0) { return 0; } if (*incx == 1 && *incy == 1) { goto L20; } /* code for unequal increments or equal increments not equal to 1 */ ix = 1; iy = 1; if (*incx < 0) { ix = (-(*n) + 1) * *incx + 1; } if (*incy < 0) { iy = (-(*n) + 1) * *incy + 1; } i__1 = *n; for (i = 1; i <= *n; ++i) { i__2 = ix; ztemp.r = ZX(ix).r, ztemp.i = ZX(ix).i; i__2 = ix; i__3 = iy; ZX(ix).r = ZY(iy).r, ZX(ix).i = ZY(iy).i; i__2 = iy; ZY(iy).r = ztemp.r, ZY(iy).i = ztemp.i; ix += *incx; iy += *incy; /* L10: */ } return 0; /* code for both increments equal to 1 */ L20: i__1 = *n; for (i = 1; i <= *n; ++i) { i__2 = i; ztemp.r = ZX(i).r, ztemp.i = ZX(i).i; i__2 = i; i__3 = i; ZX(i).r = ZY(i).r, ZX(i).i = ZY(i).i; i__2 = i; ZY(i).r = ztemp.r, ZY(i).i = ztemp.i; /* L30: */ } return 0; } /* zswap_ */