Searched defs:memset (Results 1 - 25 of 43) sorted by path

12

/external/chromium_org/chrome/installer/mini_installer/
H A Dmini_installer.cc845 // VC Express editions don't come with the memset CRT obj file and linking to
847 // simply implement memset.
855 #pragma function(memset)
856 void* memset(void* dest, int c, size_t count) { function
/external/chromium_org/third_party/cython/src/Cython/Includes/cpython/
H A Darray.pxd50 memset, memchr, memcmp, memcpy, memmove namespace
134 memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
161 memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
/external/chromium_org/third_party/libvpx/source/libvpx/vpx_mem/
H A Dvpx_mem.h118 # define memset vpx_memset macro
163 # define vpx_memset memset
/external/chromium_org/third_party/mesa/src/src/mesa/state_tracker/
H A Dst_glsl_to_tgsi.cpp3036 memset(tempWrites, 0, sizeof(unsigned) * MAX_TEMPS);
3037 memset(outputWrites, 0, sizeof(outputWrites));
3313 memset(acp, 0, sizeof(*acp) * this->next_temp * 4);
3346 memset(acp, 0, sizeof(*acp) * this->next_temp * 4);
3495 memset(writes, 0, sizeof(*writes) * this->next_temp * 4);
3531 memset(writes, 0, sizeof(*writes) * this->next_temp * 4);
4547 memset(t, 0, sizeof *t);
2997 ASSERT(coord < 4); if (dst.writemask & (1 << comp) && coord <= SWIZZLE_W) read_mask |= 1 << coord; } return read_mask; } void glsl_to_tgsi_visitor::simplify_cmp(void) { unsigned *tempWrites; unsigned outputWrites[MAX_PROGRAM_OUTPUTS]; tempWrites = new unsigned[MAX_TEMPS]; if (!tempWrites) { return; } memset(tempWrites, 0, sizeof(unsigned) * MAX_TEMPS); memset(outputWrites, 0, sizeof(outputWrites)); foreach_iter(exec_list_iterator, iter, this->instructions) { glsl_to_tgsi_instruction *inst = (glsl_to_tgsi_instruction *)iter.get(); unsigned prevWriteMask = 0; if (inst->dst.reladdr || tgsi_get_opcode_info(inst->op)->is_branch || inst->op == TGSI_OPCODE_BGNSUB || inst->op == TGSI_OPCODE_CONT || inst->op == TGSI_OPCODE_END || inst->op == TGSI_OPCODE_ENDSUB || inst->op == TGSI_OPCODE_RET) argument
/external/chromium_org/third_party/skia/src/utils/
H A DSkTextureCompressor_ASTC.cpp594 memset(m, 0, sizeof(m));
694 memset(m, 0, sizeof(m));
596 SkASSERT(nBits < 8); m[0] = static_cast<int>(blockBits(nBits - 1, 0)); m[1] = static_cast<int>(blockBits(2*nBits - 1 + 2, nBits + 2)); m[2] = static_cast<int>(blockBits(3*nBits - 1 + 4, 2*nBits + 4)); m[3] = static_cast<int>(blockBits(4*nBits - 1 + 5, 3*nBits + 5)); m[4] = static_cast<int>(blockBits(5*nBits - 1 + 7, 4*nBits + 7)); } int T = static_cast<int>(blockBits(nBits + 1, nBits)) | (static_cast<int>(blockBits(2*nBits + 2 + 1, 2*nBits + 2)) << 2) | (static_cast<int>(blockBits[3*nBits + 4] << 4)) | (static_cast<int>(blockBits(4*nBits + 5 + 1, 4*nBits + 5)) << 5) | (static_cast<int>(blockBits[5*nBits + 7] << 7)); int t[5]; int C; SkTBits<int> Tbits(T); if (0x7 == Tbits(4, 2)) { C = (Tbits(7, 5) << 2) | Tbits(1, 0); t[3] = t[4] = 2; } else { C = Tbits(4, 0); if (Tbits(6, 5) == 0x3) { t[4] = 2; t[3] = Tbits[7]; } else { t[4] = Tbits[7]; t[3] = Tbits(6, 5); } } SkTBits<int> Cbits(C); if (Cbits(1, 0) == 0x3) { t[2] = 2; t[1] = Cbits[4]; t[0] = (Cbits[3] << 1) | (Cbits[2] & (0x1 & ~(Cbits[3]))); } else if (Cbits(3, 2) == 0x3) { t[2] = 2; t[1] = 2; t[0] = Cbits(1, 0); } else { t[2] = Cbits[4]; t[1] = Cbits(3, 2); t[0] = (Cbits[1] << 1) | (Cbits[0] & (0x1 & ~(Cbits[1]))); } for (int i = 0; i < 5; ++i) { SkASSERT(t[i] < 3); SkASSERT(m[i] < (1 << nBits)); } for (int i = 0; i < 5; ++i) { *dst = (t[i] << nBits) + m[i]; ++dst; } } static void decode_quint_block(int* dst, int nBits, const uint64_t &block) { SkTBits<uint64_t> blockBits(block); int m[3]; if (0 == nBits) { memset(m, 0, sizeof(m)); } else { SkASSERT(nBits < 8); m[0] = static_cast<int>(blockBits(nBits - 1, 0)); m[1] = static_cast<int>(blockBits(2*nBits - 1 + 3, nBits + 3)); m[2] = static_cast<int>(blockBits(3*nBits - 1 + 5, 2*nBits + 5)); } int Q = static_cast<int>(blockBits(nBits + 2, nBits)) | (static_cast<int>(blockBits(2*nBits + 3 + 1, 2*nBits + 3)) << 3) | (static_cast<int>(blockBits(3*nBits + 5 + 1, 3*nBits + 5)) << 5); int q[3]; SkTBits<int> Qbits(Q); if (Qbits(2, 1) == 0x3 && Qbits(6, 5) == 0) { const int notBitZero = (0x1 & ~(Qbits[0])); q[2] = (Qbits[0] << 2) | ((Qbits[4] & notBitZero) << 1) | (Qbits[3] & notBitZero); q[1] = 4; q[0] = 4; } else { int C; if (Qbits(2, 1) == 0x3) { q[2] = 4; C = (Qbits(4, 3) << 3) | ((0x3 & ~(Qbits(6, 5))) << 1) | Qbits[0]; } else { q[2] = Qbits(6, 5); C = Qbits(4, 0); } SkTBits<int> Cbits(C); if (Cbits(2, 0) == 0x5) { q[1] = 4; q[0] = Cbits(4, 3); } else { q[1] = Cbits(4, 3); q[0] = Cbits(2, 0); } } for (int i = 0; i < 3; ++i) { SkASSERT(q[i] < 5); SkASSERT(m[i] < (1 << nBits)); } for (int i = 0; i < 3; ++i) { *dst = (q[i] << nBits) + m[i]; ++dst; } } static bool decode_integer_sequence( int* dst, int dstSize, int nVals, const ASTCBlock &block, int startBit, int endBit, bool bReadForward, int nBits, int nTrits, int nQuints ) { if (nVals > dstSize) { return false; } ASTCBlock src = block; if (!bReadForward) { src.reverse(); startBit = 128 - startBit; endBit = 128 - endBit; } while (nVals > 0) { if (nTrits > 0) { SkASSERT(0 == nQuints); int endBlockBit = startBit + 8 + 5*nBits; if (endBlockBit > endBit) { endBlockBit = endBit; } int trits[5]; decode_trit_block(trits, nBits, read_astc_bits(src, startBit, endBlockBit)); memcpy(dst, trits, SkMin32(nVals, 5)*sizeof(int)); dst += 5; nVals -= 5; startBit = endBlockBit; } else if (nQuints > 0) { SkASSERT(0 == nTrits); int endBlockBit = startBit + 7 + 3*nBits; if (endBlockBit > endBit) { endBlockBit = endBit; } int quints[3]; decode_quint_block(quints, nBits, read_astc_bits(src, startBit, endBlockBit)); memcpy(dst, quints, SkMin32(nVals, 3)*sizeof(int)); dst += 3; nVals -= 3; startBit = endBlockBit; } else { int endValBit = startBit + nBits; if (endValBit > endBit) { endValBit = endBit; } SkASSERT(endValBit - startBit < 31); *dst = static_cast<int>(read_astc_bits(src, startBit, endValBit)); ++dst; --nVals; startBit = endValBit; } } return true; } static inline int unquantize_value(unsigned mask, int A, int B, int C, int D) { int T = D * C + B; T = T ^ A; T = (A & mask) | (T >> 2); SkASSERT(T < 256); return T; } static inline int replicate_bits(int x, int oldPrec, int prec) { while (oldPrec < prec) { const int toShift = SkMin32(prec-oldPrec, oldPrec); x = (x << toShift) | (x >> (oldPrec - toShift)); oldPrec += toShift; } SkASSERT((-(1 << prec) & x) == 0); return x; } static inline int unquantize_bits_color(int val, int nBits) { return replicate_bits(val, nBits, 8); } static inline int unquantize_trit_color(int val, int nBits) { SkASSERT(nBits > 0); SkASSERT(nBits < 7); const int D = (val >> nBits) & 0x3; SkASSERT(D < 3); const int A = -(val & 0x1) & 0x1FF; static const int Cvals[6] = { 204, 93, 44, 22, 11, 5 }; const int C = Cvals[nBits - 1]; int B = 0; const SkTBits<int> valBits(val); switch (nBits) { case 1: B = 0; break; case 2: { const int b = valBits[1]; B = (b << 1) | (b << 2) | (b << 4) | (b << 8); } break; case 3: { const int cb = valBits(2, 1); B = cb | (cb << 2) | (cb << 7); } break; case 4: { const int dcb = valBits(3, 1); B = dcb | (dcb << 6); } break; case 5: { const int edcb = valBits(4, 1); B = (edcb << 5) | (edcb >> 2); } break; case 6: { const int fedcb = valBits(5, 1); B = (fedcb << 4) | (fedcb >> 4); } break; } return unquantize_value(0x80, A, B, C, D); } static inline int unquantize_quint_color(int val, int nBits) { const int D = (val >> nBits) & 0x7; SkASSERT(D < 5); const int A = -(val & 0x1) & 0x1FF; static const int Cvals[5] = { 113, 54, 26, 13, 6 }; SkASSERT(nBits > 0); SkASSERT(nBits < 6); const int C = Cvals[nBits - 1]; int B = 0; const SkTBits<int> valBits(val); switch (nBits) { case 1: B = 0; break; case 2: { const int b = valBits[1]; B = (b << 2) | (b << 3) | (b << 8); } break; case 3: { const int cb = valBits(2, 1); B = (cb >> 1) | (cb << 1) | (cb << 7); } break; case 4: { const int dcb = valBits(3, 1); B = (dcb >> 1) | (dcb << 6); } break; case 5: { const int edcb = valBits(4, 1); B = (edcb << 5) | (edcb >> 3); } break; } return unquantize_value(0x80, A, B, C, D); } static void unquantize_colors(int *vals, int nVals, int nBits, int nTrits, int nQuints) { for (int i = 0; i < nVals; ++i) { if (nTrits > 0) { SkASSERT(nQuints == 0); vals[i] = unquantize_trit_color(vals[i], nBits); } else if (nQuints > 0) { SkASSERT(nTrits == 0); vals[i] = unquantize_quint_color(vals[i], nBits); } else { SkASSERT(nQuints == 0 && nTrits == 0); vals[i] = unquantize_bits_color(vals[i], nBits); } } } static int interpolate_channel(int c0, int c1, int weight) { SkASSERT(0 <= c0 && c0 < 256); SkASSERT(0 <= c1 && c1 < 256); c0 = (c0 << 8) | c0; c1 = (c1 << 8) | c1; const int result = ((c0*(64 - weight) + c1*weight + 32) / 64) >> 8; if (result > 255) { return 255; } SkASSERT(result >= 0); return result; } static SkColor interpolate_endpoints(const SkColor endpoints[2], int weight) { return SkColorSetARGB( interpolate_channel(SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight), interpolate_channel(SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight), interpolate_channel(SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight), interpolate_channel(SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight)); } static SkColor interpolate_dual_endpoints( const SkColor endpoints[2], int weight0, int weight1, int plane) { int a = interpolate_channel(SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight0); int r = interpolate_channel(SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight0); int g = interpolate_channel(SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight0); int b = interpolate_channel(SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight0); switch (plane) { case 0: r = interpolate_channel( SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight1); break; case 1: g = interpolate_channel( SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight1); break; case 2: b = interpolate_channel( SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight1); break; case 3: a = interpolate_channel( SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight1); break; default: SkDEBUGFAIL(�); break; } return SkColorSetARGB(a, r, g, b); } struct ASTCDecompressionData { ASTCDecompressionData(int dimX, int dimY) : fDimX(dimX), fDimY(dimY) { } const int fDimX; const int fDimY; ASTCBlock fBlock; int fBlockMode; bool fDualPlaneEnabled; int fDualPlane; bool fVoidExtent; bool fError; int fWeightDimX; int fWeightDimY; int fWeightBits; int fWeightTrits; int fWeightQuints; int fPartCount; int fPartIndex; enum ColorEndpointMode { kLDR_Luminance_Direct_ColorEndpointMode = 0, kLDR_Luminance_BaseOffset_ColorEndpointMode = 1, kHDR_Luminance_LargeRange_ColorEndpointMode = 2, kHDR_Luminance_SmallRange_ColorEndpointMode = 3, kLDR_LuminanceAlpha_Direct_ColorEndpointMode = 4, kLDR_LuminanceAlpha_BaseOffset_ColorEndpointMode = 5, kLDR_RGB_BaseScale_ColorEndpointMode = 6, kHDR_RGB_BaseScale_ColorEndpointMode = 7, kLDR_RGB_Direct_ColorEndpointMode = 8, kLDR_RGB_BaseOffset_ColorEndpointMode = 9, kLDR_RGB_BaseScaleWithAlpha_ColorEndpointMode = 10, kHDR_RGB_ColorEndpointMode = 11, kLDR_RGBA_Direct_ColorEndpointMode = 12, kLDR_RGBA_BaseOffset_ColorEndpointMode = 13, kHDR_RGB_LDRAlpha_ColorEndpointMode = 14, kHDR_RGB_HDRAlpha_ColorEndpointMode = 15 }; static const int kMaxColorEndpointModes = 16; static const int kMaxPartitions = 4; ColorEndpointMode fCEM[kMaxPartitions]; int fColorStartBit; int fColorEndBit; int numPartitions() const { return fPartCount; } int numWeights() const { return fWeightDimX * fWeightDimY * (fDualPlaneEnabled ? 2 : 1); } int maxWeightValue() const { int maxVal = (1 << fWeightBits); if (fWeightTrits > 0) { SkASSERT(0 == fWeightQuints); maxVal *= 3; } else if (fWeightQuints > 0) { SkASSERT(0 == fWeightTrits); maxVal *= 5; } return maxVal - 1; } int numWeightBits() const { const int nWeights = this->numWeights(); return ((nWeights*8*fWeightTrits + 4) / 5) + ((nWeights*7*fWeightQuints + 2) / 3) + (nWeights*fWeightBits); } int numColorValues() const { int numValues = 0; for (int i = 0; i < this->numPartitions(); ++i) { int cemInt = static_cast<int>(fCEM[i]); numValues += ((cemInt >> 2) + 1) * 2; } return numValues; } bool getColorValueEncoding(int *nBits, int *nTrits, int *nQuints) const { if (NULL == nBits || NULL == nTrits || NULL == nQuints) { return false; } const int nColorVals = this->numColorValues(); if (nColorVals <= 0) { return false; } const int colorBits = fColorEndBit - fColorStartBit; SkASSERT(colorBits > 0); if (colorBits < ((13 * nColorVals + 4) / 5)) { return false; } for (int i = 255; i > 0; --i) { int range = i + 1; int bits = 0, trits = 0, quints = 0; bool valid = false; if (SkIsPow2(range)) { bits = bits_for_range(range); valid = true; } else if ((range % 3) == 0 && SkIsPow2(range/3)) { trits = 1; bits = bits_for_range(range/3); valid = true; } else if ((range % 5) == 0 && SkIsPow2(range/5)) { quints = 1; bits = bits_for_range(range/5); valid = true; } if (valid) { const int actualColorBits = ((nColorVals*8*trits + 4) / 5) + ((nColorVals*7*quints + 2) / 3) + (nColorVals*bits); if (actualColorBits <= colorBits) { *nTrits = trits; *nQuints = quints; *nBits = bits; return true; } } } return false; } void colorEndpoints(SkColor endpoints[4][2], const int* colorValues) const { for (int i = 0; i < this->numPartitions(); ++i) { switch (fCEM[i]) { case kLDR_Luminance_Direct_ColorEndpointMode: { const int* v = colorValues; endpoints[i][0] = SkColorSetARGB(0xFF, v[0], v[0], v[0]); endpoints[i][1] = SkColorSetARGB(0xFF, v[1], v[1], v[1]); colorValues += 2; } break; case kLDR_Luminance_BaseOffset_ColorEndpointMode: { const int* v = colorValues; const int L0 = (v[0] >> 2) | (v[1] & 0xC0); const int L1 = clamp_byte(L0 + (v[1] & 0x3F)); endpoints[i][0] = SkColorSetARGB(0xFF, L0, L0, L0); endpoints[i][1] = SkColorSetARGB(0xFF, L1, L1, L1); colorValues += 2; } break; case kLDR_LuminanceAlpha_Direct_ColorEndpointMode: { const int* v = colorValues; endpoints[i][0] = SkColorSetARGB(v[2], v[0], v[0], v[0]); endpoints[i][1] = SkColorSetARGB(v[3], v[1], v[1], v[1]); colorValues += 4; } break; case kLDR_LuminanceAlpha_BaseOffset_ColorEndpointMode: { int v0 = colorValues[0]; int v1 = colorValues[1]; int v2 = colorValues[2]; int v3 = colorValues[3]; bit_transfer_signed(&v1, &v0); bit_transfer_signed(&v3, &v2); endpoints[i][0] = SkColorSetARGB(v2, v0, v0, v0); endpoints[i][1] = SkColorSetARGB( clamp_byte(v3+v2), clamp_byte(v1+v0), clamp_byte(v1+v0), clamp_byte(v1+v0)); colorValues += 4; } break; case kLDR_RGB_BaseScale_ColorEndpointMode: { decode_rgba_basescale(colorValues, endpoints[i], true); colorValues += 4; } break; case kLDR_RGB_Direct_ColorEndpointMode: { decode_rgba_direct(colorValues, endpoints[i], true); colorValues += 6; } break; case kLDR_RGB_BaseOffset_ColorEndpointMode: { decode_rgba_baseoffset(colorValues, endpoints[i], true); colorValues += 6; } break; case kLDR_RGB_BaseScaleWithAlpha_ColorEndpointMode: { decode_rgba_basescale(colorValues, endpoints[i], false); colorValues += 6; } break; case kLDR_RGBA_Direct_ColorEndpointMode: { decode_rgba_direct(colorValues, endpoints[i], false); colorValues += 8; } break; case kLDR_RGBA_BaseOffset_ColorEndpointMode: { decode_rgba_baseoffset(colorValues, endpoints[i], false); colorValues += 8; } break; default: SkDEBUGFAIL(�); break; } } } int unquantizeWeight(int x) const { SkASSERT(x <= this->maxWeightValue()); const int D = (x >> fWeightBits) & 0x7; const int A = -(x & 0x1) & 0x7F; SkTBits<int> xbits(x); int T = 0; if (fWeightTrits > 0) { SkASSERT(0 == fWeightQuints); switch (fWeightBits) { case 0: { SkASSERT(x < 3); static const int kUnquantizationTable[3] = { 0, 32, 63 }; T = kUnquantizationTable[x]; } break; case 1: { const int B = 0; const int C = 50; T = unquantize_value(0x20, A, B, C, D); } break; case 2: { const int b = xbits[1]; const int B = b | (b << 2) | (b << 6); const int C = 23; T = unquantize_value(0x20, A, B, C, D); } break; case 3: { const int cb = xbits(2, 1); const int B = cb | (cb << 5); const int C = 11; T = unquantize_value(0x20, A, B, C, D); } break; default: SkDEBUGFAIL(�); break; } } else if (fWeightQuints > 0) { SkASSERT(0 == fWeightTrits); switch (fWeightBits) { case 0: { SkASSERT(x < 5); static const int kUnquantizationTable[5] = { 0, 16, 32, 47, 63 }; T = kUnquantizationTable[x]; } break; case 1: { const int B = 0; const int C = 28; T = unquantize_value(0x20, A, B, C, D); } break; case 2: { const int b = xbits[1]; const int B = (b << 1) | (b << 6); const int C = 13; T = unquantize_value(0x20, A, B, C, D); } break; default: SkDEBUGFAIL(�); break; } } else { SkASSERT(0 == fWeightTrits); SkASSERT(0 == fWeightQuints); T = replicate_bits(x, fWeightBits, 6); } SkASSERT(T <= 63); if (T > 32) { T += 1; } SkASSERT(T <= 64); return T; } int getWeight(const int* unquantizedWeights, int idx, bool dualPlane) const { const int maxIdx = (fDualPlaneEnabled ? 2 : 1) * fWeightDimX * fWeightDimY - 1; if (fDualPlaneEnabled) { const int effectiveIdx = 2*idx + (dualPlane ? 1 : 0); if (effectiveIdx > maxIdx) { return 0; } return unquantizedWeights[effectiveIdx]; } SkASSERT(!dualPlane); if (idx > maxIdx) { return 0; } else { return unquantizedWeights[idx]; } } int infillWeight(const int* unquantizedValues, int s, int t, bool dualPlane) const { const int Ds = (1024 + fDimX/2) / (fDimX - 1); const int Dt = (1024 + fDimY/2) / (fDimY - 1); const int cs = Ds * s; const int ct = Dt * t; const int gs = (cs*(fWeightDimX - 1) + 32) >> 6; const int gt = (ct*(fWeightDimY - 1) + 32) >> 6; const int js = gs >> 4; const int jt = gt >> 4; const int fs = gs & 0xF; const int ft = gt & 0xF; const int idx = js + jt*fWeightDimX; const int p00 = this->getWeight(unquantizedValues, idx, dualPlane); const int p01 = this->getWeight(unquantizedValues, idx + 1, dualPlane); const int p10 = this->getWeight(unquantizedValues, idx + fWeightDimX, dualPlane); const int p11 = this->getWeight(unquantizedValues, idx + fWeightDimX + 1, dualPlane); const int w11 = (fs*ft + 8) >> 4; const int w10 = ft - w11; const int w01 = fs - w11; const int w00 = 16 - fs - ft + w11; const int weight = (p00*w00 + p01*w01 + p10*w10 + p11*w11 + 8) >> 4; SkASSERT(weight <= 64); return weight; } void texelWeights(int texelWeights[2][12][12], const int* texelValues) const { int unquantizedValues[144*2]; SkASSERT(this->numWeights() <= 144*2); for (int j = 0; j < this->numWeights(); ++j) { unquantizedValues[j] = this->unquantizeWeight(texelValues[j]); } for (int y = 0; y < fDimY; ++y) { for (int x = 0; x < fDimX; ++x) { texelWeights[0][x][y] = this->infillWeight(unquantizedValues, x, y, false); if (fDualPlaneEnabled) { texelWeights[1][x][y] = this->infillWeight(unquantizedValues, x, y, true); } } } } int getPartition(int x, int y) const { const int partitionCount = this->numPartitions(); int seed = fPartIndex; if ((fDimX * fDimY) < 31) { x <<= 1; y <<= 1; } seed += (partitionCount - 1) * 1024; uint32_t p = seed; p ^= p >> 15; p -= p << 17; p += p << 7; p += p << 4; p ^= p >> 5; p += p << 16; p ^= p >> 7; p ^= p >> 3; p ^= p << 6; p ^= p >> 17; uint32_t rnum = p; uint8_t seed1 = rnum & 0xF; uint8_t seed2 = (rnum >> 4) & 0xF; uint8_t seed3 = (rnum >> 8) & 0xF; uint8_t seed4 = (rnum >> 12) & 0xF; uint8_t seed5 = (rnum >> 16) & 0xF; uint8_t seed6 = (rnum >> 20) & 0xF; uint8_t seed7 = (rnum >> 24) & 0xF; uint8_t seed8 = (rnum >> 28) & 0xF; uint8_t seed9 = (rnum >> 18) & 0xF; uint8_t seed10 = (rnum >> 22) & 0xF; uint8_t seed11 = (rnum >> 26) & 0xF; uint8_t seed12 = ((rnum >> 30) | (rnum << 2)) & 0xF; seed1 *= seed1; seed2 *= seed2; seed3 *= seed3; seed4 *= seed4; seed5 *= seed5; seed6 *= seed6; seed7 *= seed7; seed8 *= seed8; seed9 *= seed9; seed10 *= seed10; seed11 *= seed11; seed12 *= seed12; int sh1, sh2, sh3; if (0 != (seed & 1)) { sh1 = (0 != (seed & 2))? 4 : 5; sh2 = (partitionCount == 3)? 6 : 5; } else { sh1 = (partitionCount==3)? 6 : 5; sh2 = (0 != (seed & 2))? 4 : 5; } sh3 = (0 != (seed & 0x10))? sh1 : sh2; seed1 >>= sh1; seed2 >>= sh2; seed3 >>= sh1; seed4 >>= sh2; seed5 >>= sh1; seed6 >>= sh2; seed7 >>= sh1; seed8 >>= sh2; seed9 >>= sh3; seed10 >>= sh3; seed11 >>= sh3; seed12 >>= sh3; const int z = 0; int a = seed1*x + seed2*y + seed11*z + (rnum >> 14); int b = seed3*x + seed4*y + seed12*z + (rnum >> 10); int c = seed5*x + seed6*y + seed9 *z + (rnum >> 6); int d = seed7*x + seed8*y + seed10*z + (rnum >> 2); a &= 0x3F; b &= 0x3F; c &= 0x3F; d &= 0x3F; if (partitionCount < 4) { d = 0; } if (partitionCount < 3) { c = 0; } if (a >= b && a >= c && a >= d) argument
/external/chromium_org/third_party/webrtc/modules/remote_bitrate_estimator/test/
H A Dbwe_test_framework.cc127 memset(&header_, 0, sizeof(header_));
144 memset(&header_, 0, sizeof(header_));
560 memset(&prototype_header_, 0, sizeof(prototype_header_));
559 assert(first_frame_offset < 1.0f); memset(&prototype_header_, 0, sizeof(prototype_header_)); prototype_header_.ssrc = ssrc; prototype_header_.sequenceNumber = 0xf000u; } uint32_t VideoSender::GetCapacityKbps() const { return (bytes_per_second_ * 8) / 1000; } void VideoSender::RunFor(int64_t time_ms, Packets* in_out) { assert(in_out); now_ms_ += time_ms; Packets new_packets; while (now_ms_ >= next_frame_ms_) argument
/external/clang/test/Frontend/
H A Dmacros.c9 #define memset(x,y,z) ({ stuff(x,y,z); x; }) macro
12 memset(a,b,c); // No warning!
/external/compiler-rt/lib/asan/
H A Dasan_dll_thunk.cc316 INTERCEPT_LIBRARY_FUNCTION(memset); variable
336 // executed, otherwise functions like memset might be invoked.
/external/e2fsprogs/e2fsck/
H A Dmtrace.h84 #ifndef memset
85 #define memset(s, zero, n) bzero ((s), (n)) macro
/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/
H A Dorg.eclipse.swt.gtk.linux.x86_3.6.1.v3657a.jarMETA-INF/MANIFEST.MF META-INF/ECLIPSEF.SF META-INF/ECLIPSEF.RSA META ...
H A Dorg.eclipse.swt.win32.win32.x86_3.6.1.v3657a.jarMETA-INF/MANIFEST.MF META-INF/ECLIPSEF.SF META-INF/ECLIPSEF.RSA META ...
/external/eigen/unsupported/Eigen/src/Skyline/
H A DSkylineMatrix.h378 memset(m_colStartIndex, 0, (m_outerSize + 1) * sizeof (Index));
379 memset(m_rowStartIndex, 0, (m_outerSize + 1) * sizeof (Index));
438 memset(this->_upperPtr() + start, 0, (bandIncrement - 1) * sizeof (Scalar));
469 memset(this->_lowerPtr() + start, 0, (bandIncrement - 1) * sizeof (Scalar));
496 memset(this->_upperPtr() + m_rowStartIndex[inner] + previousProfile + 1, 0, (bandIncrement - 1) * sizeof (Scalar));
523 memset(this->_lowerPtr() + m_colStartIndex[outer] + previousProfile + 1, 0, (bandIncrement - 1) * sizeof (Scalar));
622 memset(m_colStartIndex, 0, (cols + 1) * sizeof (Index));
623 memset(m_rowStartIndex, 0, (rows + 1) * sizeof (Index));
235 eigen_assert(idx < outerSize()); eigen_assert(idx < innerSize()); return this->m_data.diag(idx); } inline Scalar coeffLower(Index row, Index col) const { const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; eigen_assert(outer < outerSize()); eigen_assert(inner < innerSize()); eigen_assert(inner != outer); if (IsRowMajor) { const Index minInnerIndex = outer - m_data.lowerProfile(outer); if (inner >= minInnerIndex) return this->m_data.lower(m_rowStartIndex[outer] + inner - (outer - m_data.lowerProfile(outer))); else return Scalar(0); } else { const Index maxInnerIndex = outer + m_data.lowerProfile(outer); if (inner <= maxInnerIndex) return this->m_data.lower(m_rowStartIndex[outer] + (inner - outer)); else return Scalar(0); } } inline Scalar coeffUpper(Index row, Index col) const { const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; eigen_assert(outer < outerSize()); eigen_assert(inner < innerSize()); eigen_assert(inner != outer); if (IsRowMajor) { const Index minOuterIndex = inner - m_data.upperProfile(inner); if (outer >= minOuterIndex) return this->m_data.upper(m_colStartIndex[inner] + outer - (inner - m_data.upperProfile(inner))); else return Scalar(0); } else { const Index maxOuterIndex = inner + m_data.upperProfile(inner); if (outer <= maxOuterIndex) return this->m_data.upper(m_colStartIndex[inner] + (outer - inner)); else return Scalar(0); } } inline Scalar& coeffRefDiag(Index idx) { eigen_assert(idx < outerSize()); eigen_assert(idx < innerSize()); return this->m_data.diag(idx); } inline Scalar& coeffRefLower(Index row, Index col) { const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; eigen_assert(outer < outerSize()); eigen_assert(inner < innerSize()); eigen_assert(inner != outer); if (IsRowMajor) { const Index minInnerIndex = outer - m_data.lowerProfile(outer); eigen_assert(inner >= minInnerIndex && �); return this->m_data.lower(m_rowStartIndex[outer] + inner - (outer - m_data.lowerProfile(outer))); } else { const Index maxInnerIndex = outer + m_data.lowerProfile(outer); eigen_assert(inner <= maxInnerIndex && �); return this->m_data.lower(m_rowStartIndex[outer] + (inner - outer)); } } inline bool coeffExistLower(Index row, Index col) { const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; eigen_assert(outer < outerSize()); eigen_assert(inner < innerSize()); eigen_assert(inner != outer); if (IsRowMajor) { const Index minInnerIndex = outer - m_data.lowerProfile(outer); return inner >= minInnerIndex; } else { const Index maxInnerIndex = outer + m_data.lowerProfile(outer); return inner <= maxInnerIndex; } } inline Scalar& coeffRefUpper(Index row, Index col) { const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; eigen_assert(outer < outerSize()); eigen_assert(inner < innerSize()); eigen_assert(inner != outer); if (IsRowMajor) { const Index minOuterIndex = inner - m_data.upperProfile(inner); eigen_assert(outer >= minOuterIndex && �); return this->m_data.upper(m_colStartIndex[inner] + outer - (inner - m_data.upperProfile(inner))); } else { const Index maxOuterIndex = inner + m_data.upperProfile(inner); eigen_assert(outer <= maxOuterIndex && �); return this->m_data.upper(m_colStartIndex[inner] + (outer - inner)); } } inline bool coeffExistUpper(Index row, Index col) { const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; eigen_assert(outer < outerSize()); eigen_assert(inner < innerSize()); eigen_assert(inner != outer); if (IsRowMajor) { const Index minOuterIndex = inner - m_data.upperProfile(inner); return outer >= minOuterIndex; } else { const Index maxOuterIndex = inner + m_data.upperProfile(inner); return outer <= maxOuterIndex; } } protected: public: class InnerUpperIterator; class InnerLowerIterator; class OuterUpperIterator; class OuterLowerIterator; inline void setZero() { m_data.clear(); memset(m_colStartIndex, 0, (m_outerSize + 1) * sizeof (Index)); memset(m_rowStartIndex, 0, (m_outerSize + 1) * sizeof (Index)); } inline Index nonZeros() const { return m_data.diagSize() + m_data.upperSize() + m_data.lowerSize(); } inline void reserve(Index reserveSize, Index reserveUpperSize, Index reserveLowerSize) { m_data.reserve(reserveSize, reserveUpperSize, reserveLowerSize); } EIGEN_DONT_INLINE Scalar & insert(Index row, Index col) { const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; eigen_assert(outer < outerSize()); eigen_assert(inner < innerSize()); if (outer == inner) return m_data.diag(col); if (IsRowMajor) { if (outer < inner) { Index minOuterIndex = 0; minOuterIndex = inner - m_data.upperProfile(inner); if (outer < minOuterIndex) { const Index previousProfile = m_data.upperProfile(inner); m_data.upperProfile(inner) = inner - outer; const Index bandIncrement = m_data.upperProfile(inner) - previousProfile; const Index stop = m_colStartIndex[cols()]; const Index start = m_colStartIndex[inner]; for (Index innerIdx = stop; innerIdx >= start; innerIdx--) { m_data.upper(innerIdx + bandIncrement) = m_data.upper(innerIdx); } for (Index innerIdx = cols(); innerIdx > inner; innerIdx--) { m_colStartIndex[innerIdx] += bandIncrement; } memset(this->_upperPtr() + start, 0, (bandIncrement - 1) * sizeof (Scalar)); return m_data.upper(m_colStartIndex[inner]); } else { return m_data.upper(m_colStartIndex[inner] + outer - (inner - m_data.upperProfile(inner))); } } if (outer > inner) { const Index minInnerIndex = outer - m_data.lowerProfile(outer); if (inner < minInnerIndex) { const Index previousProfile = m_data.lowerProfile(outer); m_data.lowerProfile(outer) = outer - inner; const Index bandIncrement = m_data.lowerProfile(outer) - previousProfile; const Index stop = m_rowStartIndex[rows()]; const Index start = m_rowStartIndex[outer]; for (Index innerIdx = stop; innerIdx >= start; innerIdx--) { m_data.lower(innerIdx + bandIncrement) = m_data.lower(innerIdx); } for (Index innerIdx = rows(); innerIdx > outer; innerIdx--) { m_rowStartIndex[innerIdx] += bandIncrement; } memset(this->_lowerPtr() + start, 0, (bandIncrement - 1) * sizeof (Scalar)); return m_data.lower(m_rowStartIndex[outer]); } else { return m_data.lower(m_rowStartIndex[outer] + inner - (outer - m_data.lowerProfile(outer))); } } } else { if (outer > inner) { const Index maxOuterIndex = inner + m_data.upperProfile(inner); if (outer > maxOuterIndex) { const Index previousProfile = m_data.upperProfile(inner); m_data.upperProfile(inner) = outer - inner; const Index bandIncrement = m_data.upperProfile(inner) - previousProfile; const Index stop = m_rowStartIndex[rows()]; const Index start = m_rowStartIndex[inner + 1]; for (Index innerIdx = stop; innerIdx >= start; innerIdx--) { m_data.upper(innerIdx + bandIncrement) = m_data.upper(innerIdx); } for (Index innerIdx = inner + 1; innerIdx < outerSize() + 1; innerIdx++) { m_rowStartIndex[innerIdx] += bandIncrement; } memset(this->_upperPtr() + m_rowStartIndex[inner] + previousProfile + 1, 0, (bandIncrement - 1) * sizeof (Scalar)); return m_data.upper(m_rowStartIndex[inner] + m_data.upperProfile(inner)); } else { return m_data.upper(m_rowStartIndex[inner] + (outer - inner)); } } if (outer < inner) { const Index maxInnerIndex = outer + m_data.lowerProfile(outer); if (inner > maxInnerIndex) { const Index previousProfile = m_data.lowerProfile(outer); m_data.lowerProfile(outer) = inner - outer; const Index bandIncrement = m_data.lowerProfile(outer) - previousProfile; const Index stop = m_colStartIndex[cols()]; const Index start = m_colStartIndex[outer + 1]; for (Index innerIdx = stop; innerIdx >= start; innerIdx--) argument
/external/libpcap/msdos/
H A Dpktdrvr.c126 #define memset __memset__ macro
323 memset (&r, 0, sizeof(r));
714 memset (&pktInfo.name, 0, sizeof(pktInfo.name));
1273 memset (&pktStat, 0, sizeof(pktStat)); /* clear statistics */
/external/libvpx/libvpx/vpx_mem/
H A Dvpx_mem.h115 # define memset vpx_memset macro
160 # define vpx_memset memset
/external/linux-tools-perf/perf-3.12.0/arch/alpha/lib/
H A Dmemset.S2 * linux/arch/alpha/lib/memset.S
4 * This is an efficient (and small) implementation of the C library "memset()"
20 .globl memset
124 memset = __memset define
/external/linux-tools-perf/perf-3.12.0/arch/arm/lib/
H A Dmemset.S2 * linux/arch/arm/lib/memset.S
18 ENTRY(memset) function
123 ENDPROC(memset)
/external/linux-tools-perf/perf-3.12.0/arch/arm64/lib/
H A Dmemset.S30 ENTRY(memset) function
53 ENDPROC(memset)
/external/linux-tools-perf/perf-3.12.0/arch/avr32/lib/
H A Dmemset.S4 * Based on linux/arch/arm/lib/memset.S
23 .global memset
24 .type memset, @function
26 memset: label
49 /* Fastpath ends here, exactly 32 bytes from memset */
72 .size memset, . - memset
/external/linux-tools-perf/perf-3.12.0/arch/frv/lib/
H A Dmemset.S0 /* memset.S: optimised assembly memset
18 # void *memset(void *p, char ch, size_t count)
25 .globl memset,__memset_end
26 .type memset,@function
27 memset: label
148 .size memset, __memset_end-memset
163 # abuse memset to do the dirty work
166 call memset
[all...]
/external/linux-tools-perf/perf-3.12.0/arch/m32r/lib/
H A Dmemset.S2 * linux/arch/m32r/lib/memset.S
7 * void *memset(void *dst, int val, int len);
17 .global memset
22 memset: label
100 memset: label
/external/linux-tools-perf/perf-3.12.0/arch/mn10300/lib/
H A Dmemset.S18 # void *memset(void *dst, int c, size_t n)
21 .globl memset
22 .type memset,@function
23 memset: label
121 .size memset, memset_end-memset
/external/linux-tools-perf/perf-3.12.0/arch/sh/lib/
H A Dmemset-sh4.S2 * "memset" implementation for SH4
10 * void *memset(void *s, int c, size_t n);
15 ENTRY(memset) function
H A Dmemset.S1 /* $Id: memset.S,v 1.1 2000/04/14 16:49:01 mjd Exp $
3 * "memset" implementation of SuperH
10 * void *memset(void *s, int c, size_t n);
15 ENTRY(memset) function
/external/linux-tools-perf/perf-3.12.0/arch/sparc/lib/
H A Dmemset.S1 /* linux/arch/sparc/lib/memset.S: Sparc optimized memset, bzero and clear_user code
64 .globl memset
67 memset: label
/external/linux-tools-perf/perf-3.12.0/arch/x86/lib/
H A Dmemset_64.S9 * ISO C memset - set a memory block to a byte value. This function uses fast
38 * ISO C memset - set a memory block to a byte value. This function uses
59 ENTRY(memset) function
135 ENDPROC(memset)
144 * Otherwise, use original memset function.
150 altinstruction_entry memset,.Lmemset_c,X86_FEATURE_REP_GOOD,\
151 .Lfinal-memset,.Lmemset_e-.Lmemset_c
152 altinstruction_entry memset,.Lmemset_c_e,X86_FEATURE_ERMS, \
153 .Lfinal-memset,.Lmemset_e_e-.Lmemset_c_e

Completed in 2563 milliseconds

12