Deburring: A standard operation? - Sundown Mfg, Inc.
According to LaRoux K. Gillespie, author of SME's Deburring and Edge Finishing Handbook, a shop can establish its own deburring standard, with the absence of one official standard in U.S. industry. It's just a matter of communicating the specifics of the final edge finish.
Editor's Note: The following is adapted from Chapter 2: "Plant Standards and Edge Needs" in SME's Deburring and Edge Finishing Handbook, which can be ordered from www.amazon.com.
Every plant has standards for burrs and edge finishing. In some plants standards may not be in written form, and they may vary from day to day and between individuals. In such plants there is some general understanding of allowable edge conditions. Some plants have comprehensive written standards. Typically, large companies will have detailed written standards because consistency is important, and written standards are the only way to ensure some measure of consistency throughout the plant. A few companies may have stringent process controls that provide the consistency.
Standards are meant to make life easier for those who work in a specific field. They help to ensure a common level of performance and understanding. They do not, however, necessarily restrict users to a single solution. Many standards define multiple allowable levels or states. In addition, the multiplicity of standards in use testifies to the breadth of alternatives that can be tolerated when a single standard is not adequate.
Most manufacturing and design personnel have encountered instances when their assumptions about edge quality differed markedly from others'. Such instances highlight the need for a common language within plants, between plants, and among individuals. If a design drawing only contains the words deburr or burr-free, does this mean "visible with the unaided eye" or "under magnification"? Does the fact that magnification is used on some parts in the plant imply any legal requirement that all parts must be finished to that same level of quality? The engineering answer is often different from the legal answer. Reference to a national standard or to comprehensive company standards prevents or greatly reduces such problems.
Currently no globally accepted standard exists for burrs and edge finishing. Some nations, such as Japan and Germany, have their own standards. In the U.S. some industry segments, such as die casters and stampers, have association-generated standards, but these are not useful for job shops that serve customers across several manufacturing sectors. That's why it behooves fabricating shops to create their own standards. If they choose to do this, here is what they should keep in mind.
The company's products or parts should take into account the effects of burrs and edges, and the company should provide appropriate actions and controls. Product designs should identify edge requirements, and the technical staff should be aware of those requirements.
Corporate quality expectations drive this requirement. They provide a complete approach to defining edge conditions on product drawings. Manufacturing and inspection instructions and practice ensure that design requirements are met.
Deburring is not required. All edges may be left as produced by the sequence of production processes used. Burrs or similar projections produced at edges may cause some dimensions to fall outside their normal limits. Whenever a drawing, purchase order, or specification fails to indicate specific edge finishing requirements, this level of edge finishing is implied. This level of edge quality allows producers to remove burrs and finish edges if they desire to do so.
Remove sharp edges. Edges defined by this level of finishing will be smooth to the extent that hands will not be cut, nor will electrical wires or mating parts. Burrs still remain on the products; they may be beaten over, flattened, completely removed, or rounded.
Remove all visible burrs. No projections visible to the unaided eye are permitted beyond the normal plane of adjacent surfaces. Small projections that are too small to be detected by normal unaided vision may remain. Any remaining material should not cause dimensions to fall out of drawing specifications. This specification level also requires that edges should not be sharp to the extent that they could cut hands, wiring cables, or mating parts.
Remove all burrs visible at __ X magnification. No projections visible at __ X magnification are permitted beyond the normal plane of adjacent surfaces. Small projections that are too small to be detected by the indicated power of magnification may remain. This specification level also requires that edges should not be sharp to the extent that they could cut hands, wiring cables, or mating parts. This level of edge quality allows inspection by any quality of optics and any form of lighting. Tactile or other nonoptical inspection approaches are not allowed in this level of deburring.
Break edges __ X __ mm minimum. Edges should be chamfered, blunted, or smoothed such that no material falls above a chamfer of the indicated minimum dimensions.
Round edges __ to __ mm radius. Edges should have a curvature falling within the indicated limits. Chamfers are not acceptable.
Do not deburr. Edges should be left as produced by the sequence that produced them. This statement explicitly prohibits deburring.
This outline of deburring standards uses an ISO 9000 approach.
Other methods of specifying edge finishing levels are acceptable as long as they leave no doubt about the intent of the requirement. Drawings for components requiring more than one edge finishing level must clearly indicate which requirement applies to which edges. Providing explicit notes on the drawing with arrows pointing to the edges involved is the most commonly used approach, but other approaches are acceptable.
Design requirements drive the manufacturing requirements, which provide a complete approach to defining edge conditions for manufacturing operations. All new and current manufacturing instructions should conform to this requirement.
Work instructions for burrs, deburring, and edge finishing should be written and provide adequate details so that those who perform any of the operations can understand the requirements and how to perform the work. Work instructions should ensure that drawing callouts and specifications are met or exceeded.
When work instructions refer to machine operations, written details describing those operations should be provided. Operators should follow work instructions. Operators who deburr or finish edges should be trained, and a record should be kept of their training. The training provided should include all the elements specified on work instructions, machine operation procedures, and expectations and requirements. All equipment dials, gauges, and measuring devices should be calibrated to a set of written standards, and a record should be kept of such calibration.
Figure 2 illustrates one acceptable approach for defining edge requirements in work instructions. This approach provides explicit instructions for edges to be deburred, size of final edge configuration, and the equipment to be used.
In the absence of any specific deburring process described in manufacturing instructions, hand deburring should be used. Whenever a technique is critical or its costs are clearly advantageous, the work instructions should specify those techniques to be used during deburring. Figure 3 defines the processes, calibration, and training requirements for deburring at a metal fabricating facility.
Design requirements drive inspection requirements, which provide a complete approach to defining edge conditions for inspection. All new and current inspection instructions and practices should conform to this requirement.
Instructions for inspecting for burrs, deburring, and edge finishing should be written and provide adequate detail so that those performing any inspections can understand the requirements, the measuring and recording devices, and how to perform the work. Instructions for inspection should ensure that drawing callouts and specifications are met or exceeded.
When instructions for inspection refer to equipment operation, written details describing equipment operation should be provided by some means. Inspectors should follow inspection instructions. Inspectors who inspect for deburring and edge finishes should be trained, and a record kept of their training. Documentation that parts conform or do not conform to edge and deburring requirements should be maintained.
In these work instructions, edge requirements are clearly defined.
The presence of burrs on parts, the measurement of burr properties, edge configuration, and related items can be documented by many approaches. Any specific approaches required for specific edges or parts should be defined by inspection instructions.
Unaided visual inspection. Unaided visual inspection recognizes that some personnel wear eyeglasses, and if these are normally required by the personnel, they should be classed as unaided. Visual acuity varies significantly among individuals, so absolute determination of burr-free conditions is not assured.
Toothpick (tactile) inspection. Wooden toothpicks generally detect burrs and steps as small as 0.0005 in. Draw the end of the toothpick across the edge in question, slowly searching for a slight upward movement or a momentary stopping. Sharpness is detected by drawing the body of the wooden toothpick lightly over the edge; if any shavings appear, the edge is sharp. Shavings generally indicate that edge radii are approximately 0.001 in. or smaller.
No. 2 pencil point inspection. Using the point of a sharpened No. 2 pencil, jab at the burr. If the point breaks off before the burr or any other material is broken free, the burr is assumed to be rigidly adhered.
Fingernail inspection. Draw the end of the fingernail over the edges. If the fingernail hangs up, slows, or experiences a slight upward motion, a burr or raised metal exists at the edge. This technique often can detect burrs as small as 0.0005 in. high. Sharpness is detected by drawing the top surface of the fingernail lightly over the edge. If any shavings appear, the edge is sharp. Shavings generally indicate that edge radii are approximately 0.001 in. or smaller.
4X magnification. A 4X magnifying glass, with or without accompanying lighting, is used. Inspectors may wear eyeglasses in addition if they normally require these. Again, visual acuity varies significantly among individuals, so absolute determination of burr-free conditions is not assured.
Microscope inspection. A stereozoom microscrope is used with associated lighting of any kind. Magnification of 10X is used if not otherwise specified. Microscopes should be in good working order and be maintained under a defined maintenance plan to ensure adequate optics quality.
Borescope inspection. Borescopes should be used to inspect the hole interiors or other cavities not otherwise readily seen. Borescope inspection must be done by operators qualified in detecting burrs and associated edge conditions.
Metallurgical mounts inspection. Metallurgical cross-sectional mounts are made only when specified or when other means are inconclusive. This is a destructive inspection.
Height gauge inspection. Raised material and burrs may be detected by passing a height gauge and indicator over the edge. This approach requires several measurements along each edge. Careful use can detect burrs only 0.0002 in. tall, but it cannot determine burr thickness.
Establishing a deburring standard for a job shop doesn't have to be a complicated task. The key is clearly stating the design, manufacturing, and inspection requirements so that no individual in the production process has any questions about what is expected.
Actually creating a deburring standard is a good exercise as well for those shops that have yet to formalize work procedures. It's a tool that can be used to boost quality and impress sophisticated OEM customers that may be looking to expand their metal fabrication supply chains.
This summary details the type of deburring methods that might be available in a shop and the corresponding calibration and training requirements.
LaRoux K. Gillespie is the author of SME's Deburring and Edge Finishing Handbook.


text:
Molly Ephraim Age Height Weight Body Stats Net Worth
06/09/2022 by bollywoodfever
Molly Ephraim Age Height Weight Body Stats Net Worth 2022, Boyfriend, Husband Family Body Measurements (Figure Stats) Favorites Cars Read More
2 Molly Ephraim Body Measurements
2.1 Family and Relationship
2.1.1 Education
2.1.1.1 Net Worth and Favorites
2.2 Career
Molly Ephraim is an American actress who has appeared in films, television, and Broadway, Off-Broadway, and regional theater productions.
She was born on May 22, 1986 in Philadelphia, Pennsylvania, United States America.
She is best known for her role as Mandy Baxter on the ABC sitcom Last Man Standing during its original run (2011–2017).
Molly Ephraim has also appeared on a number of other TV series, including Brockmire (2017), Halt and Catch Fire (2017), and Casual (2018).
Ephraim portrayed Irene Kelly in the Hugh Jackman movie The Front Runner (2018), her second collaboration with her Last Man Standing co-star Kaitlyn Dever.
She also appeared on HBO's Perry Mason as Della Street's lover Hazel Prystock. Also Read, Maria Beregova Age Height Weight Body Stats Net Worth
Molly Ephraim plays Maybelle Fox on the Amazon series A League of Their Own.
Nickname Molly
Full Name Molly Ephraim
Age 36 Years (As Of 2022)
Birthplace Philadelphia, Pennsylvania, U.S.
Religion Judaism
Also Read, Alan Ritchson Age Height Weight Wife Kids Net Worth
Molly Ephraim Body Measurements
Molly Ephraim is 5 feet 1 inches or 1.55m tall and weighs around 51 kg or 112 lbs.
Her Body Measurements are 34-24-34 with Brown and Brown eyes.
Height 5 feet 1 inches (1.55 m)
Body Stats 34-24-34
Bra Size 34B
Hips 34 inches
Dress Size 4 (US)
Body Type Slim
Also Read, Caroline Sunshine Age Height Weight Body Stats Net Worth
Molly Ephraim was married in September 2021.
Her husband, Evan, works at a software company.
On December 1, 2021, Molly Ephraim gave birth to the couple's first child, daughter Zia.
Father William F. Ephraim
Mother Nina Z. Ephraim
Siblings Max Ephraim
Husband Evan
Kids Zia
Boyfriends/Girlfriends —
Also Read, Tuppence Middleton Age Height Weight Body Stats Net Worth
Molly Ephraim grew up in Bucks County, Pennsylvania. Ephraim performed in shows at the Bucks County Playhouse as a child, and in professional productions at the Prince Music Theater and at the Arden Theatre Company in Philadelphia as a teenager.
In 2008, Ephraim graduated from Princeton University with a B.A. in Religious Studies, after going to Central Bucks East High School.
At Princeton she was a member of the Triangle Club and performed in and choreographed various shows for Princeton University Players and Theatre Intime.
Qualification B.A. in Religious Studies
School Central Bucks East High School
College Princeton University
Also Read, Hannah Waddingham Age Height Weight Body Stats Net Worth
Net Worth and Favorites
Molly Ephraim Net Worth as of 2022 is 1.5 million USD Approx.
Fav Food Pizza
Hobbies Shopping
Fav Actor —
Fav Actress —
Fav Singer —
Fav Color Black
Travel Destination London
Car —
Salary —
Net Worth 1.5 million USD Approx.
Also Read, Lindsay Brewer Age Height Weight Body Stats Net Worth
Ephraim made her Broadway debut as Little Red Riding Hood in the Broadway revival of Into the Woods in 2002, receiving a Drama League Award nomination.
She later played Bielke in a Broadway revival of Fiddler on the Roof (2004). Off-Broadway, Ephraim played Rachel Stein in End Days at the Ensemble Studio Theatre in 2009.
She played Olive in The 25th Annual Putnam County Spelling Bee at the Barrington Stage Company in 2008, in a remounting of the production with new direction by Jeremy Dobrish, and at the North Shore Music Theatre. In 2010, she played Anne Frank in The Diary of Anne Frank at the Westport Country Playhouse.
In 2015, Ephraim appeared as "Daphna Feygenbaum" in Joshua Harmon's Bad Jews at the Geffen Playhouse in Los Angeles.
Ephraim appeared as a series regular in the role of Mandy Baxter, daughter of series' lead Mike Baxter (portrayed by Tim Allen), on the ABC sitcom Last Man Standing, which premiered on October 11, 2011 and originally ended in March 2017, canceled after six seasons.
The series was revived by Fox in May 2018, but Ephraim opted not to return for the show's seventh season, with Molly McCook recast in the role.
Molly Ephraim has appeared on several other television series, including Royal Pains (2009), Law & Order (2008), the Michael J. Fox-produced pilot Hench at Home (2003), the HBO pilot The Wonderful Maladys (2009), and has had recurring roles on Brockmire (2017), Halt and Catch Fire (2017), Casual (2018) and Perry Mason (2020).
Molly Ephraim portrayed Wendy Greenhut in the film College Road Trip (2008) and Ali Rey in the film Paranormal Activity 2 (2010) and the spin-off film Paranormal Activity: The Marked Ones (2014).
Molly Ephraim appeared in a supporting role in the 2018 biographical political drama The Front Runner, portraying Irene Kelly. She also played Gypsy Rose Blanchard's attorney in The Act on Hulu.
As of August 12, 2022, Ephraim plays Maybelle Fox on the Amazon series A League of Their Own.
Also Read, Jacob Elordi Age Height Weight Wife Kids Net Worth
Follow us or bookmark us for more Celeb Bio box office collection report celebrities trailers and promos
Categories Celebs Bio Tags Molly Ephraim
Lily Anne Harrison and Peter Facinelli Becomes Parents
Jack Silvagni Age Height Weight Wife Kids Net Worth

redpajama_set_name: RedPajamaCommonCrawl


Adobe Photoshop Touch By Adobe · Adobe Adobe Photoshop Touch Verified safe to install (read more). Download APK. Download the full version of Adobe Photoshop CC for free. Create Manage app updated, files, font, and more with the Creative Cloud desktop app. Manage . Download Adobe Photoshop Express APK v comes to designing visual files of the world that I often see among requests received on.
Download Adobe Photoshop Express:Photo Editor Collage Maker apk and all APK File SHA1: 4aecafe43ae64f69abde72e Join millions of creative folks who trust and use Adobe Photoshop Express, one of the best photo editor and collage maker on Android for quick, easy and. Open and edit PSD, XCF, Sketch (Photoshop, Gimp and Sketch) or any other image files. Inspect PSD and Sketch files. Convert Sketch to PSD. Apply photo.
Download Adobe Photoshop Express APK file v (fortlauderdalebasketballcourts.comle. apk). Photo editing made fun, fast and easy, make dark and grainy photos look. Adobe Photoshop Express for Windows 10 (Windows), free and safe download. Adobe Photoshop Express for Windows 10 latest version: Light Photoshop. The free Adobe Photoshop Express app provides photo magic at your fingertips. RAW PHOTO SUPPORT: *Photoshop Express supports the following file. Download Photoshop for Windows 10 - Best Software & Apps cool effects, Supports all Photoshop versions, Displays restoration preview, Uncovers file errors.


In the heart of Tennessee, evening was setting in. The setting sun cast long shadows across the brick-and-mortar shops of Nashville's Gulch neighborhood. Amongst the boutique stores and chic bars rose the undisputed largest craft brewer in the city. The painted bricks of Yazoo Brewing Company glowed in the dimming twilight. As I neared the shady patio I could hear the growing noise of excited chatter, bursts of laughter and the clank of glassware. The tell-tale soundtrack of a successful brewery.
Yazoo is the brainchild of Mississippi born Linus Hall. Hall started his beer journey as a college student in the early 90's by ripping out a page in Rolling Stone magazine and ordering an advertised home brewing kit. From there the beer creativity and passion was unleashed and after the many trials and tribulations of starting a new business, Hall opened shop in Nashville. He dubbed the new brewery Yazoo after the river in his home state, a flowing tributary of the mighty Mississippi. It wasn't long until Nashville aquired a taste for Yazoo and the brewery quickly catapulted into the largest distributor the city had on offer.
Walking inside the taproom I looked around at a room decorated with poster artwork, each frame celebrating one of Yazoo's popular brews. Against the wall an array of brewery gear lined shelves and racks while up above metal ducts and hanging signs pointed the way towards "Beer" or "Tours." Up at the bar I found my host, Caina manning the taps. I quickly sought her expertise in setting myself up with a flight of Yazoo's best.
"You gotta try the Dos Perros." she said, placing a triangular wooden flight board down in front of me. "Its one of our first beers and its really popular." she added, gathering up some stemmed taster glasses.
"Gerst is one of my favorites." she said, turning to the taps. "Its a prohibition ale so the recipe has some history." she laughed.
"If you get hungry there's an awesome barbecue place right around the corner." she informed me, pushing the full taster board across the bar. Tennessee barbecue sounded like just the thing to compliment my flight. I'd be sure to grab some grub before I started sampling. I quickly took my beer and made my way back out onto the patio.
I first went for Yazoo's award winning Hefeweizen. This beer was brewed in the true Bavarian style with wheat malt and hefeweizen yeast. I followed the scent of banana to tastes of light citrus and fruit with hints of clove. Slightly tart and slightly sweet it was a great beer for sipping on any patio on a hot day.
Gerst truly did have some history. Gerst Brewery was Nashville's first. When prohibition rocked the nation Gerst Brewery was shuttered and never opened its doors again. In collaboration with the Chandler family, keepers of those long gone recipes, Yazoo revived one of the historic brews to make Gerst. A clean and light beer, this amber ale stays true to the family recipe by using the finest German malts and grains. Crisp and refreshing it is a fine homage to Nashville's beer brewing past.
Gerst is not the only brew with an intriguing back story. Dos Perros, the Yazoo fan favorite also has a rich history. One of Linus Hall's first creations, it was born in the years before the birth of Yazoo. A batch he cooked up special and served at his sister's wedding it quickly became a hit of the party. This Mexican style brown ale combines with German, English, and chocolate malts to give it a dark rich body while Perle and Saaz add a bite of hops. Yazoo lightens up the beer in the traditional Mexican style by throwing in a small amount of flaked maize. Extremely balanced and flavorful I could immediately see why Caina had toted its popularity.
In the dusk I sat on Yazoo's patio emptying the line of taster glasses under a string of hanging lights. The Gulch was coming alive as Nashville's night scene began its daily ascent. Just a stone's throw away was Music Row. Home to famous record labels, radio stations, and recording studios, the neighborhood produced much of the world renowned music Nashville was known for. Right outside the musical neighborhood with a local brew in hand and a plate of rib bones at my side my experience at Yazoo was quintessentially Nashville.
People continued their flood onto the patio. I watched as they ordered up their favorite beer and added to the crescendo of revelry. Clinking pints, unabated laughter, and fevered conversation. I couldn't help but smile at the atmosphere. Despite our proximity to the legendary Music Row it was right here on Yazoo's patio that I found the true Nashville Sound.
Filed Under: Hoppy Thoughts Blog Tagged With: beer, brewery, Craft Beer, hops, microbrew, Nashville, Tennessee, Yazoo Brewing Co.


At Car Part Kings, we work hard to provide you with the best possible online shopping experience.
We've got answers and we're here to be of assistance.
Would you like to speak with us on the phone?
Don't hesitate to call us at (888) 501-6588 anytime between 8am -7pm EST. Monday - Saturday.
Would you prefer to message us instead?
Please fill in the form below and we'll respond very shortly via email.


text:
Expected Oddness
By shahriarsust13 · Limits 4s, 512 MB
Alita found a string of n characters where each character of the string is either '0' or '1'. The Oddness of the string is the number of occurrences of '1' in it.
Being stressed out at work she decided to play with the string. So she started to randomly pick a segment [l, r] such that 1 ≤ l ≤ r ≤ n and toggle all the characters from index l to index r inclusive (toggle means replacing '0' by '1' and '1' by '0'). She will do this operation exactly m times.
But she has lots of work to do and doesn't have enough time to perform these m operations. So now she is interested to know the expected Oddness of the array after performing exactly m operations. Assume that the probability of each segment being selected is the same.
We can show that the expected Oddness can be expressed as P/Q, where P and Q are coprime integers and Q isn't divided by (109+7). Output P⋅Q−1 mod (109+7).
The first line contains an integer t(1 ≤ t ≤ 100), the number of test cases.
Each of the next two lines describes a test case.
The first line of each test case contains two integers n and m(1 ≤ n, m ≤ 105), the size of the string and the number of operations Alita will perform. The next line contains a string of n characters where each character is either '0' or '1'.
It is guaranteed that the sum of all n doesn't exceed 106.
For each test case, output a single integer— P⋅Q−1 mod (109+7).
mohanr7073Earliest, Dec '19
Prakhar.888639Fastest, 0.1s
farhanhasinLightest, 131 kB
SwampFireShortest, 995B
Contest Based on SUST Intra University Programming Contest 2019 Ended Dec '19


text:
#include "tensorflow/lite/micro/kernels/fully_connected.h"

#include "tensorflow/lite/c/builtin_op_data.h"
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/kernels/internal/common.h"
#include "tensorflow/lite/kernels/internal/quantization_util.h"
#include "tensorflow/lite/kernels/internal/reference/fully_connected.h"
#include "tensorflow/lite/kernels/internal/reference/integer_ops/fully_connected.h"
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
#include "tensorflow/lite/kernels/kernel_util.h"
#include "tensorflow/lite/micro/kernels/ceva/ceva_tflm_lib.h"
#include "tensorflow/lite/micro/kernels/kernel_util.h"
#include "tensorflow/lite/micro/micro_log.h"

// #define MCPS_MEASUREMENT
#ifdef MCPS_MEASUREMENT
#include "tensorflow/lite/micro/kernels/ceva/mcps_macros.h"
#endif

#if defined(CEVA_BX1) || defined(CEVA_SP500)
extern int32_t* CEVA_TFLM_KERNELS_SCRATCH;
extern int32_t CEVA_TFLM_KERNELS_SCRATCH_SIZE_VAL;
#endif  // CEVA platform

namespace tflite {
namespace {

void* Init(TfLiteContext* context, const char* buffer, size_t length) {
  TFLITE_DCHECK(context->AllocatePersistentBuffer != nullptr);

  return context->AllocatePersistentBuffer(context,
                                           sizeof(OpDataFullyConnected));
}

TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
  TFLITE_DCHECK(node->user_data != nullptr);
  TFLITE_DCHECK(node->builtin_data != nullptr);

  auto* data = static_cast<OpDataFullyConnected*>(node->user_data);

  const auto params =
      static_cast<const TfLiteFullyConnectedParams*>(node->builtin_data);

  const TfLiteTensor* input =
      AllocateTempInputTensor(node, kFullyConnectedInputTensor);
  const TfLiteTensor* filter =
      AllocateTempInputTensor(node, kFullyConnectedWeightsTensor);
  const TfLiteTensor* bias =
      AllocateTempInputTensor(context, node, kFullyConnectedBiasTensor);
  TfLiteTensor* output =
      AllocateTempOutputTensor(node, kFullyConnectedOutputTensor);

  TF_LITE_ENSURE_TYPES_EQ(context, input->type, output->type);
  TF_LITE_ENSURE_MSG(context, input->type == filter->type,
                     "Hybrid models are not supported on TFLite Micro.");

  return CalculateOpDataFullyConnected(context, params->activation, input->type,
                                       input, filter, bias, output, data);
}

__attribute__((optnone)) TfLiteStatus EvalQuantizedInt8CEVA(
    TfLiteContext* context, TfLiteNode* node, const OpDataFullyConnected& data,
    const TfLiteEvalTensor* input, const TfLiteEvalTensor* filter,
    const TfLiteEvalTensor* bias, TfLiteEvalTensor* output) {
  tflite::FullyConnectedParams op_params = FullyConnectedParamsQuantized(data);

  int input_shape_dimensions_count =
      tflite::micro::GetTensorShape(input).DimensionsCount();
  int weights_shape_dimensions_count =
      tflite::micro::GetTensorShape(filter).DimensionsCount();
  int* weights_shape_dims_data =
      const_cast<int*>(tflite::micro::GetTensorShape(filter).DimsData());
  int bias_shape_dimensions_count =
      tflite::micro::GetTensorShape(bias).DimensionsCount();
  int output_shape_dimensions_count =
      tflite::micro::GetTensorShape(output).DimensionsCount();
  int* output_shape_dims_data =
      const_cast<int*>(tflite::micro::GetTensorShape(output).DimsData());

  void* params = (void*)&op_params;
  int8_t* inputp =
      const_cast<int8_t*>(tflite::micro::GetTensorData<int8_t>(input));
  int8_t* filterp =
      const_cast<int8_t*>(tflite::micro::GetTensorData<int8_t>(filter));
  int32_t* biasp =
      const_cast<int32_t*>(tflite::micro::GetTensorData<int32_t>(bias));
  int8_t* outputp =
      const_cast<int8_t*>(tflite::micro::GetTensorData<int8_t>(output));

#ifdef MCPS_MEASUREMENT
  int batches = output_shape_dims_data[0];
  int output_depth =
      weights_shape_dims_data[weights_shape_dimensions_count - 2];
  int accum_depth = weights_shape_dims_data[weights_shape_dimensions_count - 1];
  MCPS_START_ONE;
#endif

  int sizeof_scratch_required = output_shape_dims_data[1];

  if (sizeof_scratch_required > CEVA_TFLM_KERNELS_SCRATCH_SIZE_VAL) {
    MicroPrintf("Scratch size (%d) less that required (%d)",
                CEVA_TFLM_KERNELS_SCRATCH_SIZE_VAL, sizeof_scratch_required);
    return kTfLiteError;
  }

  CEVA_TFLM_FullyConnected_int8(
      params, input_shape_dimensions_count, inputp,
      weights_shape_dimensions_count, weights_shape_dims_data, filterp,
      bias_shape_dimensions_count, biasp, output_shape_dimensions_count,
      output_shape_dims_data, outputp, CEVA_TFLM_KERNELS_SCRATCH);
#ifdef MCPS_MEASUREMENT
  MCPS_STOP_ONE(
      "Test params:Call CEVA_TFLM_FullyConnected_int8 inetrnal loop = %dx%dx%d",
      batches, output_depth, accum_depth);
#endif

  return kTfLiteOk;
}

TfLiteStatus EvalFloatCEVA(TfLiteContext* context, TfLiteNode* node,
                           TfLiteFusedActivation activation,
                           const TfLiteEvalTensor* input,
                           const TfLiteEvalTensor* filter,
                           const TfLiteEvalTensor* bias,
                           TfLiteEvalTensor* output) {
  // float output_activation_min, output_activation_max;
  tflite::FullyConnectedParams op_params;
  CalculateActivationRange(activation, &op_params.float_activation_min,
                           &op_params.float_activation_max);

  // op_params.float_activation_min = output_activation_min;
  // op_params.float_activation_max = output_activation_max;

  int input_shape_dimensions_count =
      tflite::micro::GetTensorShape(input).DimensionsCount();
  int weights_shape_dimensions_count =
      tflite::micro::GetTensorShape(filter).DimensionsCount();
  int* weights_shape_dims_data =
      const_cast<int*>(tflite::micro::GetTensorShape(filter).DimsData());
  int bias_shape_dimensions_count =
      tflite::micro::GetTensorShape(bias).DimensionsCount();
  int output_shape_dimensions_count =
      tflite::micro::GetTensorShape(output).DimensionsCount();
  int* output_shape_dims_data =
      const_cast<int*>(tflite::micro::GetTensorShape(output).DimsData());

  void* params = (void*)&op_params;
  float* inputp =
      const_cast<float*>(tflite::micro::GetTensorData<float>(input));
  float* filterp =
      const_cast<float*>(tflite::micro::GetTensorData<float>(filter));
  float* biasp = const_cast<float*>(tflite::micro::GetTensorData<float>(bias));
  float* outputp =
      const_cast<float*>(tflite::micro::GetTensorData<float>(output));

#ifdef MCPS_MEASUREMENT
  int batches = 1;
  int i;
  for (i = 0; i < (output_shape_dimensions_count - 1); i++)
    batches *= output_shape_dims_data[i];

  int output_depth =
      weights_shape_dims_data[weights_shape_dimensions_count - 2];
  int accum_depth = weights_shape_dims_data[weights_shape_dimensions_count - 1];
  MCPS_START_ONE;
#endif
  CEVA_TFLM_FullyConnected_Float32(
      params,
      input_shape_dimensions_count,  // GetTensorShape(input),
      inputp,
      weights_shape_dimensions_count,  // GetTensorShape(filter),
      weights_shape_dims_data, filterp,
      bias_shape_dimensions_count,  // GetTensorShape(bias),
      biasp,
      output_shape_dimensions_count,  // GetTensorShape(output),
      output_shape_dims_data, outputp);
#ifdef MCPS_MEASUREMENT
  MCPS_STOP_ONE(
      "Test params:Call CEVA_TFLM_FullyConnected_Float32 inetrnal loop = "
      "%dx%dx%d",
      batches, output_depth, accum_depth);
#endif

  return kTfLiteOk;
}

TfLiteStatus EvalCEVA(TfLiteContext* context, TfLiteNode* node) {
  TFLITE_DCHECK(node->builtin_data != nullptr);
  const auto* params =
      static_cast<const TfLiteFullyConnectedParams*>(node->builtin_data);

  const TfLiteEvalTensor* input =
      tflite::micro::GetEvalInput(context, node, kFullyConnectedInputTensor);
  const TfLiteEvalTensor* filter =
      tflite::micro::GetEvalInput(context, node, kFullyConnectedWeightsTensor);
  const TfLiteEvalTensor* bias =
      tflite::micro::GetEvalInput(context, node, kFullyConnectedBiasTensor);
  TfLiteEvalTensor* output =
      tflite::micro::GetEvalOutput(context, node, kFullyConnectedOutputTensor);

  TFLITE_DCHECK(node->user_data != nullptr);
  const OpDataFullyConnected& data =
      *(static_cast<const OpDataFullyConnected*>(node->user_data));

  // Checks in Prepare ensure input, output and filter types are all the same.
  switch (input->type) {
    case kTfLiteFloat32:
      return EvalFloatCEVA(context, node, params->activation, input, filter,
                           bias, output);
    case kTfLiteInt8:
      return EvalQuantizedInt8CEVA(context, node, data, input, filter, bias,
                                   output);

    default:
      MicroPrintf("Type %s (%d) not supported.", TfLiteTypeGetName(input->type),
                  input->type);
      return kTfLiteError;
  }
  return kTfLiteOk;
}
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
#if defined(CEVA_BX1) || defined(CEVA_SP500)
  return EvalCEVA(context, node);
#else
  return EvalQuantizeReference(context, node);
#endif
}

}  // namespace

TfLiteRegistration Register_FULLY_CONNECTED() {
  return tflite::micro::RegisterOp(Init, Prepare, Eval);
}

}  // namespace tflite

redpajama_set_name: RedPajamaGithub